﻿
/* ew-charts.css */
:root {
    --epsline: var(--ew-color);
    --epstop: var(--ew-color-top);
    --epsbottom: var(--ew-color-bottom);
    --eavwapline: #e0e0e0;
    --sentline: #000000;
    --shortline: #000000;
    --macdline: #000000;
    --macdfastline: #000000;
    --chart-bg: var(--ew-light);
    --chart-grid: #E5E9F0;
    --chart-axis: #6B7280;
    --chart-up: var(--ew-darkgreen);
    --chart-down: var(--ew-darkred);
    --chart-volume-up: rgba(15, 138, 59, 0.35);
    --chart-volume-down: rgba(198, 40, 40, 0.35);
    --chart-line: #4e2d9e;
    --chart-trend: var(--ew-dark);
    --chart-marker: var(--ew-color);
}

[data-theme="dark"] {
    --epsline: var(--ew-lavendar);
    --epstop: var(--ew-lavendar-top);
    --epsbottom: var(--ew-lavendar-bottom);
    --chart-bg: var(--ew-dark);
    --chart-grid: #1E2942;
    --chart-axis: #9CA8BC;
    --chart-up: var(--ew-brightgreen);
    --chart-down: var(--ew-red);
    --chart-volume-up: rgba(49, 196, 109, 0.32);
    --chart-volume-down: rgba(255, 107, 107, 0.32);
    --chart-line: #4e2d9e;
    --chart-trend: #F4F6FA;
    --chart-marker: #B2A9DD;
}

@media (prefers-color-scheme: dark) {
    :root {
        --epsline: var(--ew-lavendar);
        --epstop: var(--ew-lavendar-top);
        --epsbottom: var(--ew-lavendar-bottom);
        --chart-bg: var(--ew-dark);
        --chart-grid: #1E2942;
        --chart-axis: #9CA8BC;
        --chart-up: var(--ew-brightgreen);
        --chart-down: var(--ew-red);
        --chart-volume-up: rgba(49, 196, 109, 0.32);
        --chart-volume-down: rgba(255, 107, 107, 0.32);
        --chart-line: #4e2d9e;
        --chart-trend: #F4F6FA;
        --chart-marker: #B2A9DD;
    }
}



.ew-chart-wrap {
    position: relative;
}

.ew-stock-chart {
    width: 100%;
}

.ew-chart-basic {
    aspect-ratio: 1200 / 440; /* price-only: matches the standalone chart */
    max-height: 80vh;
}

.ew-chart-full {
    aspect-ratio: 1200 / 715; /* main 440 + two sub-panes 275 */
    max-height: 92vh;
}

/* non-subscriber: single pane — wide rectangle */
/*.ew-chart-basic {
    aspect-ratio: 16 / 7;*/ /* width:height ratio — wide */
    /*max-height: 80vh;*/ /* don't exceed viewport on very wide screens */
/*}*/

/* subscriber: 3 panes — taller overall (main + 2 sub-panes) but still proportional */
/*.ew-chart-full {
    aspect-ratio: 16 / 12;*/ /* taller to fit the extra panes, but ratio-locked */
    /*max-height: 92vh;
}*/

/*.ew-stock-chart {
    width: 100%;
    height: 700px;
}*/

/*.chart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;*/ /* kill any inherited padding that changes height */
    /*box-sizing: border-box;*/ /* border counts inside the fixed size */
    /*border: 1px solid var(--border);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;*/ /* prevents text line-height from inflating height */
/*}*/

    /*.chart-btn:hover {
        background: var(--surface);
        color: var(--accent);
    }

    .chart-btn svg {
        display: block;*/ /* removes inline-SVG baseline gap */
        /*width: 18px;
        height: 18px;
    }*/

/* ew-charts.css — chart container, logo, buttons, share bar */



.ew-chart-logo {
    position: absolute;
    top: 24px;
    left: 36px;
    width: 150px;
    height: auto;
    opacity: 0.65;
    pointer-events: none;
    z-index: 2;
}

/* Icon buttons — download + share, unified sizing */
.chart-btn,
.chart-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    vertical-align: middle;
}

    .chart-btn:hover,
    .chart-download-btn:hover {
        background: var(--surface);
        color: var(--accent);
    }

    .chart-btn svg,
    .chart-download-btn svg {
        display: block;
        width: 18px;
        height: 18px;
    }

.share-bar {
    display: none;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

    .share-bar.is-visible {
        display: flex;
        flex-wrap: wrap;
    }

/* SPY / benchmark line: near-black in light mode, near-white in dark */
:root {
    --sent-spy-line: #050505;
}

[data-theme="dark"] {
    --sent-spy-line: #f7f7f7;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --sent-spy-line: #f7f7f7;
    }
}