﻿/* ===== Trade Setups / Earnings Reversals / Earnings Spikes ===== */
.scr-page {
    max-width: 1240px;
    margin: 0 auto;
    padding: 8px 16px 40px;
}

.scr-head {
    margin: 12px 0 16px;
}

.scr-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.scr-title-icon {
    color: var(--ew-gold, #DDB785);
    flex: none;
}

.scr-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    max-width: 820px;
    line-height: 1.45;
}

.scr-locked {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    background: var(--surface);
}

    .scr-locked p {
        color: var(--text-muted);
        margin: 0 0 14px;
    }

.scr-upgrade {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 8px;
    background: var(--ew-gold, #DDB785);
    color: #23324a;
    font-weight: 700;
    text-decoration: none;
}

/* ---- controls ---- */
.scr-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-bottom: 8px;
}

.scr-dirs,
.scr-sorts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.scr-dir-btn,
.scr-sort-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
}

    .scr-dir-btn:hover,
    .scr-sort-btn:hover {
        border-color: var(--ew-gold, #DDB785);
    }

    .scr-sort-btn.is-active {
        background: var(--ew-gold, #DDB785);
        border-color: var(--ew-gold, #DDB785);
        color: #23324a;
    }

    /* direction keeps its own color so the page state is obvious */
    .scr-dir-btn.is-active[data-scrdirection="bull"] {
        background: var(--positive, #0F8A3B);
        border-color: var(--positive, #0F8A3B);
        color: #fff;
    }

    .scr-dir-btn.is-active[data-scrdirection="bear"] {
        background: var(--ew-darkred, #A91E1E);
        border-color: var(--ew-darkred, #A91E1E);
        color: #fff;
    }

/* ---- filters ---- */
.scr-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.scr-filter {
    display: flex;
    align-items: center;
    gap: 4px;
}

.scr-filter-lbl {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-right: 2px;
}

.scr-fbtn {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
}

    .scr-fbtn:hover {
        border-color: var(--ew-gold, #DDB785);
        color: var(--text);
    }

    .scr-fbtn.is-active {
        background: var(--ew-gold, #DDB785);
        border-color: var(--ew-gold, #DDB785);
        color: #23324a;
    }

.scr-filter-range {
    gap: 6px;
}

/* dual-handle momentum range: two stacked sliders over one rail */
.scr-range {
    position: relative;
    width: 132px;
    height: 20px;
    flex: none;
}

.scr-range-rail,
.scr-range-fill {
    position: absolute;
    top: 50%;
    height: 4px;
    border-radius: 2px;
    transform: translateY(-50%);
    pointer-events: none;
}

.scr-range-rail {
    left: 0;
    right: 0;
    background: var(--border);
}

.scr-range-fill {
    background: var(--ew-gold, #DDB785);
}

.scr-range input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 20px;
    margin: 0;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

    .scr-range input[type="range"]:focus-visible {
        outline: 2px solid var(--ew-gold, #DDB785);
        outline-offset: 2px;
        border-radius: 4px;
    }

    .scr-range input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        pointer-events: auto;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: var(--surface);
        border: 2px solid var(--ew-gold, #DDB785);
        cursor: grab;
    }

    .scr-range input[type="range"]::-moz-range-thumb {
        pointer-events: auto;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: var(--surface);
        border: 2px solid var(--ew-gold, #DDB785);
        cursor: grab;
    }

    .scr-range input[type="range"]::-moz-range-track {
        background: none;
        border: none;
    }

.scr-range-val {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 60px;
}

.scr-count {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 12px;
}

/* ---- card grid ---- */
.scr-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.scr-card {
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

    .scr-card.is-up {
        border-left-color: var(--positive, #0F8A3B);
    }

    .scr-card.is-down {
        border-left-color: var(--negative, #c62828);
    }

.scr-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 12px;
}

.scr-logo-wrap {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-alt, #f6f7f9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.scr-headgauge {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    flex: none;
}

.scr-headgauge-cap {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.scr-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.scr-id {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.scr-ticker {
    font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
    font-size: 23px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
}

    .scr-ticker:hover {
        color: var(--ew-gold, #DDB785);
    }

.scr-company {
    font-size: 12.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scr-stat-sub {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}


.scr-confirm.is-confirmed {
    color: var(--positive, #0F8A3B);
}

.scr-confirm.is-unconfirmed {
    color: #c99a2e;
}

/* ---- stat strip ---- */
.scr-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    padding: 10px 8px 11px;
    gap: 4px;
}

.scr-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    min-width: 0;
    text-align: center;
}

.scr-stat-lbl {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* The confirm mark sits ON the date's line. This is a flex row rather than relying on
   the SVG being inline — a global `svg { display: block }` would otherwise push the
   date onto a second line and open a gap under the label. */
.scr-stat-val {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    font-size: 15.5px;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

    .scr-stat-val .scr-confirm,
    .scr-next .scr-confirm {
        flex: 0 0 auto;
        display: block;
    }

.scr-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
}

.scr-stat-val.is-pos {
    color: var(--positive, #0F8A3B);
}

.scr-stat-val.is-neg {
    color: var(--negative, #c62828);
}

/* ---- what the screen found, in words ---- */
.scr-thesis {
    margin: 0;
    padding: 10px 16px 11px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

    .scr-thesis svg {
        flex: none;
        margin-top: 3px;
    }

/* ---- gauge strip ---- */
.scr-gauges {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 6px;
    flex-wrap: wrap;
    padding: 2px 16px 10px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.scr-gauge {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.scr-gauge-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

    .scr-gauge-svg svg {
        display: block;
    }

.scr-gauge-cap {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    text-align: center;
}

.scr-mring-host {
    min-height: 56px;
}

.scr-mring-track {
    stroke: var(--border);
    stroke-width: 6;
}

.scr-mring-arc {
    stroke-width: 6;
    stroke-linecap: butt;
}

    .scr-mring-arc.is-pos {
        stroke: var(--positive, #0F8A3B);
    }

    .scr-mring-arc.is-neg {
        stroke: var(--negative, #c62828);
    }

.scr-mring-val {
    font-size: 13px;
    font-weight: 800;
    fill: var(--text);
}

    .scr-mring-val.is-pos {
        fill: var(--positive, #0F8A3B);
    }

    .scr-mring-val.is-neg {
        fill: var(--negative, #c62828);
    }

.scr-gauge-note {
    font-size: 9.5px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
    opacity: 0.85;
}


/* ---- mini chart ----
   EWMiniChart absolutely positions its mount inside the container, so the slot needs
   an explicit height or it collapses to nothing. */
.scr-chart {
    position: relative;
    height: 208px;
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 4px 4px 0;
}

/* ---- misc ---- */
.scr-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 50px 0;
    font-size: 14px;
}

.scr-loader {
    display: flex;
    justify-content: center;
    padding: 60px 0;
}

.scr-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 4px solid var(--border);
    border-top-color: var(--ew-gold, #DDB785);
    animation: scr-spin 0.8s linear infinite;
}

@keyframes scr-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---- responsive ---- */
@media (max-width: 760px) {
    .scr-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 460px) {
    .scr-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .scr-stat:nth-child(3) {
        border-left: none;
    }

    .scr-stat:nth-child(n+3) {
        border-top: 1px solid var(--border);
    }

    .scr-card-head {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scr-spinner {
        animation-duration: 2.4s;
    }
}
