:root {
    --gap       : 2.5px  ;
    --gap2x     : 5px    ;
    --gap3x     : 7.5px  ;
    --bar-height: 75px   ;
}

#main {
  display: flex;
  /* height: calc(100vh - 50px); */
  gap: var(--gap);
  background: var(--toolbar-bg);
  flex-direction: row;
  height: calc(100vh - 75px);
}

#list {
  width: 40%;
  border-right: 1px solid #333;
  overflow: auto;
}
.view-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    
    /* flex: 1; */
    flex-grow: 1;
    margin-right: 0;
    height: 100%;
}
#titlebar {
    width: 100%;
    position: block;
    /* flex-grow: 1; */
    height: 100px;
    background: var(--titlebar-bg);
    color: var(--titlebar);
    z-index:10;
    border-radius: 24px 24px 0 0;
    /* margin: auto; */
    overflow: hidden;
    min-height: 100px;
}
#view {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    background: var(--view-bg);
    color: var(--view);
    /* padding: 48px 0 12px 0; */
    border-radius: 0 0 24px 24px;
    /* margin-bottom: 75px; */
    content: contain;
    overflow: scroll;
    flex-grow: 1;
    width: 100%;
    /* min-width: 100%; */
    opacity: 0;
    pointer-events: 0;
    transition: opacity .5s ease;
}
#view.show {
    opacity: 1;
    pointer-events: auto;
}

.row {
  display: flex;
  width: 100%;
  /* padding: 10px; */
  background: none;
  border: none;
  color: #7cc7ff;
  text-align: left;
}

.row.unread {
  font-weight: bold;
}

pre {
  white-space: pre-wrap;
}


.compose-container {
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
    gap: var(--gap);
}
.compose-container input {
    padding: 0 16px 0 16px;
}
.compose-container textarea {
    padding: 16px;
}
#compose {
    margin: 14px;
    margin-right: auto;
    background: var(--compose-bg);
    color: var(--compose);
    padding: 0 32px 0 32px;
    border-radius: 32px;
    height: 64px;
}

input, textarea {
    background: var(--input-bg);
    color: var(--input);
    border: 0;
}
button {
    background: var(--message-bg);
    color: var(--message);
    border: 0;
}

input, button {
    height: 50px;
}

.folders-container {
    height: 100%;
    width: 250px;
    min-width: 250px;
    background: var(--toolbar-bg);
    padding: 0 24px 0 24px;
}
#folders {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    gap: var(--gap);
}
#folders button {
    width: 100%;
}
.folder {
    background: var(--folder-bg);
    color: var(--folder);
}

#view button.row {
    background: var(--button-bg);
    color: var(--button);
}
#view button.row:hover {
    background: var(--button-bg-hover);
    color: var(--button-hover);
}

message_from, message_subject {
    color: var(--message);
    background: var(--message-bg);
    padding: 0 12px 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
message_from { 
    width: 300px;
    /* content: contain; */
}
message_subject { 
    width: 100%;
    flex-shrink: 1;
}

.message {
    display: flex;
    height: 45px;
    min-height: 45px;
    /* padding: var(--gap) 0 var(--gap) 0; */
    width: 100%;
    padding-right: 1px;
    gap: 2px;
}
.message.unseen {
    font-weight: 600;
}
.message input[type="checkbox"] {
    margin: auto;
    height: 24px;
    width: 24px;
    margin-left: 14px;
}
button.message {
    padding: 0;
}

#view hr {
    border: 1px solid var(--border);
    width: 90%;
}

.headers {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--gap);
}

.headers {
    width: 100%;
    display: flex;
    flex-direction: column;
}
.headers-bottom {
    width: 100%;
    display: flex;
    flex-direction: row;
}
.headers-from-to {
    flex-grow: 1;
    display: flex;
    gap: var(--gap3x);
}

.headers div {
    align-items: center;
}

.headers, .body {
    padding: 12px;
}

#home img {
    content: url('/img/home.png');
    width: 50px;
}
#home, .bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background: var(--toolbar-bg);
    color: var(--toolbar);
}

.bar {
    /* min-width: 100%; */
    height: 75px;
}

.lift {
    transition: transform .3s ease;
}
.lift:hover {
    transform: translateY(calc(var(--gap) / -3));
}

.strong-span-from, .strong-span-to {
    display: flex;
    gap: 5px;
}

.compose-container #compose {
    background: var(--compose-bg);
    color: var(--compose);
}

#actions {
    opacity: 0;
    pointer-events: 0;
    transition: opacity .5s ease;
}
#actions.show {
    opacity: 1;
    pointer-events: auto;
}

.empty-folder {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: 0;
    transition: opacity .5s ease;
}
.empty-folder.show {
    opacity: 1;
    pointer-events: auto;
}