/* Voltage Trail add-on: fold / unfold sections. Loads after quests.css. */
.czbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: -4px 0 12px; }
.czbar .ib { padding: 5px 14px; font-size: 13px; }
.czbar .czhint { margin-right: auto; font-family: var(--lcars); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }

/* the rail-colored pill in each heading becomes the fold button */
.card > h2.czh { cursor: pointer; -webkit-user-select: none; user-select: none; }
.card > h2.czh::before { display: none; }
.cz { flex: none; width: 44px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: var(--rail); color: var(--ink); display: grid; place-items: center; margin-right: -2px; }
h2.czh > .cz { flex: none; }
h2.czh > .cz + * { flex: 1 1 auto; }
.cz svg { width: 16px; height: 16px; display: block; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.card.cz-collapsed > h2 .cz svg { transform: rotate(-90deg); }
.cz:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* animated body */
.czb { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .32s cubic-bezier(.2,.8,.2,1), opacity .25s ease; }
.czi { min-height: 0; }
.card.cz-anim > .czb > .czi, .card.cz-collapsed > .czb > .czi { overflow: hidden; }
.card.cz-collapsed > .czb { grid-template-rows: 0fr; opacity: 0; }
.card.cz-instant > .czb { transition: none; }
.card.cz-collapsed { padding-bottom: 14px; }
.card.cz-collapsed > h2 { margin-bottom: 0; }
.card.cz-collapsed > h2 .hbtns { display: none; }

/* little status text on a folded heading (road cam shows REC) */
.czs { display: none; flex: none; font-family: var(--lcars); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: #e5173f; border-radius: 999px; padding: 2px 11px; }
.card.cz-collapsed > h2 .czs.on { display: inline-flex; }

/* top card folds down to the title chips and the one-line summary */
.hero .czhero { position: static; flex: none; width: 36px; height: 28px; background: var(--a); }
.hero.cz-collapsed .duo, .hero.cz-collapsed .ringwrap, .hero.cz-collapsed .spdline, .hero.cz-collapsed #q-gnote, .hero.cz-collapsed .reads { display: none; }
.hero.cz-collapsed { padding-bottom: 16px; }
.hero.cz-collapsed .sub { margin-bottom: 0; }
.hero.cz-collapsed .czhero svg { transform: rotate(-90deg); }
.hero .chips { align-items: center; }

@media (prefers-reduced-motion: reduce) { .czb, .cz svg { transition: none; } }

/* "videos not saved to your phone" prompt */
.savebar { position: sticky; top: calc(8px + env(safe-area-inset-top)); z-index: 45; display: grid; gap: 10px; margin: 0 0 14px; padding: 12px 14px 12px 16px; border-radius: 10px 26px 26px 10px; border-left: 12px solid var(--e); border-top: 1px solid rgba(255,215,106,.4); border-right: 1px solid rgba(255,215,106,.25); border-bottom: 1px solid rgba(255,215,106,.25); background: rgba(18,9,38,.97); box-shadow: 0 14px 40px rgba(0,0,0,.55), 0 0 24px rgba(255,215,106,.22); }
.savebar .sbt b { display: block; font-family: var(--lcars); font-size: 19px; letter-spacing: .08em; text-transform: uppercase; color: var(--e); line-height: 1.15; }
.savebar .sbt span { font-size: 14px; opacity: .88; }
.savebar .sbb { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.savebar .sbb .primary { flex: 1 1 auto; padding: 10px 16px; font-size: 18px; }
.savebar .sbb .ghost { padding: 10px 16px; font-size: 17px; }

/* Fix: while a trip leg is recording, the leg panel (with the End leg and save button) was being hidden by the
   LIVE badge rule in quests.css, because the panel also carries the class "live". Keep it visible. */
.legbar.live { display: block; }
/* sections scrolled to from a button should not hide under the sticky save prompt */
main > .card { scroll-margin-top: 150px; }
