/* ============================================================================
 * BigBreakingWire Prime — Premium: Chart Terminal
 * ----------------------------------------------------------------------------
 * Scoped override layer for the equity terminal root #pcShell (F&O shell
 * #pcFnoShell is intentionally untouched).
 *
 * ENGINE PROTECTION (verified against chart.js inventory):
 * - NEVER touches .pc-canvas-wrap heights, .pc-body / .pc-main / .pc-grid /
 *   .pc-cell / .pc-canvas geometry: chart.js measures wrap.clientWidth /
 *   Height and maps DPR pixels itself. No canvas, height, width, overflow,
 *   position, display or z-index rules anywhere in this file.
 * - Cosmetic ONLY inside .pc-head / .pc-bar / .pc-panel / .pc-modal /
 *   .pc-landing / .pc-replay / .pc-drawbar / .ph-*: color, background,
 *   border, radius, shadow, font, padding, gap. No !important.
 * - All 60+ #pc* ids, canvas listeners (pan/draw/pinch/wheel), prefs,
 *   drawings, alerts, replay and multi-chart state are untouched (JS/PHP
 *   unmodified). Charts keep rendering on live canvas — no screenshots.
 * ========================================================================== */

/* ---- Landing ------------------------------------------------------------------ */
#pcShell .pc-landing { max-width: 640px; margin: 34px auto; padding: 0 18px; }
#pcShell .pc-landing h1 { font-size: 24px; font-weight: 800; letter-spacing: -.3px; color: var(--bbw-ink, #0b1526); }
#pcShell .pc-search-field {
    border: 1px solid var(--bbw-border-strong, #cfd8e3); border-radius: 12px;
    background: var(--bbw-surface, #ffffff);
    box-shadow: var(--bbw-shadow-sm, 0 1px 2px rgba(11, 21, 38, .05));
    transition: border-color .18s ease, box-shadow .18s ease;
}
#pcShell .pc-search-field:focus-within {
    border-color: var(--bbw-blue, #1e56e0);
    box-shadow: 0 0 0 3px rgba(30, 86, 224, .12);
}
#pcShell .pc-search-field input { font-size: 14px; font-weight: 600; }
#pcShell .pc-search-field input::placeholder { color: var(--bbw-ink-3, #8a97ab); }
#pcShell .pc-results {
    border-radius: 14px; border: 1px solid var(--bbw-border-strong, #cfd8e3);
    box-shadow: 0 12px 40px rgba(11, 21, 38, .18);
}
#pcShell .pc-result { border-radius: 9px; padding: 10px 13px; }
#pcShell .pc-result:hover { background: var(--bbw-blue-soft, #eef3ff); }
#pcShell .chip {
    border-radius: 999px; border: 1px solid var(--bbw-border, #e2e7ee);
    font-size: 12px; font-weight: 700; color: var(--bbw-ink-2, #46556c);
    padding: 6px 13px; background: var(--bbw-surface, #ffffff);
    transition: border-color .12s ease, color .12s ease, background .12s ease;
}
#pcShell .chip:hover { border-color: var(--bbw-blue, #1e56e0); color: var(--bbw-blue, #1e56e0); background: var(--bbw-blue-soft, #eef3ff); }

/* ---- Symbol header -------------------------------------------------------------- */
#pcShell .pc-head { padding: 14px 18px 8px; gap: 10px; }
#pcShell .pc-sym { font-size: 21px; font-weight: 800; letter-spacing: -.3px; color: var(--bbw-ink, #0b1526); }
#pcShell .pc-cname { font-size: 12.5px; font-weight: 600; color: var(--bbw-ink-2, #46556c); }
#pcShell .pc-tags { gap: 6px; }
#pcShell .pc-head-quote {
    font-size: 15px; font-weight: 800; color: var(--bbw-ink, #0b1526);
    font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
}

/* ---- Toolbar --------------------------------------------------------------------- */
#pcShell .pc-bar { gap: 8px; padding: 8px 14px; }
#pcShell .pc-btn {
    border-radius: 9px; border: 1px solid transparent;
    font-size: 12.5px; font-weight: 700; color: var(--bbw-ink-2, #46556c);
    padding: 7px 12px; background: transparent; font-family: inherit; cursor: pointer;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}
#pcShell .pc-btn:hover { background: var(--bbw-surface-2, #f7f9fb); color: var(--bbw-ink, #0b1526); }
#pcShell .pc-btn.active { background: var(--bbw-blue-soft, #eef3ff); color: var(--bbw-blue, #1e56e0); border-color: rgba(30, 86, 224, .25); }
#pcShell .pc-btn:focus-visible { outline: 2px solid var(--bbw-blue, #1e56e0); outline-offset: 1px; }
#pcShell .pc-select {
    border-radius: 9px; border: 1px solid var(--bbw-border-strong, #cfd8e3);
    font-size: 12.5px; font-weight: 700; color: var(--bbw-ink, #0b1526);
    padding: 7px 10px; background: var(--bbw-surface, #ffffff); font-family: inherit;
}
#pcShell .pc-select:focus { border-color: var(--bbw-blue, #1e56e0); box-shadow: 0 0 0 3px rgba(30, 86, 224, .12); outline: none; }
#pcShell .pc-status {
    font-size: 11.5px; font-weight: 700; color: var(--bbw-ink-2, #46556c);
    background: var(--bbw-surface-2, #f7f9fb);
    border: 1px solid var(--bbw-border, #e2e7ee);
    padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
#pcShell .pc-toolbar-hint { font-size: 11.5px; color: var(--bbw-ink-3-text, #5c6b80); }
#pcShell .pc-drawbar { gap: 6px; padding: 7px 14px; border-top: 1px solid var(--bbw-border, #e2e7ee); }
#pcShell .pc-replay { gap: 8px; padding: 8px 14px; border-top: 1px solid var(--bbw-border, #e2e7ee); }
#pcShell .pc-replay button {
    border-radius: 8px; border: 1px solid var(--bbw-border, #e2e7ee);
    background: var(--bbw-surface, #ffffff); font-family: inherit;
    font-size: 12px; font-weight: 700; color: var(--bbw-ink-2, #46556c);
    padding: 6px 11px; cursor: pointer;
}
#pcShell .pc-replay button:hover { border-color: var(--bbw-blue, #1e56e0); color: var(--bbw-blue, #1e56e0); }

/* ---- Legend / overlays (typography only; geometry + pointer events untouched) ------- */
#pcShell .pc-legend { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
#pcShell .pc-overlay-note { font-size: 11px; font-weight: 600; }
#pcShell .pc-pattern-read { border-radius: 8px; font-size: 12px; font-weight: 700; padding: 5px 10px; }
#pcShell .pc-loading, #pcShell .pc-error { border-radius: 12px; font-size: 13px; font-weight: 600; }

/* ---- Snapshot panel --------------------------------------------------------------- */
#pcShell .pc-panel { border-left: 1px solid var(--bbw-border, #e2e7ee); background: var(--bbw-surface, #ffffff); }
#pcShell .pc-panel-inner { padding: 16px; }
#pcShell .pc-kv { padding: 7px 0; border-bottom: 1px solid var(--bbw-border, #e2e7ee); font-size: 12.5px; }
#pcShell .pc-kv:last-child { border-bottom: none; }

/* ---- Modals ------------------------------------------------------------------------ */
#pcShell .pc-modal-card { border-radius: 16px; box-shadow: 0 12px 40px rgba(11, 21, 38, .18); }
#pcShell .pc-modal-head { padding: 18px 20px 10px; }
#pcShell .pc-modal-body { padding: 6px 20px 18px; }
#pcShell .pc-modal-foot { padding: 12px 20px 18px; gap: 8px; }
#pcShell .pc-modal input[type="text"],
#pcShell .pc-modal input[type="search"],
#pcShell .pc-modal select {
    border-radius: 9px; border: 1px solid var(--bbw-border-strong, #cfd8e3);
    font-size: 13px; padding: 8px 12px; font-family: inherit;
}
#pcShell .pc-modal input:focus,
#pcShell .pc-modal select:focus { border-color: var(--bbw-blue, #1e56e0); box-shadow: 0 0 0 3px rgba(30, 86, 224, .12); outline: none; }

/* ---- Multi-chart cells (chrome only; grid + body geometry untouched) ------------------- */
#pcShell .pc-cell { border: 1px solid var(--bbw-border, #e2e7ee); border-radius: 12px; }
#pcShell .pc-cell.active { border-color: var(--bbw-blue, #1e56e0); }
#pcShell .pc-cell-head { padding: 8px 12px; gap: 8px; }
#pcShell .pc-cell-sym { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---- Pattern history under chart --------------------------------------------------------- */
#pcShell .ph-card { border-radius: 12px; border: 1px solid var(--bbw-border, #e2e7ee); }
#pcShell .ph-table thead th {
    font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
    color: var(--bbw-ink-3-text, #5c6b80); background: var(--bbw-surface-2, #f7f9fb);
    padding: 9px 13px;
}
#pcShell .ph-table tbody td { padding: 9px 13px; font-variant-numeric: tabular-nums; }
#pcShell .ph-table tbody tr:hover td { background: var(--bbw-surface-2, #f7f9fb); }

/* ---- Responsive (type/spacing only; heights owned by engine CSS) ---------------------------- */
@media (max-width: 900px) {
    #pcShell .pc-head { padding: 12px 14px 6px; }
    #pcShell .pc-sym { font-size: 18px; }
    #pcShell .pc-bar { padding: 7px 10px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    #pcShell .pc-btn, #pcShell .chip, #pcShell .pc-search-field,
    #pcShell .pc-select, #pcShell .pc-replay button { transition: none; }
}
#pcShell button:focus-visible,
#pcShell a:focus-visible,
#pcShell select:focus-visible,
#pcShell input:focus-visible { outline: 2px solid var(--bbw-blue, #1e56e0); outline-offset: 2px; }
