/* ================= Storage Explorer — the scope drawer =================
   Owns the scope drawer shell, its class-mix bar, fact lists, file table and run rows. Cards and filters are alt-storage.css's, charts
   alt-storage-charts.css's, retention alt-storage-retention.css's; every class here begins `sxp-` or is the shell `sx-drawer*`. The shell is shared:
   the Traffic and Feature-usage drawers wear it too, so a change to it is a change to three panes.
   No z-index is authored beyond `--z-panel` (JS/core/layers.js raises it inline when needed). Tokens only: theme comes free. */

/* ---------- the backdrop ---------- */

.alt-app .sx-drawer-backdrop{
  position:fixed; inset:0; z-index:var(--z-panel); background:var(--a-scrim); animation:sxp-fade var(--a-quick) var(--a-ease);
}

/* ---------- the panel (DS-44: radius 14, 1px edge, panel ground; DS-42: header and footer 12px 16px with a divider) ---------- */

.alt-app .sx-drawer{
  position:fixed; top:0; right:0; bottom:0; z-index:var(--z-panel); width:min(560px, 100%);
  display:flex; flex-direction:column; background:var(--a-panel);
  border-left:1px solid var(--a-line); box-shadow:var(--a-shadow-lg); animation:sxp-slide var(--a-quick) var(--a-ease);
}

.alt-app .sx-drawer-head{
  display:flex; align-items:flex-start; gap:var(--a-3); padding:var(--a-3) var(--a-4);
  /* One step above the panel, so the identity of what is being inspected stays legible when the body underneath scrolls. */
  background:var(--a-float); border-bottom:1px solid var(--a-line);
}
.alt-app .sx-drawer-id{ min-width:0; flex:1; }
/* The drawer title is the overlay title (DS-14). A team name is user-supplied and wraps rather than pushing the close button off the panel. */
.alt-app .sx-drawer-title{
  margin:0; font-family:var(--a-display); font-size:var(--a-fs-16); font-weight:600; line-height:var(--a-lh-tight); color:var(--a-text);
  overflow-wrap:anywhere;
}
.alt-app .sx-drawer-sub{ margin:var(--a-1) 0 0; font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-dim); overflow-wrap:anywhere; }

/* ---------- the tabs ----------
   Every drawer's tabs are `.a-tabs` > `.a-tab` (DS-24, DS-A12); this is the strip's ground and padding. */
.alt-app .sx-drawer-tabs{
  padding:0 var(--a-4); background:var(--a-float); border-bottom:1px solid var(--a-line); overflow-x:auto; flex-wrap:nowrap;
}

/* ---------- the body ---------- */

.alt-app .sx-drawer-body{ flex:1 1 auto; min-height:0; overflow-y:auto; padding:var(--a-pad-body); }
.alt-app .sx-drawer-panel{ display:flex; flex-direction:column; gap:var(--a-4); }

/* ---------- the class mix ---------- */

.alt-app .sx-drawer-mix{ display:flex; flex-direction:column; gap:var(--a-3); }
.alt-app .sxp-mix-bar{ display:flex; height:var(--a-sp-8); border-radius:var(--a-r-pill); overflow:hidden; background:var(--a-raised); }
.alt-app .sxp-mix-seg{ display:block; height:100%; }
.alt-app .sxp-mix-key{ margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:var(--a-1); }
.alt-app .sxp-mix-item{
  display:flex; align-items:baseline; gap:var(--a-2); font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-text);
}
/* The swatch is a repeat of the bar, never the only way to tell one class from another: the name is beside it and the size after that. */
.alt-app .sxp-mix-dot{ flex:0 0 auto; width:var(--a-dot); height:var(--a-dot); border-radius:var(--a-r-pill); }
.alt-app .sxp-mix-name{ flex:1 1 auto; min-width:0; overflow-wrap:anywhere; }
/* A size is a figure: the body face with tabular figures (DS-53), never monospace. */
.alt-app .sxp-mix-size{ flex:0 0 auto; color:var(--a-dim); font-variant-numeric:tabular-nums; }
/* WHICH OF THE TWO KINDS OF NUMBER THIS IS, on every row. Attachment bytes are measured; everything else is an estimate of row content. */
.alt-app .sxp-mix-kind{
  flex:0 0 auto; font-size:var(--a-fs-11); font-weight:700; line-height:var(--a-lh-tight); letter-spacing:.08em; text-transform:uppercase; color:var(--a-faint);
}
/* SIX ROLES, AND THEY MEAN NOTHING: they separate adjacent segments and nothing more (`--a-chart-1..6`). */
.alt-app .sxp-mix-seg.k1, .alt-app .sxp-mix-dot.k1{ background:var(--a-chart-1); }
.alt-app .sxp-mix-seg.k2, .alt-app .sxp-mix-dot.k2{ background:var(--a-chart-2); }
.alt-app .sxp-mix-seg.k3, .alt-app .sxp-mix-dot.k3{ background:var(--a-chart-3); }
.alt-app .sxp-mix-seg.k4, .alt-app .sxp-mix-dot.k4{ background:var(--a-chart-4); }
.alt-app .sxp-mix-seg.k5, .alt-app .sxp-mix-dot.k5{ background:var(--a-chart-5); }
.alt-app .sxp-mix-seg.k6, .alt-app .sxp-mix-dot.k6{ background:var(--a-chart-6); }

