/* Usage page in the redesign (flag new_ui). Layout from css/new-ui/layout.css;
   this file only styles what is particular to the page. */
body.new-ui #viewUsage > h1,
body.new-ui #viewUsage > .sub,
body.new-ui #usageCard,
body.new-ui #usageLocked { display: none !important; }
body:not(.new-ui) #usPage { display: none; }

body.new-ui .us-page .us-grid > .ui-kpi { align-self: stretch; }
body.new-ui .us-page .us-muted { color: var(--ui-ink-3); font-size: 13px; margin: 0; }
body.new-ui .us-page .us-lock { display: flex; flex-direction: column; align-items: center; gap: 10px; }
body.new-ui .us-page .us-lock svg { width: 20px; height: 20px; fill: none; stroke: var(--ui-ink-3); stroke-width: 1.5; }
body.new-ui .us-page .us-lock p { margin: 0; max-width: 46ch; }

/* A thin meter under a number. */
body.new-ui .us-page .us-bar { display: block; height: 6px; border-radius: 99px; background: var(--ui-paper-2); overflow: hidden; }
body.new-ui .us-page .us-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ui-ink); }
body.new-ui .us-page .us-bar i.near { background: var(--ui-accent); }
body.new-ui .us-page .us-bar i.full { background: var(--ui-neg); }
body.new-ui .us-page .ui-kpi .us-bar { margin: 4px 0 2px; }

/* Months: one column per month, the count on top, the plan's line behind. */
body.new-ui .us-page .us-chart { padding-top: 8px; }
body.new-ui .us-page .us-chart ol {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px;
}
body.new-ui .us-page .us-chart li { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
body.new-ui .us-page .us-chart li > b { font: 500 14px var(--ui-mono); color: var(--ui-ink-2); }
body.new-ui .us-page .us-chart li.cur > b { color: var(--ui-ink); }
body.new-ui .us-page .us-col {
  position: relative; display: flex; align-items: flex-end; width: 100%; max-width: 72px; height: 220px;
  border-radius: 8px; background: var(--ui-paper-2);
}
body.new-ui .us-page .us-col i { display: block; width: 100%; border-radius: 8px; background: color-mix(in srgb, var(--ui-ink) 22%, var(--ui-paper-2)); }
body.new-ui .us-page li.cur .us-col i { background: var(--ui-ink); }
body.new-ui .us-page .us-mo { display: flex; flex-direction: column; align-items: center; font-size: 13px; color: var(--ui-ink-2); text-transform: capitalize; }
body.new-ui .us-page .us-mo small { font-size: 11.5px; color: var(--ui-ink-3); text-transform: none; }
/* The plan's monthly allowance: a dashed mark across every column. */
body.new-ui .us-page .us-tick { position: absolute; left: -7px; right: -7px; height: 0; border-top: 1.5px dashed var(--ui-accent); }
body.new-ui .us-page .us-key { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 12.5px; color: var(--ui-ink-3); }
body.new-ui .us-page .us-key i { width: 18px; border-top: 1.5px dashed var(--ui-accent); }

/* The window as one bar: used, held for monitoring, free. */
body.new-ui .us-page .us-stack { display: flex; gap: 3px; height: 14px; }
body.new-ui .us-page .us-stack i { display: block; min-width: 3px; border-radius: 4px; }
body.new-ui .us-page :is(.us-stack .used, .us-dot.used) { background: var(--ui-ink); }
body.new-ui .us-page :is(.us-stack .resv, .us-dot.resv) {
  background: repeating-linear-gradient(135deg, var(--ui-accent) 0 3px, var(--ui-accent-soft) 3px 6px);
}
body.new-ui .us-page :is(.us-stack .free, .us-dot.free) { background: var(--ui-paper-2); box-shadow: inset 0 0 0 1px var(--ui-line); }
body.new-ui .us-page .us-legend { list-style: none; margin: 16px 0 0; padding: 0; }
body.new-ui .us-page .us-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 13.5px; }
body.new-ui .us-page .us-legend b { font: 500 14px var(--ui-mono); }
body.new-ui .us-page .us-dot { display: block; width: 10px; height: 10px; border-radius: 3px; }
body.new-ui .us-page .us-pace { margin: 14px 0 0; padding: 10px 12px; border-radius: 9px; background: var(--ui-paper-2); font-size: 13px; color: var(--ui-ink-2); }
body.new-ui .us-page .us-pace.over { background: var(--ui-neg-soft); color: var(--ui-ink); }
body.new-ui .us-page .us-window .ui-btn { margin-top: 14px; }
body.new-ui .us-page .us-window .us-muted { margin-top: 14px; }

body.new-ui .us-page .us-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
body.new-ui .us-page .us-row b { font: 500 26px/1 var(--ui-mono); letter-spacing: -.04em; }
body.new-ui .us-page .us-row span { font: 13px var(--ui-mono); color: var(--ui-ink-2); }
body.new-ui .us-page .us-content .us-muted { margin-top: 10px; }
body.new-ui .us-page .us-link {
  margin: 0 0 0 4px; padding: 0; border: 0; background: none; box-shadow: none;
  font: inherit; color: var(--ui-ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
body.new-ui .us-page .us-rules ul { margin: 0; padding: 0 0 0 18px; font-size: 13.5px; color: var(--ui-ink-2); }
body.new-ui .us-page .us-rules li + li { margin-top: 8px; }

@media (max-width: 900px) {
  body.new-ui .us-page .us-col { height: 150px; }
  body.new-ui .us-page .us-chart ol { gap: 8px; }
  body.new-ui .us-page .us-link { min-height: 44px; }
}

/* The chart takes the height the side column sets, so the card has no hole. */
body.new-ui .us-page .us-months { display: flex; flex-direction: column; }
body.new-ui .us-page .us-months > .ui-card-b,
body.new-ui .us-page .us-chart { flex: 1; display: flex; flex-direction: column; }
body.new-ui .us-page .us-chart ol { flex: 1; }
body.new-ui .us-page .us-chart .us-col { flex: 1; height: auto; min-height: 220px; }
@media (max-width: 900px) {
  body.new-ui .us-page .us-chart .us-col { min-height: 150px; }
}
/* Every month label takes the same room, so the column bottoms line up. */
body.new-ui .us-page .us-mo { min-height: 40px; }
/* Tracks drawn from the ink, so they show on the dark card too. */
body.new-ui .us-page :is(.us-col, .us-bar, .us-pace:not(.over), .us-stack .free) { background: color-mix(in srgb, var(--ui-ink) 6%, transparent); }

/* No full-height track behind the month bars: a tall column read as "hit
   the limit". The bars stand on one baseline instead. */
body.new-ui .us-page .us-chart .us-col { background: none; border-bottom: 1px solid var(--ui-line); border-radius: 0; }
body.new-ui .us-page .us-col i { border-radius: 6px 6px 0 0; }
