/* ============================================================================
   slider-chart.css — the Slider view's price chart (slider-chart.js).
   Odette's quiet system (DESIGN.md): the ground under it, hairlines inside,
   12px labels, tabular figures, the one segmented switcher; candle colour is
   money colour, muted. The chart library paints its own canvas, so its
   colours are the --sc-* tokens below, read once by slider-chart.js.
   ========================================================================== */
body.v2 #sc-chart {
    --sc-h: 240px;
    --sc-text: #7E8A9C;
    --sc-grid: rgba(255, 255, 255, 0.035);
    --sc-hair: rgba(255, 255, 255, 0.08);
    --sc-up: rgba(94, 221, 156, 0.72);
    --sc-down: rgba(232, 106, 98, 0.72);
    --sc-line: #F5F7FA;
    --sc-be: #8C98AB;
    --sc-spot: rgba(245, 247, 250, 0.5);
    --sc-offer: rgba(255, 255, 255, 0.14);
    --sc-chip: #232C42;
    /* edge to edge of the track (its 16px side padding), above the slider */
    margin: 0 -16px 12px;
    border-top: 1px solid var(--v2-hair);
    border-bottom: 1px solid var(--v2-hair);
}
/* short windows: the slider keeps its room under the chart */
@media (min-width: 992px) and (max-height: 860px) { body.v2 #sc-chart { --sc-h: 200px; } }

body.v2 .sc-head {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 36px;
    padding: 0 16px;
    border-bottom: 1px solid var(--v2-hair);
}
body.v2 .sc-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--sans);
    font-size: 12px;
    line-height: 1;
    color: var(--text-muted);
    white-space: nowrap;
}
body.v2 .sc-legend li { display: inline-flex; align-items: center; gap: 6px; }
body.v2 .sc-legend i { display: inline-block; width: 14px; height: 0; }
body.v2 .sc-legend .is-line i { border-top: 2px solid var(--text-primary); }
body.v2 .sc-legend .is-be i { border-top: 1px dashed var(--text-secondary); }
body.v2 .sc-legend .is-spot i { border-top: 1px dotted var(--text-secondary); }
/* a legend entry names a line only while that line is drawn */
body.v2 #sc-chart:not(.has-pick) .sc-legend .is-line,
body.v2 #sc-chart:not(.has-be) .sc-legend .is-be { display: none; }
body.v2 .sc-note {
    min-width: 0;
    margin-left: auto;
    font-family: var(--sans);
    font-size: 11px;
    line-height: 1.2;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* the interval switcher: the one segmented control (sunken track, dark chosen segment) */
body.v2 .sc-tf {
    flex: none;
    margin-left: auto;
    display: inline-flex;
    padding: 2px;
    border-radius: 7px !important;
    background: #070A11;
}
body.v2 .sc-tf button {
    height: 24px;
    min-width: 36px;
    padding: 0 8px;
    border: 0;
    border-radius: 5px !important;
    background: transparent;
    font-family: var(--num, var(--sans));
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
}
body.v2 .sc-tf button:hover { color: var(--text-primary); }
body.v2 .sc-tf button[aria-pressed="true"] { background: var(--v2-chip); color: var(--text-primary); }
body.v2 .sc-tf button:focus-visible { outline: 2px solid var(--v2-sky); outline-offset: 2px; }

body.v2 .sc-plot { position: relative; height: var(--sc-h); }
body.v2 .sc-canvas { position: absolute; inset: 0; }
body.v2 .sc-canvas a[href*="tradingview"] { display: none !important; }

/* the axis tags (slider-chart.js place()): over the price axis, right-aligned */
body.v2 .sc-tags { position: absolute; top: 0; right: 0; bottom: 0; width: 0; z-index: 2; pointer-events: none; }
body.v2 .sc-tag {
    position: absolute;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    height: 18px;
    padding: 0 6px;
    border-radius: 3px !important;
    background: var(--v2-chip);
    font-family: var(--num, var(--sans));
    font-variant-numeric: tabular-nums;
    font-size: 11px;
    line-height: 18px;
    color: var(--text-primary);
    white-space: nowrap;
}
body.v2 .sc-tag em { font-style: normal; font-weight: 400; color: var(--text-secondary); }
body.v2 .sc-tag b { font-weight: 600; }
body.v2 .sc-tag.is-line { background: #F5F7FA; color: #0F1520; }
body.v2 .sc-tag.is-line em { color: rgba(15, 21, 32, 0.62); }
/* a nudged tag points back to its true price */
body.v2 .sc-lead { position: absolute; right: 100%; width: 1px; margin-right: -1px; background: var(--text-muted); }

/* before the first candles: a plain block in the plot's place, no words */
body.v2 .sc-skel {
    position: absolute;
    inset: 12px 64px 30px 16px;
    z-index: 3;
    border-radius: 6px;
    background: var(--v2-skel, rgba(255, 255, 255, 0.035));
    pointer-events: none;
}
body.v2 #sc-chart.is-ready .sc-skel,
body.v2 #sc-chart:has(.sc-err:not([hidden])) .sc-skel { display: none; }
body.v2 .sc-err {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    margin: 0;
    font-family: var(--sans);
    font-size: 12px;
    color: var(--text-muted);
}
body.v2 .sc-err[hidden] { display: none; }
/* the candles stopped updating: one short line on the plot, the candles stay */
body.v2 .sc-note {
    position: absolute;
    top: 8px;
    left: 12px;
    z-index: 3;
    margin: 0;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--sc-chip);
    font-family: var(--sans);
    font-size: 12px;
    color: var(--text-secondary);
    pointer-events: none;
}

/* phone (html.m-on): the same chart, compact; the note takes its own line */
html.m-on body.v2 #sc-chart { --sc-h: 168px; }
html.m-on body.v2 .sc-head { flex-wrap: wrap; row-gap: 4px; column-gap: 10px; height: auto; min-height: 36px; padding: 6px 16px; }
html.m-on body.v2 .sc-legend { gap: 10px; }
html.m-on body.v2 .sc-tf { margin-left: auto; }
html.m-on body.v2 .sc-note { order: 3; flex: 1 0 100%; margin-left: 0; }

/* One ticket: Basic. The Basic/Advanced switch is hidden at every width
   (revamp.js V2Ticket.setAdv always chooses Basic), as on the phone. */
body.v2 #v2-ticket-tabs { display: none !important; }

/* Two views: Slider (the landing view, revamp.js V2Boot.openChart) and Chain.
   The Chart tab is hidden; the Slider view's own chart replaces it. */
body.v2 #chart-view { display: none !important; }

/* The Slider view is the chart, the slider and its range/spread buttons: the
   strike table under them is not shown (the Chain view lists every strike). */
body.v2 #v2-view-region[data-v2-view="basic"] #v2-slider-table { display: none !important; }

/* a line beyond the chart's price window: its tag sits at that edge, with an arrow */
body.v2 .sc-tag .sc-off { margin-left: 2px; font-weight: 600; }

/* where the pick makes money: a light band on the paying side of the breakeven */
body.v2 .sc-profit {
    position: absolute;
    left: 0;
    z-index: 1;
    background: rgba(94, 221, 156, 0.08);
    pointer-events: none;
}
body.v2 .sc-profit[hidden] { display: none; }
body.v2 .sc-profit.is-unquoted { background: rgba(94, 221, 156, 0.045); }
body.v2 .sc-profit-lab {
    position: absolute;
    left: 10px;
    top: 6px;
    font-size: 11px;
    line-height: 14px;
    font-weight: 600;
    color: #5EDD9C;
}
body.v2 .sc-profit-lab[hidden] { display: none; }