/* ---------- the fact lists ---------- */

.alt-app .sx-drawer-facts{ display:block; }
.alt-app .sxp-facts{ margin:0; display:flex; flex-direction:column; gap:var(--a-2); }
.alt-app .sxp-fact{
  display:flex; align-items:baseline; justify-content:space-between; gap:var(--a-3); padding-bottom:var(--a-2); border-bottom:1px solid var(--a-line-soft);
}
.alt-app .sxp-fact:last-child{ border-bottom:0; padding-bottom:0; }
.alt-app .sxp-fact-k{ flex:0 0 auto; font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-dim); }
.alt-app .sxp-fact-v{
  margin:0; flex:1 1 auto; min-width:0; display:flex; flex-direction:column; align-items:flex-end; gap:var(--a-sp-2); text-align:right;
}
/* A count or a size in the body face with tabular figures (DS-53, DS-A06): the reader's font reaches the numbers. */
.alt-app .sxp-fact-n{ font-size:var(--a-fs-13); line-height:var(--a-lh-ui); color:var(--a-text); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
/* The qualifier belongs to the figure and sits under it: "exact", "estimated", "not measured yet". Never dropped: it is the half of the number that says what it promises. */
.alt-app .sxp-fact-note{ font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-faint); }

/* ---------- the file table and the run rows ----------
   The file table is `.a-table` in `.a-table-wrap` (alt-admin-components.css). A file on finished work is the highest-confidence reclaim there is,
   and the marker is a rule down the edge rather than a tint alone. */
.alt-app .sxp-file-name{ min-width:16ch; overflow-wrap:anywhere; }
.alt-app .a-table tr.is-pick > td:first-child{ box-shadow:inset 2px 0 0 var(--a-green); }

.alt-app .sxp-run{
  display:flex; flex-wrap:wrap; align-items:center; gap:var(--a-2); padding:var(--a-2) 0; border-bottom:1px solid var(--a-line-soft);
  font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-dim);
}
.alt-app .sxp-run-when{ flex:1 1 auto; min-width:0; color:var(--a-text); overflow-wrap:anywhere; }
.alt-app .sxp-run-counts,
.alt-app .sxp-run-bytes{ flex:1 1 100%; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }

/* ---------- notes and empties ---------- */

.alt-app .sxp-note{ margin:0; font-size:var(--a-fs-12); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-faint); }

/* ---------- the foot ---------- */

.alt-app .sx-drawer-foot{
  flex:0 0 auto; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:var(--a-2); padding:var(--a-3) var(--a-4);
  background:var(--a-float); border-top:1px solid var(--a-line);
}

/* ---------- narrow ---------- */

/* THE PANEL BECOMES THE SCREEN (DS-57): a 560px drawer on a 420px phone is a panel with its own horizontal scrollbar, so below the suite's tablet
   breakpoint it is the bottom sheet: full width, all but the top of the height, `--a-r-lg` top corners. */
@media (max-width:639px){
  .alt-app .sx-drawer{
    top:auto; left:0; width:100%; max-height:94vh; border-left:0; border-top:1px solid var(--a-line);
    border-radius:var(--a-r-lg) var(--a-r-lg) 0 0; animation-name:sxp-rise;
  }
  .alt-app .sx-drawer-head,
  .alt-app .sx-drawer-tabs,
  .alt-app .sx-drawer-body,
  .alt-app .sx-drawer-foot{ padding-left:var(--a-4); padding-right:var(--a-4); }
  .alt-app .sx-drawer-foot .a-btn{ flex:1 1 auto; }
}

/* ---------- motion ---------- */

@keyframes sxp-fade{ from{ opacity:0; } to{ opacity:1; } }
@keyframes sxp-slide{ from{ transform:translateX(16px); opacity:0; } to{ transform:none; opacity:1; } }
@keyframes sxp-rise{ from{ transform:translateY(16px); opacity:0; } to{ transform:none; opacity:1; } }

/* The travel goes; the panel still arrives. */
@media (prefers-reduced-motion: reduce){
  .alt-app .sx-drawer,
  .alt-app .sx-drawer-backdrop{ animation:none; }
}
