/* ============================================================
   simulator.css — overrides for simulator.html
   Loaded AFTER styles.css and player.css.
   ============================================================ */

/* ── Hide elements kept in DOM only for app.js compatibility ── */
#playerHdrFavBtn,
#timelineCanvas,
#currentTimeDisp,
#totalTimeDisp,
#btnSkipStart,
#btnStepBack,
#btnStepFwd,
#btnSkipEnd,
#btnSimMode,
#btnDualLead,
#btnCreateClip {
    display: none !important;
}

/* ── Multi-lead clip lead switcher (PTB-XL clips) ───────────────────── */
/* The pill row is empty by default; simulator-ui.js populates it when a
   multi-lead clip becomes active and removes the .hidden class. */
#playerHdrLeads.hidden { display: none !important; }
#playerHdrLeads:empty  { display: none !important; }


/* Always-visible simPanel (no hidden attribute on this page) */
#simPanel {
    display: block;
}

/* Header subtitle uses italic for "no rhythm yet" placeholder */
.player-hdr-sub {
    font-style: italic;
    color: #707882;
}
.player-hdr-sub.has-rhythm {
    font-style: normal;
    color: #404750;
}

/* ── Simulator playbar ── */
.sim-playbar {
    /* Inherits .player-playbar — no override needed */
}

.sim-rec-wrap {
    flex: 1;
    height: 50px;
    position: relative;
    display: flex;
    align-items: stretch;
    background: #f7fafe;
    border-radius: 6px;
    border: 1px solid #e5e8ec;
    overflow: hidden;
}

#simRecCanvas {
    flex: 1;
    height: 100%;
    width: 100%;
    cursor: ew-resize;
    display: block;
}

/* ── LIVE button / indicator ── */
.sim-live-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(43, 194, 107, 0.08);
    border: 1px solid rgba(43, 194, 107, 0.32);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #1a7a3f;
    cursor: default;
    user-select: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.sim-live-btn.scrubbed {
    background: rgba(245, 158, 11, 0.10);
    border-color: rgba(245, 158, 11, 0.42);
    color: #a85f02;
    cursor: pointer;
}
.sim-live-btn.scrubbed:hover {
    background: rgba(245, 158, 11, 0.18);
}

.sim-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2bc26b;
    box-shadow: 0 0 8px rgba(43, 194, 107, 0.7);
    animation: simLivePulse 1.4s ease-in-out infinite;
}
.sim-live-btn.scrubbed .sim-live-dot {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
    animation: none;
}

@keyframes simLivePulse {
    0%, 100% { opacity: 1;    transform: scale(1); }
    50%      { opacity: 0.55; transform: scale(0.85); }
}

/* ── Scrub-mode indicator on the recording canvas wrap ── */
.sim-rec-wrap.scrubbed {
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.15);
}

/* ── Elapsed sim time label (replaces #currentTimeDisp) ── */
#simElapsed {
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    font-weight: 600;
    color: #404750;
    min-width: 56px;
    text-align: right;
    padding-right: 4px;
}

/* ── simPanel: remove hidden=block flicker, give a touch of breathing room
         on the simulator page where it is always visible ── */
#ecgCard #simPanel {
    border-top: 1px solid #e5e8ec;
}
