/* falakbin.ir/lab/<slug>: the simulators (SimPages, Views/public/sim_*).
   A scene and its panel side by side, the panel under it on a phone; the
   scene is dark on both themes, since it is space (and the night map). */

.flk-sim-hero .flk-kicker a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.flk-sim-hero .flk-kicker a:hover { color: var(--orange-hi); }

.flk-sim { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; margin-top: 18px; align-items: start; }
.flk-sim-pair { display: flex; flex-direction: column; gap: 0; }
.flk-sim-stage {
    position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line);
    background: #03141a; min-height: 300px; box-shadow: var(--shadow);
}
.flk-sim-canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.flk-sim-canvas:active { cursor: grabbing; }
.flk-sim-stage-map .flk-sim-canvas, .flk-sim-energy .flk-sim-canvas { touch-action: manipulation; cursor: crosshair; }
.flk-sim-energy .flk-sim-canvas { cursor: default; }
.flk-sim-wait { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: #8fb2b0; font-size: .9rem; }
.flk-sim-wait .flk-i { width: 22px; height: 22px; color: #6fe0d8; }
.flk-sim-hud { position: absolute; top: 12px; inset-inline-end: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 0; pointer-events: none; }
.flk-sim-hud b { color: #e7f5f3; font-size: 1.05rem; font-weight: 850; text-shadow: 0 1px 6px #03141a; }
.flk-sim-hud small { color: #8fb2b0; font-size: .78rem; text-shadow: 0 1px 6px #03141a; }
.flk-sim-tools { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; flex-direction: column; gap: 6px; }
.flk-sim-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-sim-tools .flk-icon-btn:hover { background: #0f3b42; }
.flk-sim-minus { display: block; width: 14px; height: 2px; border-radius: 2px; background: currentColor; }
.flk-sim-hint { margin: 0; padding: 7px 14px 9px; border-top: 1px solid rgba(147, 184, 182, .14); color: #8fb2b0; font-size: .78rem; line-height: 1.7; }

.flk-sim-panel { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.flk-sim-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.flk-sim-row .flk-btn { border: 0; cursor: pointer; font: inherit; font-size: .9rem; }
.flk-sim-row-sm { margin-top: -6px; }
.flk-sim-row-sm .flk-chip, .flk-sim-chips .flk-chip { cursor: pointer; font: inherit; font-size: .82rem; }
.flk-sim-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.flk-chip[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-ink); }
.flk-chip[hidden] { display: none; }
.flk-sim-pace { color: var(--muted); font-size: .84rem; margin-inline-start: auto; }
.flk-sim-pace b { color: var(--fg); font-variant-numeric: tabular-nums; }
.flk-sim-ctl { display: flex; flex-direction: column; gap: 8px; }
.flk-sim-ctl-head { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .84rem; font-weight: 700; }
.flk-sim-ctl-head .flk-sim-out { color: var(--fg); font-weight: 800; font-variant-numeric: tabular-nums; }
.flk-sim-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 12px; }
.flk-sim-seg button { flex: 1 1 auto; padding: 5px 8px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.flk-sim-seg button:hover { color: var(--fg); }
.flk-sim-seg button[aria-pressed="true"] { background: var(--teal-soft); color: var(--teal-ink); }
.flk-sim-select { font: inherit; font-size: .9rem; color: var(--fg); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.flk-sim-note { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.9; }
.flk-sim-key { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-inline-end: 5px; }
.flk-sim-key-p { background: #3fcac3; } .flk-sim-key-s { background: #ff8c1a; }
.flk-sim-p { color: var(--teal-ink); } .flk-sim-s { color: var(--orange-ink); }

.flk-sim-read { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: 0; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.flk-sim-read div { min-width: 0; }
.flk-sim-read-wide { grid-column: 1 / -1; }
.flk-sim-read dt { color: var(--muted); font-size: .76rem; }
.flk-sim-read dd { margin: 2px 0 0; font-weight: 800; font-size: .98rem; font-variant-numeric: tabular-nums; line-height: 1.6; }
.flk-sim-read dd small { display: block; color: var(--muted); font-weight: 600; font-size: .78rem; }
.flk-sim-hit { color: var(--orange-ink); }

.flk-sim-about .flk-sim-cols { columns: 2 320px; column-gap: 32px; max-width: none; }
.flk-sim-about .flk-sim-cols p { break-inside: avoid; margin-top: 0; }

.flk-sim-events { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.flk-sim-events li { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.flk-sim-events button, .flk-sim-static { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; background: none; border: 0; color: var(--fg); font: inherit; text-align: start; }
.flk-sim-events button { cursor: pointer; }
.flk-sim-events button:hover { background: var(--teal-soft); }
.flk-sim-events .flk-hm-li { flex: 1; }
.flk-sim-events .flk-hm-li small { line-height: 1.8; }
.flk-sim-go { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--orange-ink); font-size: .78rem; font-weight: 800; }
.flk-sim-go .flk-i { width: 14px; height: 14px; }
.flk-sim-more { padding: 0 14px 10px; padding-inline-start: 64px; margin-top: -6px; color: var(--teal-ink); font-size: .8rem; text-decoration: none; }
.flk-sim-more:hover { text-decoration: underline; }

/* The earthquake bot's magnitude badges (as on the home page's card). */
.flk-hm-mag { flex: none; width: 3rem; text-align: center; font-weight: 900; font-size: 1rem; border-radius: 10px; padding: 4px 0; color: #1a0d00; font-variant-numeric: tabular-nums; }
.flk-hm-mag-a { background: #e9c46a; } .flk-hm-mag-b { background: #f4a259; } .flk-hm-mag-c { background: #ff8c1a; }
.flk-hm-mag-d { background: #f2542d; color: #fff; } .flk-hm-mag-e { background: #c81d25; color: #fff; }

@media (max-width: 920px) {
    .flk-sim { grid-template-columns: minmax(0, 1fr); }
    .flk-sim-read { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 560px) {
    .flk-sim { gap: 10px; margin-top: 12px; }
    .flk-sim-panel { padding: 14px 12px; }
    .flk-sim-read { grid-template-columns: 1fr 1fr; }
    .flk-sim-events { grid-template-columns: minmax(0, 1fr); }
}
.flk-sim-canvas:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: -2px; }

/* The bar under a scene (fb-simkit.js tools()): its hint, then share, picture and the whole screen. */
.flk-sim-bar { display: flex; align-items: center; gap: 6px; border-top: 1px solid rgba(147, 184, 182, .14); padding-inline-end: 6px; min-height: 40px; }
.flk-sim-bar .flk-sim-hint { flex: 1 1 auto; border-top: 0; }
.flk-sim-bar-tools { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.flk-sim-bar-tools .flk-icon-btn { width: 34px; height: 34px; border-radius: 10px; color: #cfe9e6; }
.flk-sim-bar-tools .flk-icon-btn:hover { background: rgba(63, 202, 195, .18); }
.flk-sim-bar-tools .flk-icon-btn .flk-i { width: 19px; height: 19px; }
.flk-sim-said { color: #8fb2b0; font-size: .76rem; padding-inline-end: 6px; }
/* The whole screen: the browser's own, or (an iPhone) the section over the page. */
.flk-sim:fullscreen { margin: 0; padding: 14px; background: var(--bg); overflow-y: auto; align-content: start; }
.flk-sim.flk-sim-max { position: fixed; inset: 0; z-index: 50; margin: 0; padding: 12px; background: var(--bg); overflow-y: auto; align-content: start; }
