/*
 * shoot-time — tool-specific layer. Light bar, drift slider, vertical timeline,
 * warnings. Built on the Galarie token snapshot in galarie.css.
 */

/* ── App shell ────────────────────────────────────────────────────────────── */
.st-header {
    display: flex; align-items: baseline; gap: 0.6rem;
    padding: 1.4rem clamp(1rem, 4vw, 2.5rem) 1.1rem;
    border-bottom: 1px solid var(--stone-light);
    flex-wrap: wrap;
}
.st-lockup {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: var(--forest);
}
.st-toolname {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--fern);
}
.st-header .g-meta { margin-left: auto; }

.st-wrap {
    display: grid;
    grid-template-columns: minmax(280px, 340px) 1fr;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: start;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    max-width: 1180px;
    margin: 0 auto;
}
@media (max-width: 820px) {
    .st-wrap { grid-template-columns: 1fr; }
}

.st-panel { position: sticky; top: 1.5rem; }
@media (max-width: 820px) { .st-panel { position: static; } }

.st-typeswitch { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }

.st-hint { font-size: 0.82rem; color: var(--fern-muted); margin: 0.4rem 0 0; line-height: 1.4; }

.st-conditional { display: none; }
.st-conditional.is-shown { display: block; }

/* ── Result column ────────────────────────────────────────────────────────── */
.st-result { display: none; }
.st-result.is-shown { display: block; }

.st-place {
    font-family: var(--serif);
    font-size: 1.5rem;
    margin-bottom: 0.15rem;
}
.st-place-sub { color: var(--fern-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

/* ── Warnings ─────────────────────────────────────────────────────────────── */
.st-warnings { margin-bottom: 1.5rem; display: grid; gap: 0.6rem; }
.st-warn {
    display: flex; gap: 0.7rem; align-items: flex-start;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    line-height: 1.45;
}
.st-warn .st-warn-icon { flex: none; font-size: 1rem; line-height: 1.3; }
.st-warn.is-note {
    background: var(--parchment-deep);
    border: 1px solid var(--stone-light);
    color: var(--bark);
}
.st-warn.is-caution {
    background: rgba(194, 120, 92, 0.10);
    border: 1px solid var(--terracotta-soft);
    color: #8a4a30;
}
.st-warn.is-critical {
    background: rgba(155, 58, 58, 0.10);
    border: 1px solid var(--danger);
    color: var(--danger);
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(155, 58, 58, 0.12);
}

/* ── Light bar + drift slider (one component) ─────────────────────────────── */
.st-lightbox {
    background: var(--paper);
    border: 1px solid var(--stone-light);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px rgba(44, 51, 40, 0.04), 0 8px 24px rgba(44, 51, 40, 0.05);
}
.st-lightbox-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 0.9rem; gap: 1rem; flex-wrap: wrap;
}
.st-drift-time { font-family: var(--serif); font-size: 1.35rem; color: var(--forest); }
.st-drift-time small { font-family: var(--sans); font-size: 0.8rem; color: var(--fern-muted); }

.st-lightbar { position: relative; height: 58px; }
.st-lightbar-track {
    position: absolute; inset: 0;
    border-radius: var(--radius);
    /* Fallback gradient; JS replaces with band-aligned stops. */
    background: linear-gradient(90deg, #2C3328 0%, #3d4a63 8%, #8aa0c0 16%,
        #C4956A 26%, #E8DFD2 50%, #C4956A 74%, #8aa0c0 84%, #3d4a63 92%, #2C3328 100%);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(44, 51, 40, 0.10);
}
/* Golden-hour emphasis rings, positioned by JS (left/width in %). */
.st-goldband {
    position: absolute; top: 0; bottom: 0;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
    border-radius: 2px;
    pointer-events: none;
}
.st-goldband::after {
    content: 'GOLDEN'; position: absolute; top: 3px; left: 50%;
    transform: translateX(-50%);
    font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.14em;
    color: rgba(44, 51, 40, 0.7);
}
.st-suntick {
    position: absolute; top: 0; bottom: 0; width: 1px;
    background: rgba(44, 51, 40, 0.35);
    pointer-events: none;
}

/* Native range input overlaid — its thumb is the session marker. */
.st-range {
    position: absolute; left: 0; right: 0; top: 50%;
    transform: translateY(-50%);
    width: 100%; height: 58px; margin: 0;
    -webkit-appearance: none; appearance: none;
    background: transparent; cursor: grab;
}
.st-range:active { cursor: grabbing; }
.st-range:focus { outline: none; }
.st-range::-webkit-slider-runnable-track { background: transparent; height: 58px; }
.st-range::-moz-range-track { background: transparent; height: 58px; }
.st-marker-thumb {
    width: 22px; height: 58px; border-radius: 5px;
    background: var(--paper);
    border: 2px solid var(--forest);
    box-shadow: 0 2px 6px rgba(44, 51, 40, 0.35);
    cursor: grab;
}
.st-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 58px; border-radius: 5px;
    background: var(--paper); border: 2px solid var(--forest);
    box-shadow: 0 2px 6px rgba(44, 51, 40, 0.35);
    cursor: grab;
}
.st-range::-moz-range-thumb {
    width: 22px; height: 58px; border-radius: 5px;
    background: var(--paper); border: 2px solid var(--forest);
    box-shadow: 0 2px 6px rgba(44, 51, 40, 0.35);
    cursor: grab;
}

.st-bar-scale {
    position: relative; height: 1.2rem; margin-top: 0.35rem;
    font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.06em;
    color: var(--fern-muted);
}
.st-scale-label { position: absolute; transform: translateX(-50%); white-space: nowrap; }

/* Live voice readout — degrades with the drift. */
.st-readout {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    border-left: 3px solid var(--fern);
    background: var(--parchment);
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--forest);
    transition: border-color 0.2s ease;
}
.st-readout.q-ideal    { border-left-color: var(--spark); }
.st-readout.q-good     { border-left-color: var(--fern); }
.st-readout.q-workable { border-left-color: var(--terracotta-soft); }
.st-readout.q-poor     { border-left-color: var(--terracotta); }
.st-readout.q-bad      { border-left-color: var(--danger); }
.st-readout .st-readout-band {
    font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--fern-muted); display: block;
    margin-bottom: 0.25rem;
}

