/* falakbin.ir/lab/cosmic-history: this lab's own rules, after sims.css (docs/plans/lab-wave3.md).
   The scene's zoom buttons, the event's card, the category dots, the tour under «why» and the list of every event. */

.flk-ch-tools { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 1; }
.flk-ch-tools .flk-icon-btn { width: 36px; height: 36px; background: rgba(10, 46, 52, .85); color: #e7f5f3; border: 1px solid rgba(147, 184, 182, .25); }
.flk-ch-tools .flk-icon-btn:hover { background: #0f3b42; }
.flk-ch-tools .flk-icon-btn .flk-i { width: 18px; height: 18px; }

/* A vertical swipe over the scene scrolls the page; sideways drags, pinches and taps are the scene's own. */
.flk-ch .flk-sim-canvas { touch-action: pan-y; }
/* The panel (card, readouts) is taller than the scene on a wide screen: the scene stays in view beside it. */
@media (min-width: 921px) {
    .flk-ch > .flk-sim-stage { position: sticky; top: calc(var(--top-h, 64px) + 12px); }
    .flk-ch.flk-sim-max > .flk-sim-stage, .flk-ch:fullscreen > .flk-sim-stage { position: relative; top: auto; }
}

.flk-ch-t-note { margin-top: -8px; }

/* The categories: the same colours as on the scene (fb-simkit.js C). */
.flk-ch-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; box-shadow: 0 0 0 1px rgba(3, 20, 26, .35); }
.flk-ch-c-k { background: #b4a8ff; }
.flk-ch-c-e { background: #ffd166; }
.flk-ch-c-l { background: #3ccf91; }
.flk-ch-c-h { background: #3fcac3; }
.flk-ch-cat { display: inline-flex; align-items: center; gap: 6px; }
.flk-ch-cat[aria-pressed="false"] { opacity: .55; text-decoration: line-through; }
.flk-ch-cat[aria-pressed="false"] .flk-ch-dot { filter: grayscale(1); }

/* The event's card. */
.flk-ch-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line-soft); }
.flk-ch-card p { margin: 0; }
.flk-ch-card-kicker { color: var(--muted); font-size: .74rem; font-weight: 700; }
.flk-ch-card-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.06rem; font-weight: 850; line-height: 1.5; }
.flk-ch-card-when { color: var(--orange-ink); font-size: .82rem; font-weight: 700; line-height: 1.8; font-variant-numeric: tabular-nums; }
.flk-ch-card-text { font-size: .9rem; line-height: 1.95; }
.flk-ch-card-src { color: var(--muted); font-size: .76rem; line-height: 1.8; }
.flk-ch-card-nav { display: flex; gap: 8px; margin-top: 4px; }
.flk-ch-card-nav .flk-btn { flex: 1 1 0; justify-content: center; border: 0; cursor: pointer; font: inherit; font-size: .84rem; padding-inline: 8px; }
.flk-ch-card-nav .flk-i { width: 16px; height: 16px; }
.flk-ch-flip { transform: scaleX(-1); }

/* The tour under «why». */
.flk-ch-tour { margin-top: 14px; }
.flk-ch-tour .flk-chip { cursor: pointer; font: inherit; font-size: .84rem; display: inline-flex; align-items: center; gap: 6px; }
.flk-ch-tour .flk-i { width: 13px; height: 13px; color: var(--orange-ink); }

/* Every event of the year. */
.flk-ch-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.flk-ch-list li { display: flex; min-width: 0; }
.flk-ch-list-wait { color: var(--muted); font-size: .88rem; }
.flk-ch-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--fg); font: inherit; text-align: start; cursor: pointer; }
.flk-ch-list button:hover { background: var(--teal-soft); }
.flk-ch-list button[aria-current="true"] { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.flk-ch-list .flk-hm-li { flex: 1; min-width: 0; }
.flk-ch-list .flk-hm-li b { font-size: .92rem; }
.flk-ch-list .flk-hm-li small { color: var(--muted); font-size: .78rem; line-height: 1.8; font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
    .flk-ch-list { grid-template-columns: minmax(0, 1fr); }
    .flk-ch-tools .flk-icon-btn { width: 34px; height: 34px; }
}

/* Comfortable touch controls, with visible keyboard focus. */
.flk-ch .flk-chip, .flk-ch .flk-sim-seg button { min-height: 44px; }
.flk-ch button:focus-visible { outline: 2px solid var(--orange-ink); outline-offset: 3px; }
