/* ==========================================================================
   Desktop and accessibility styles (mobile/tablet breakpoints removed)
   Author: proLAB CSQC Team
   ========================================================================== */

/* ==========================================================================
   Logo Display Rules
   ========================================================================== */

/* Ensure proper logo sizing */
.app-sidebar .main-sidebar-header .header-logo img {
    height: auto;
    max-height: 3rem;
    max-width: 100%;
    width: auto;
}

/* --------------------------------------------------------------------------
   Logo variant switching (theme / collapsed menu / viewport)

   Moved here verbatim from the inline <style> block in Pages/_Layout.cshtml,
   with the Razor media-query escapes turned back into real @media. It used to sit
   last in the head; every rule carries !important, so it overrode the
   non-important rules above it then and still does from here.

   The earlier non-important .app-sidebar rules that used to sit above have
   been removed: !important outranked them, so they never applied. This is now
   the only place logo visibility is decided.

   The max-width branch still fires: @media keys off the viewport, not the
   body { min-width: 1100px } floor, so a narrow window reaches it.
   -------------------------------------------------------------------------- */

/* Base: hide all logos by default */
.header-logo img {
    display: none !important;
}

/* Desktop (>= 992px) - light theme: show desktop-logo */
@media (min-width: 992px) {
    .header-logo .desktop-logo {
        display: block !important;
    }

    /* Dark theme */
    [data-theme-mode="dark"] .header-logo .desktop-logo {
        display: none !important;
    }

    [data-theme-mode="dark"] .header-logo .desktop-dark {
        display: block !important;
    }

    /* Menu toggled/collapsed: show the toggle logos */
    [data-toggled]:not([data-toggled="close"]) .header-logo .desktop-logo,
    [data-toggled]:not([data-toggled="close"]) .header-logo .desktop-dark {
        display: none !important;
    }

    [data-toggled]:not([data-toggled="close"]) .header-logo .toggle-logo {
        display: block !important;
    }

    [data-toggled]:not([data-toggled="close"])[data-theme-mode="dark"] .header-logo .toggle-logo {
        display: none !important;
    }

    [data-toggled]:not([data-toggled="close"])[data-theme-mode="dark"] .header-logo .toggle-dark {
        display: block !important;
    }
}

/* Narrow viewport (< 992px) - light theme: show toggle-logo */
@media (max-width: 991.98px) {
    .header-logo .toggle-logo {
        display: block !important;
    }

    [data-theme-mode="dark"] .header-logo .toggle-logo {
        display: none !important;
    }

    [data-theme-mode="dark"] .header-logo .toggle-dark {
        display: block !important;
    }
}

/* ==========================================================================
   Desktop (≥993px)
   ========================================================================== */

@media (min-width: 993px) {
    /* Allow dropdowns to overflow on desktop */
    .card-body,
    .modern-card,
    .tradingview-table-container {
        overflow: visible !important;
        position: relative;
    }
}

/* ==========================================================================
   Accessibility - Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .app-sidebar,
    #responsive-overlay,
    .filter-dropdown-wrapper,
    * {
        transition: none !important;
        animation: none !important;
    }
}

