﻿/* ============================================================
   movers.css — Today's Earnings Movers (EW2027).
   Prefix is mv-. Uses ew-theme.css tokens; no Bootstrap.
   ============================================================ */

.mv-page {
    max-width: 1240px;
    margin: 0 auto;
    padding: 8px 16px 48px;
}

/* ---- head ---- */
.mv-head {
    margin: 12px 0 18px;
}

.mv-title {
    font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    color: var(--text);
    margin: 0 0 6px;
    letter-spacing: -.01em;
}

.mv-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 10px;
    max-width: 80ch;
}

.mv-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.mv-stat b {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

    .mv-stat b.is-pos {
        color: var(--positive, #0F8A3B);
    }

    .mv-stat b.is-neg {
        color: var(--negative, #c62828);
    }

.mv-stamp {
    margin-left: auto;
}

/* ---- panels ---- */
.mv-panel {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    padding: 12px 14px 14px;
    margin-bottom: 16px;
}

.mv-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.mv-panel-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    margin: 0;
}

.mv-cap {
    font-size: 11.5px;
    color: var(--text-muted);
    max-width: 62ch;
}

.mv-empty,
.mv-loading {
    text-align: center;
    color: var(--text-muted);
    padding: 36px 0;
    font-size: 14px;
}

/* ---- outsized cards ----
   Same shape as the volatility grid: ticker, faded logo, two label/value rows. Dense on
   purpose — this shows ~40 names in the height a bar chart spent on 12. */
.mv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
    gap: 2px;
}

.mv-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 118px;
    padding: 8px 9px 9px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    background: var(--surface-alt, #f6f7f9);
    transition: background-color .12s;
}

    .mv-card.is-up {
        background: color-mix(in srgb, var(--positive, #0F8A3B) 26%, var(--surface));
    }

    .mv-card.is-down {
        background: color-mix(in srgb, var(--negative, #c62828) 26%, var(--surface));
    }

    .mv-card.is-up:hover {
        background: color-mix(in srgb, var(--positive, #0F8A3B) 44%, var(--surface));
    }

    .mv-card.is-down:hover {
        background: color-mix(in srgb, var(--negative, #c62828) 44%, var(--surface));
    }

    .mv-card:focus-visible {
        outline: 2px solid var(--text);
        outline-offset: -2px;
    }

.mv-card-tk {
    font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
    font-size: 17px;
    line-height: 1.1;
    letter-spacing: -.02em;
}

/* the logo sits behind the numbers, as a watermark */
.mv-card-logo {
    position: absolute;
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
    width: 74%;
    max-height: 34px;
    object-fit: contain;
    opacity: .34;
    pointer-events: none;
}

.mv-card-row {
    position: relative;
    display: flex;
    flex-direction: column;
}

    .mv-card-row:first-of-type {
        margin-top: auto;
    }

    .mv-card-row + .mv-card-row {
        margin-top: 3px;
    }

.mv-card-lbl {
    font-size: 9.5px;
    line-height: 1.2;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mv-card-val {
    align-self: flex-end;
    font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
    font-size: 16px;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

/* today's move is the number being judged, so it carries the weight */
.mv-card-row.is-today .mv-card-val {
    font-size: 19px;
}

@media (max-width: 520px) {
    .mv-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---- session treemap ---- */
.mv-map {
    border-radius: 10px;
    overflow: hidden;
    /* dark in both themes, matching the earnings heat map */
    background: #1c1c1c;
    border: 1px solid var(--border);
}

.mv-map-svg {
    display: block;
    width: 100%;
    height: auto;
}

.mv-map-rect {
    transition: fill-opacity 120ms ease;
}

.mv-map-tile:hover .mv-map-rect {
    fill-opacity: .82;
}

.mv-map-tk {
    fill: #fff;
    font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
    pointer-events: none;
}

.mv-map-pct {
    fill: rgba(255, 255, 255, .92);
    font-weight: 600;
    pointer-events: none;
}

.mv-updown {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

    .mv-updown .is-pos {
        color: var(--positive, #0F8A3B);
    }

    .mv-updown .is-neg {
        color: var(--negative, #c62828);
    }

/* ---- table ---- */
.mv-tablewrap {
    overflow-x: auto;
}

.mv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

    .mv-table th,
    .mv-table td {
        padding: 7px 8px;
        text-align: right;
        white-space: nowrap;
        border-bottom: 1px solid var(--border);
    }

        .mv-table th.is-left,
        .mv-table td.is-left {
            text-align: left;
        }

    .mv-table tbody tr:hover {
        background: color-mix(in srgb, var(--ew-gold, #DDB785) 12%, transparent);
    }

    .mv-table .is-pos {
        color: var(--positive, #0F8A3B);
    }

    .mv-table .is-neg {
        color: var(--negative, #c62828);
    }

.mv-sort {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
}

    .mv-sort:hover {
        color: var(--ew-gold, #DDB785);
    }

.mv-id {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mv-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    border-radius: 50%;
    background: var(--surface-alt, #f6f7f9);
    flex: none;
}

.mv-id-txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mv-tk {
    font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    line-height: 1.15;
}

    .mv-tk:hover {
        color: var(--ew-gold, #DDB785);
    }

.mv-co {
    font-size: 10.5px;
    font-weight: 400;
    color: var(--text-muted);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mv-sub {
    display: block;
    font-size: 9.5px;
    font-weight: 400;
    color: var(--text-muted);
}

/* ---- responsive ---- */
@media (max-width: 720px) {
    .mv-stamp {
        margin-left: 0;
    }

    .mv-co {
        max-width: 130px;
    }
}
