/* Почта: вкладки и панели.
   Часть общего каскада: порядок подключения — ui.Stylesheets. */
/* ── The mail client ───────────────────────────────────────────────────
   Three panes: where to look, what is there, and the letter itself. The
   shape every mail client has had for thirty years, and the reason is
   worth writing down — the reading pane must hold still while the list
   moves under it. A page that scrolls as one takes the letter somebody is
   reading off the screen the moment they look for the next one.

   So the section is a fixed height and each pane scrolls on its own. The
   height is the viewport less the header and the page's own padding; the
   minimum stops it collapsing to nothing on a short window. */
/* `.screen.on` sets display:block and outranks a single class, so the
   layout has to be written at the same weight or the three panes stack. */
.screen.on.mailer{
  display:flex;
  flex-direction:column;
  gap:0;
  height:calc(100vh - 172px);
  min-height:520px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--r);
  overflow:hidden;
}

/* The tab strip along the top. The mail's own tab first, then a tab for
   each letter or attachment opened in full; it scrolls sideways rather
   than wrapping when a busy morning has opened a dozen. */
.mbox-tabs{
  display:flex;align-items:flex-end;gap:2px;flex:0 0 auto;
  padding:6px 8px 0;background:var(--sunk);border-bottom:1px solid var(--line);
  overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;
}
.mbox-tab{
  display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;max-width:236px;
  padding:8px 9px 9px 11px;border:1px solid transparent;border-bottom:0;
  border-radius:9px 9px 0 0;background:transparent;color:var(--ink-2);
  font:inherit;font-size:12.5px;line-height:1.2;cursor:pointer;white-space:nowrap;
}
.mbox-tab:hover{background:var(--wash);text-decoration:none}
.mbox-tab[aria-selected="true"]{
  background:var(--panel);color:var(--accent-2);border-color:var(--line);
  border-top:2px solid var(--accent);padding-top:7px;
  position:relative;top:1px;font-weight:500;
}
.mbox-tab svg{flex-shrink:0;opacity:.72}
.mbox-tab[aria-selected="true"] svg{opacity:1;color:var(--accent)}
.mbox-tab .lbl{overflow:hidden;text-overflow:ellipsis;min-width:0}
.mbox-tab .x{
  flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;
  width:17px;height:17px;margin-left:1px;border-radius:5px;
  color:var(--ink-3);font-size:15px;line-height:1;
}
.mbox-tab .x:hover{background:var(--line-2);color:var(--ink)}

/* The panels below the strip: one shown at a time. The mail's own panel is
   the three panes; a letter's or attachment's panel takes the whole space. */
.mbox-panels{position:relative;flex:1;min-height:0;display:flex}
.mbox-home{
  flex:1;min-width:0;min-height:0;display:grid;
  grid-template-columns:258px minmax(330px, 410px) minmax(0, 1fr);
}
.mbox-home[hidden]{display:none}
.mbox-panel{flex:1;min-width:0;min-height:0;overflow:auto;background:var(--panel);
  display:flex;flex-direction:column}
.mbox-panel[hidden]{display:none}

/* An attachment opened in its own tab: the browser shows a PDF or a picture
   itself in the frame; a kind it will not render is offered to save. */
.mbox-file{padding:0}
.mbox-file-frame{flex:1;width:100%;border:0;background:var(--panel)}
.mbox-file-save{margin:auto;text-align:center;color:var(--ink-3);padding:44px 40px}
.mbox-file-save p{margin:0 0 16px;font-size:14px}