.st-advisory {
    margin-top: 0.9rem; font-size: 0.8rem; color: var(--fern-muted);
    line-height: 1.45; display: flex; gap: 0.5rem;
}
.st-advisory .st-advisory-icon { flex: none; }

.st-reset {
    margin-top: 0.9rem; font-size: 0.82rem;
    display: inline-flex; align-items: center; gap: 0.4rem;
}

/* ── Vertical timeline ────────────────────────────────────────────────────── */
.st-timeline-wrap {
    background: var(--paper);
    border: 1px solid var(--stone-light);
    border-radius: var(--radius-card);
    padding: 1.75rem;
    box-shadow: 0 1px 2px rgba(44, 51, 40, 0.04), 0 8px 24px rgba(44, 51, 40, 0.05);
}
.st-timeline-title { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 1.25rem; }

.st-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.st-timeline::before {
    content: ''; position: absolute; left: 4.7rem; top: 0.4rem; bottom: 0.4rem;
    width: 2px; background: var(--stone-light);
}
.st-tl-item {
    position: relative; display: grid;
    grid-template-columns: 4rem 1fr; gap: 1.1rem;
    padding: 0.55rem 0; align-items: start;
}
.st-tl-time {
    font-family: var(--mono); font-size: 0.72rem; color: var(--fern-light);
    text-align: right; padding-top: 0.1rem; white-space: nowrap;
}
.st-tl-body { position: relative; padding-left: 0.7rem; }
.st-tl-body::before {
    content: ''; position: absolute; left: -0.72rem; top: 0.35rem;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--paper); border: 2px solid var(--fern-muted);
}
.st-tl-item.is-golden .st-tl-body::before { background: var(--spark); border-color: var(--spark); }
.st-tl-item.is-sun .st-tl-body::before { background: var(--terracotta); border-color: var(--terracotta); }
.st-tl-item.is-ceremony .st-tl-body::before { background: var(--fern); border-color: var(--fern); width: 11px; height: 11px; left: -0.78rem; }

