/* StockView theme surface cleanup v1 */
@layer stockviewTheme {
    html body #sv-live-search input[type="search"] {
        -webkit-appearance:none!important;
        appearance:none!important;
        background-image:none!important;
    }

    html body #sv-live-search input::-webkit-search-decoration,
    html body #sv-live-search input::-webkit-search-results-button,
    html body #sv-live-search input::-webkit-search-results-decoration {
        -webkit-appearance:none!important;
        display:none!important;
    }

    html body #sv-live-search::before,
    html body #sv-live-search::after {
        content:none!important;
        display:none!important;
    }

    html body.sv-auth-page .svauth-brand .sv-brand-slot {
        max-width:100%;
        justify-content:center;
    }

    html body.sv-auth-page .svauth-brand .sv-brand-slot > img {
        max-width:145px!important;
        max-height:48px!important;
        width:auto!important;
        height:auto!important;
        background:transparent!important;
        padding:0!important;
        border:0!important;
        box-shadow:none!important;
    }

    html body.sv-auth-page .svauth-brand .sv-brand-light {
        display:block!important;
    }

    html body.sv-auth-page .svauth-brand .sv-brand-dark {
        display:none!important;
    }

    html[data-sv-theme="dark"] body.sv-auth-page
    .svauth-brand .sv-brand-light {
        display:none!important;
    }

    html[data-sv-theme="dark"] body.sv-auth-page
    .svauth-brand .sv-brand-dark {
        display:block!important;
    }

    html[data-sv-theme="dark"] body.sv-auth-page
    .svauth-brand .sv-brand-dark-fallback > img {
        filter:brightness(0) invert(1)!important;
    }

    html[data-sv-theme="dark"] body.sv-auth-page .auth-wrapper {
        background-image:none!important;
        background-color:transparent!important;
    }

    html[data-sv-theme="dark"] body.sv-auth-page
    .auth-card :is(h1,p,label,.svauth-brand,.sv-brand-slot) {
        background:transparent!important;
        box-shadow:none!important;
    }

    html[data-sv-theme="dark"] body .sv-ref-header :is(
        .sv-ref-ticker,
        .sv-ref-market-status,
        #sv-ref-market-state,
        .sv-index-widget,
        .sv-index-lines,
        .sv-index-top,
        .sv-index-change
    ) {
        background:transparent!important;
        box-shadow:none!important;
    }

    html[data-sv-theme="dark"] body
    #sv-signal-row#sv-signal-row .sv-signal-cell,
    html[data-sv-theme="dark"] body
    #sv-signal-row#sv-signal-row .sv-signal-cell :is(
        section,div,h2,h3,p,strong,span,svg
    ) {
        background:transparent!important;
        box-shadow:none!important;
    }

    html[data-sv-theme="dark"] body .svf-rail .svf-pane,
    html[data-sv-theme="dark"] body .svf-rail .svf-pane > .card,
    html[data-sv-theme="dark"] body #sv-market-depth#sv-market-depth,
    html[data-sv-theme="dark"] body
    #sv-market-depth#sv-market-depth :is(
        div,h2,h3,p,table,thead,tbody,tr,th,td
    ) {
        background:transparent!important;
        box-shadow:none!important;
    }

    html[data-sv-theme="dark"] body
    #sv-market-depth [data-depth-badge] {
        background:#292929!important;
        color:#e5e5e5!important;
        border-color:#404040!important;
    }

    html[data-sv-theme="dark"] body
    #sv-official-market-summary :is(span,strong,p) {
        background:transparent!important;
    }

    @media(max-width:600px) {
        html body .sv-ref-header .sv-ref-brand {
            min-width:0!important;
            max-width:calc(100vw - 156px)!important;
        }

        html body .sv-ref-header .sv-ref-brand .sv-brand-slot {
            min-width:0!important;
            max-width:100%!important;
        }

        html body .sv-ref-header .sv-ref-brand img {
            min-width:0!important;
            max-width:min(180px,100%)!important;
            width:auto!important;
            height:auto!important;
        }

        html body #sv-official-market-summary .svo-summary-grid {
            grid-template-columns:repeat(2,minmax(0,1fr))!important;
        }

        html body #sv-official-market-summary .svo-summary-box strong {
            font-size:clamp(18px,5.5vw,24px)!important;
            white-space:nowrap!important;
            overflow-wrap:normal!important;
            word-break:normal!important;
        }
    }
}