﻿/* ===== Option Trades page ===== */
.ot-page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 8px 16px 40px;
}

.ot-head {
    margin: 12px 0 20px;
}

.ot-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ot-title-icon {
    color: var(--ew-gold, #DDB785);
    flex: none;
}

.ot-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.ot-locked {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    background: var(--surface);
}

    .ot-locked p {
        color: var(--text-muted);
        margin: 0 0 14px;
    }

.ot-upgrade {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 8px;
    background: var(--ew-gold, #DDB785);
    color: #23324a;
    font-weight: 700;
    text-decoration: none;
}

/* ---- strategy matrix ---- */
.ot-matrix {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    padding: 14px;
    margin-bottom: 18px;
}

.ot-matrix-grid {
    display: grid;
    grid-template-columns: 130px repeat(3, 1fr);
    gap: 8px;
    align-items: stretch;
}

.ot-corner {
}

.ot-colhdr {
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 4px;
    align-self: center;
}

    .ot-colhdr.ot-bull {
        color: var(--positive, #0F8A3B);
    }

    .ot-colhdr.ot-bear {
        color: var(--negative, #c62828);
    }

    .ot-colhdr.ot-neut {
        color: #9a7a3e;
    }

.ot-rowhdr {
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.ot-strat {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-alt, #f6f7f9);
    padding: 14px 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, transform 0.06s;
    border-left-width: 3px;
}

    .ot-strat:hover {
        transform: translateY(-1px);
    }

    .ot-strat.is-bull {
        border-left-color: #4caf50;
    }

    .ot-strat.is-neut {
        border-left-color: var(--ew-gold, #DDB785);
    }

    .ot-strat.is-bear {
        border-left-color: #cd5959;
    }

    .ot-strat.is-active {
        background: var(--surface);
        border-color: var(--ew-gold, #DDB785);
        box-shadow: 0 0 0 2px rgba(221,183,133,0.4);
    }

@media (max-width: 620px) {
    .ot-matrix-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ot-corner, .ot-rowhdr, .ot-colhdr {
        display: none;
    }
}

/* ---- summary ---- */
.ot-summary {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    padding: 16px 18px;
    margin-bottom: 18px;
}

@media (max-width: 620px) {
    .ot-summary {
        grid-template-columns: 1fr;
    }
}

.ot-sum-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 4px;
}

.ot-sum-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.ot-sum-traits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    align-content: center;
}

.ot-trait {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
}

.ot-trait-mark {
    font-weight: 800;
}

.ot-trait.is-yes .ot-trait-mark {
    color: var(--positive, #0F8A3B);
}

.ot-trait.is-no .ot-trait-mark {
    color: var(--negative, #c62828);
}

.ot-trait-label {
    color: var(--text-muted);
}

/* ---- bubble chart ---- */
.ot-chart-wrap {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    padding: 10px;
    margin-bottom: 18px;
}

.ot-bubble {
    stroke: var(--surface);
    stroke-width: 1.5;
    cursor: pointer;
}

    .ot-bubble:hover {
        fill-opacity: 0.95;
    }

.ot-bubble-label {
    fill: #fff;
    font-weight: 800;
    pointer-events: none;
}

.ot-axis-label {
    fill: var(--text-muted);
    font-size: 11px;
}

.ot-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    font-size: 14px;
}

/* ---- list ---- */
.ot-list {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
}

.ot-list-head, .ot-list-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr 1.2fr;
    gap: 10px;
    align-items: center;
    padding: 10px 16px;
}

.ot-list-head {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

.ot-list-row {
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
}

    .ot-list-row:last-child {
        border-bottom: none;
    }

    .ot-list-row:hover {
        background: var(--surface-alt, #f6f7f9);
    }

.ot-list-co {
    display: flex;
    flex-direction: column;
}

.ot-list-ticker {
    font-weight: 800;
}

.ot-list-name {
    font-size: 11.5px;
    color: var(--text-muted);
}

.ot-list-size {
    font-weight: 700;
}

@media (max-width: 620px) {
    .ot-list-head {
        display: none;
    }

    .ot-list-row {
        grid-template-columns: 1fr 1fr;
        row-gap: 4px;
    }
}

/* ---- loader ---- */
.ot-loader {
    display: flex;
    justify-content: center;
    padding: 50px 0;
}

.ot-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 4px solid var(--border);
    border-top-color: var(--ew-gold, #DDB785);
    animation: ot-spin 0.8s linear infinite;
}

@keyframes ot-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---- filters ---- */
.ot-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    padding: 14px 18px;
    margin-bottom: 18px;
}

.ot-filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ot-filter-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
}

    .ot-filter-label span {
        font-weight: 600;
        text-transform: none;
        letter-spacing: 0;
        color: var(--text);
    }

.ot-btn-group {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.ot-fbtn {
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--surface);
    border: none;
    border-right: 1px solid var(--border);
    cursor: pointer;
}

    .ot-fbtn:last-child {
        border-right: none;
    }

    .ot-fbtn:hover {
        background: var(--surface-alt, #f6f7f9);
    }

    .ot-fbtn.is-active {
        background: var(--ew-gold, #DDB785);
        color: #23324a;
    }

.ot-filter-slider {
    min-width: 220px;
    flex: 1;
}

.ot-range {
    position: relative;
    height: 28px;
}

    .ot-range input[type="range"] {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        -webkit-appearance: none;
        appearance: none;
        background: transparent;
        pointer-events: none;
    }

        .ot-range input[type="range"]::-webkit-slider-runnable-track {
            height: 4px;
            background: var(--border);
            border-radius: 2px;
        }

        .ot-range input[type="range"]::-moz-range-track {
            height: 4px;
            background: var(--border);
            border-radius: 2px;
        }

        .ot-range input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            pointer-events: auto;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--ew-gold, #DDB785);
            border: 2px solid var(--surface);
            margin-top: -6px;
            cursor: pointer;
        }

        .ot-range input[type="range"]::-moz-range-thumb {
            pointer-events: auto;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--ew-gold, #DDB785);
            border: 2px solid var(--surface);
            cursor: pointer;
        }

.ot-filter-count {
    margin-left: auto;
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 600;
    align-self: center;
}

@media (max-width: 620px) {
    .ot-filters {
        gap: 14px;
    }

    .ot-filter-count {
        margin-left: 0;
    }
}

/* ---- bubble detail card (hover/focus) ---- */
.ot-card {
    position: absolute;
    z-index: 20;
    width: 230px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 12px 14px;
    pointer-events: auto;
}

.ot-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.ot-card-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 6px;
    background: var(--surface-alt, #f6f7f9);
}

.ot-card-id {
    display: flex;
    flex-direction: column;
}

.ot-card-ticker {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
}

.ot-card-date {
    font-size: 11.5px;
    color: var(--text-muted);
}

.ot-card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
}

.ot-card-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-align: center;
}

    .ot-card-metric.ot-card-return {
        align-items: flex-start;
        text-align: left;
        justify-content: center;
    }

.ot-card-mlabel {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    font-weight: 700;
}

.ot-card-mval {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.ot-card-mom {
    font-size: 18px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

    .ot-card-mom.is-pos {
        color: var(--positive, #0F8A3B);
    }

    .ot-card-mom.is-neg {
        color: var(--negative, #c62828);
    }

.ot-card-gauge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
}

/* ---- card: company name, circled logo, confirm icon ---- */
.ot-card-logo-wrap {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-alt, #f6f7f9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: none;
}

    .ot-card-logo-wrap .ot-card-logo {
        width: 30px;
        height: 30px;
        border-radius: 0;
        background: transparent;
    }

.ot-card-company {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.2;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ot-card-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    color: var(--text-muted);
}

.ot-card-confirm.is-confirmed {
    color: var(--positive, #0F8A3B);
}

.ot-card-confirm.is-unconfirmed {
    color: #c99a2e;
}

/* ---- sortable list headers ---- */
.ot-sortable {
    cursor: pointer;
    user-select: none;
}

    .ot-sortable:hover {
        color: var(--text);
    }