.st-tl-label { font-weight: 500; font-size: 0.95rem; }
.st-tl-item.is-golden .st-tl-label { color: #9a7b2e; }
.st-tl-item.is-sun .st-tl-label { color: var(--terracotta); }
.st-tl-note { font-size: 0.83rem; color: var(--fern-muted); margin-top: 0.15rem; line-height: 1.45; }
.st-tl-dur {
    font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.08em;
    color: var(--fern-muted); text-transform: uppercase;
}

/* ── Email gate / takeaway ────────────────────────────────────────────────── */
.st-takeaway {
    margin-top: 1.5rem; padding: 1.5rem;
    border: 1px dashed var(--fern-muted);
    border-radius: var(--radius-card);
    background: var(--parchment-deep);
}
.st-takeaway h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.st-takeaway p { font-size: 0.88rem; color: var(--bark); margin: 0 0 1rem; }
.st-capture-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.st-capture-row .g-input { flex: 1 1 12rem; }
.st-capture-status { font-size: 0.85rem; margin-top: 0.6rem; min-height: 1.1rem; }
.st-capture-status.is-ok { color: var(--success); }
.st-capture-status.is-err { color: var(--danger); }
.st-unlocked { display: none; gap: 0.6rem; margin-top: 1rem; flex-wrap: wrap; }
.st-unlocked.is-shown { display: flex; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.st-footer {
    text-align: center; padding: 2.5rem 1.5rem 3rem;
    border-top: 1px solid var(--stone-light);
    margin-top: 2rem;
}
.st-footer p { font-size: 0.85rem; color: var(--fern-muted); margin: 0 0 0.6rem; }
.st-cta { font-family: var(--serif); font-style: italic; color: var(--fern); }

/* ── Guided empty state ───────────────────────────────────────────────────── */
.st-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 52vh; text-align: center; padding: 2.5rem 1.5rem;
}
.st-empty-sun {
    width: 132px; height: 66px; margin-bottom: 1.5rem; position: relative; overflow: hidden;
    border-radius: 132px 132px 0 0;
    background: linear-gradient(180deg, #E8DFD2 0%, #C4956A 55%, #B5744C 100%);
    box-shadow: 0 10px 30px rgba(194, 120, 92, 0.28);
}
.st-empty-sun::after {
    content: ''; position: absolute; left: 50%; bottom: 0; width: 54px; height: 27px;
    transform: translateX(-50%); border-radius: 54px 54px 0 0; background: #F0E9DC;
    animation: st-rise 4.5s var(--ease-soft) infinite alternate;
}
@keyframes st-rise { from { bottom: -6px; } to { bottom: 10px; } }
.st-empty-title { font-family: var(--serif); font-size: 1.55rem; margin-bottom: 0.6rem; max-width: 22ch; }
.st-empty-sub { color: var(--fern-muted); font-size: 0.98rem; line-height: 1.6; max-width: 46ch; margin: 0; }

/* ── Actions row + panel note ─────────────────────────────────────────────── */
.st-actions { display: flex; gap: 0.6rem; margin-top: 1.5rem; flex-wrap: wrap; }
.st-panel-note { display: block; text-align: center; margin-top: 0.9rem; }
.st-edit-hint { font-weight: 400; margin-left: 0.5rem; }
.st-kbd {
    font-family: var(--mono); font-size: 0.62rem; background: var(--parchment-deep);
    border: 1px solid var(--stone); border-radius: 4px; padding: 0.05rem 0.3rem; color: var(--fern-light);
}

/* ── Timeline edit affordances ────────────────────────────────────────────── */
.st-tl-head { display: flex; align-items: baseline; gap: 0.5rem; }
.st-tl-reorder { display: inline-flex; gap: 0.1rem; margin-left: auto; }
.st-move {
    font: inherit; font-size: 0.6rem; line-height: 1; cursor: pointer;
    border: 1px solid var(--stone); background: var(--paper); color: var(--fern-light);
    border-radius: 4px; padding: 0.15rem 0.3rem; transition: all 0.15s var(--ease, ease);
}
.st-move:hover { border-color: var(--fern); color: var(--fern); }
.st-dur-handle {
    display: inline-block; margin-top: 0.35rem; cursor: ew-resize; touch-action: none;
    background: var(--parchment-deep); border: 1px solid var(--stone-light);
    border-radius: var(--radius-pill); padding: 0.1rem 0.5rem;
    color: var(--fern-light); transition: border-color 0.15s var(--ease, ease), background 0.15s;
}
.st-dur-handle:hover { border-color: var(--fern-muted); background: var(--stone-light); }
.st-tl-item.is-adjustable .st-tl-body::before { border-style: dashed; }
body.st-dragging { cursor: ew-resize; user-select: none; }

/* ── Build + drift animations (Galarie easing) ────────────────────────────── */
:root { --ease: cubic-bezier(.22,.61,.36,1); --ease-soft: cubic-bezier(.4,0,.2,1); }

.st-result.is-fresh .st-lightbar-track { animation: st-bar-bloom 0.9s var(--ease-soft) both; }
@keyframes st-bar-bloom {
    0% { opacity: 0; filter: saturate(.3) brightness(1.15) blur(6px); transform: scaleX(.98); }
    100% { opacity: 1; filter: none; transform: none; }
}
.st-result.is-fresh .st-drift-time,
.st-result.is-fresh #st-readout { animation: st-fade-up 0.6s var(--ease) both; animation-delay: 0.2s; }
@keyframes st-fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.st-tl-item.is-in { animation: st-item-in 0.5s var(--ease) both; animation-delay: var(--st-delay, 0ms); }
@keyframes st-item-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

#st-readout { transition: border-color 0.25s var(--ease, ease); }

/* ── PRO block: white-label + share (email-unlocked) ──────────────────────── */
.st-pro {
    margin-top: 1.5rem; padding: 1.5rem;
    border: 1px dashed var(--fern-muted);
    border-radius: var(--radius-card);
    background: var(--parchment-deep);
}
.st-pro h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.st-pro p { font-size: 0.88rem; color: var(--bark); margin: 0 0 1rem; }
.st-pro-sub { font-size: 0.82rem; }
.st-pro-sub a { font-weight: 500; }
.st-pc-invite { margin-top: 0.85rem; align-items: flex-start; line-height: 1.4; }

.st-brand-row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.st-logo-btn { position: relative; cursor: pointer; }
.st-brand-preview {
    max-height: 40px; max-width: 120px; object-fit: contain;
    background: var(--paper); border: 1px solid var(--stone-light);
    border-radius: var(--radius); padding: 3px 6px;
}
.st-share-row { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; margin-top: 1.1rem; }

/* Branded header — shown on screen (a preview) and on the printed takeaway */
.st-print-brand {
    display: none; align-items: center; gap: 0.7rem;
    padding-bottom: 0.9rem; margin-bottom: 1rem;
    border-bottom: 1px solid var(--stone-light);
}
.st-print-brand img { max-height: 44px; max-width: 160px; object-fit: contain; }
.st-print-brand span { font-family: var(--serif); font-size: 1.1rem; color: var(--forest); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .st-tl-item.is-in, .st-result.is-fresh .st-lightbar-track,
    .st-result.is-fresh .st-drift-time, .st-result.is-fresh #st-readout { opacity: 1 !important; filter: none !important; transform: none !important; }
}
