/* Entry 012 — The Tab
   Series: The Attention Ledger.
   Scene art direction: a quiet bar after close. One cool pendant glow from
   upper-center over an empty counter; deep teal-blue night. Three layers:
   backdrop atmosphere → a faint counter sheen → the frosted-glass tab, the only
   sharp thing in the room. One accent: warm amber, reserved for the running total.
   Design focus: a single component, given the whole frame and plenty of air. */

.tab-scene {
  display: grid;
  place-items: center;
  min-height: 760px;
  padding: 120px 32px;
  border-color: rgba(14, 30, 36, 0.6);
  /* after-hours teal — layered so the ramp never bands; darkest dark keeps the hue */
  background:
    radial-gradient(90% 70% at 50% -8%, rgba(86, 156, 168, 0.22), transparent 58%),
    radial-gradient(120% 90% at 50% 116%, rgba(20, 60, 70, 0.30), transparent 60%),
    linear-gradient(184deg,
      #07151a 0%,
      #0a1c22 24%,
      #0c232b 46%,
      #0d2730 64%,
      #0a1d24 84%,
      #061217 100%);
}

/* top light layer — a single cool pendant glow over the counter */
.pendant {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: -6%;
  width: min(620px, 80%);
  height: 520px;
  transform: translateX(-50%);
  background:
    radial-gradient(50% 60% at 50% 0%, rgba(150, 214, 224, 0.34), transparent 70%),
    radial-gradient(34% 44% at 50% 8%, rgba(196, 240, 246, 0.20), transparent 72%);
  filter: blur(38px);
  pointer-events: none;
  transition: opacity 900ms ease;
}

/* mid layer — the counter and its reflection, a faint horizontal sheen */
.counter {
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: 16%;
  width: min(1100px, 96%);
  height: 240px;
  transform: translateX(-50%);
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(120, 196, 208, 0.16), transparent 72%),
    linear-gradient(180deg, rgba(146, 210, 220, 0.10), transparent 60%);
  filter: blur(22px);
  pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* THE COMPONENT — one frosted-glass running tab                       */
/* ------------------------------------------------------------------ */

.tab {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  display: grid;
  gap: 26px;
  padding: 40px 44px 36px;
  border-radius: 30px;
  font-family: var(--ui-sans);
  /* cool frosted glass: a thin film of light over the teal dark */
  background:
    linear-gradient(168deg, rgba(168, 224, 232, 0.15), rgba(12, 32, 40, 0.36));
  border: 1px solid rgba(176, 224, 232, 0.22);
  box-shadow:
    0 1px 0 rgba(214, 244, 248, 0.28) inset,
    0 0 0 1px rgba(6, 16, 20, 0.22),
    0 56px 120px rgba(4, 14, 18, 0.62),
    0 14px 46px rgba(20, 80, 92, 0.26);
  backdrop-filter: blur(30px) saturate(1.3);
  -webkit-backdrop-filter: blur(30px) saturate(1.3);
  color: #e8f4f6;
  transition: transform 700ms cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ---- machine chrome — small, sans, recessive ---- */
.tab-top {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(186, 214, 220, 0.6);
}

.tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8fd6e0;
  box-shadow: 0 0 10px rgba(143, 214, 224, 0.9);
}

.tab-sep { opacity: 0.5; }
.tab-status { color: rgba(206, 230, 234, 0.78); }

/* the unit toggle — a real switch between minutes and meaning */
.unit-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(176, 224, 232, 0.22);
  background: rgba(10, 28, 34, 0.4);
  cursor: pointer;
}

.unit-opt {
  font-family: var(--ui-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  color: rgba(186, 214, 220, 0.55);
  transition: color 220ms ease, background 220ms ease;
  white-space: nowrap;
}

.unit-opt.is-on {
  color: #0a1c22;
  background: linear-gradient(180deg, #e6f6f8, #c4e8ec);
}

/* ---- the hero: the running line ---- */
.tab-line {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-style: italic;
  font-weight: 360;
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.012em;
  color: #f2fafb;
  text-wrap: balance;
}

/* the running total — the one warm accent in the room */
.tab-amount {
  font-style: normal;
  font-weight: 500;
  color: #f0b25a;
  text-shadow: 0 0 26px rgba(240, 178, 90, 0.4);
  transition: color 300ms ease;
}

.tab-trans { color: rgba(226, 240, 242, 0.9); }

/* ---- itemized lines — sans, ledger-like, recessive ---- */
.tab-items {
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(176, 224, 232, 0.16);
  list-style: none;
  display: grid;
  gap: 11px;
}

.tab-items li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  animation: tabrise 460ms cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

.ti-what {
  font-family: "Newsreader", Georgia, serif;
  font-size: 15.5px;
  color: rgba(220, 238, 240, 0.82);
}

.ti-cost {
  flex: none;
  font-family: var(--ui-sans);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: rgba(186, 214, 220, 0.62);
  padding-top: 1px;
}

/* ---- actions ---- */
.tab-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}

.btn {
  font-family: var(--ui-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.005em;
  border-radius: 999px;
  padding: 13px 24px;
  cursor: pointer;
  transition: transform 180ms ease, background 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

/* Keep scrolling — the easy, luminous default; the thing the app wants */
.btn-scroll {
  border: 1px solid rgba(214, 244, 248, 0.5);
  background: linear-gradient(180deg, #eafafb, #c8eaee);
  color: #0a1c22;
  box-shadow: 0 10px 30px rgba(120, 196, 208, 0.28);
}

.btn-scroll:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(120, 196, 208, 0.4);
}

.btn-scroll .sub {
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0;
  color: rgba(10, 28, 34, 0.55);
}

/* Close the tab — a ghost; available, the honest choice */
.btn-close {
  border: 1px solid rgba(176, 224, 232, 0.26);
  background: rgba(168, 224, 232, 0.05);
  color: rgba(220, 236, 238, 0.82);
}

.btn-close:hover {
  border-color: rgba(176, 224, 232, 0.5);
  color: #f2fafb;
}

/* ---- settled state ---- */
.tab[data-state="settled"] .tab-amount { color: #f6c277; }

.tab-settle {
  margin-top: 4px;
  padding-top: 22px;
  border-top: 1px solid rgba(176, 224, 232, 0.16);
  animation: tabrise 600ms cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

.settle-total {
  margin: 0 0 8px;
  font-family: "Newsreader", Georgia, serif;
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.2;
  color: #f6f0e4;
}

.settle-total b {
  font-style: normal;
  font-weight: 500;
  color: #f0b25a;
}

.settle-note {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(220, 236, 238, 0.74);
}

@keyframes tabrise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .tab-items li, .tab-settle { animation: none; }
}

/* ---- small screens ---- */
@media (max-width: 720px) {
  .tab-scene { padding: 72px 16px; min-height: 0; }
  .tab { padding: 30px 24px 28px; border-radius: 24px; gap: 22px; }
  .tab-top { flex-wrap: wrap; }
  .unit-toggle { margin-left: 0; order: 3; width: 100%; justify-content: center; }
  .btn { padding: 12px 20px; }
}
