/**
 * Live Auction Outlet — theme toggle (light / dark) + modern UI extras
 */

/* ── Scroll progress ── */
.lao-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 9999;
    background: linear-gradient(90deg, var(--accent, #e62e2e), var(--ink, #111));
    pointer-events: none;
    transition: width 0.1s linear;
}

/* ── Skip link ── */
.lao-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 10000;
}

.lao-skip-link:focus {
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    padding: 0.75rem 1.25rem;
    background: var(--ink, #111);
    color: var(--ink-inverse, #fff);
    border-radius: var(--r-sm, 8px);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    box-shadow: var(--shadow-dropdown);
}

/* ── Theme toggle button ── */
.lao-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border, #e0e0e0);
    border-radius: var(--r-pill, 999px);
    background: var(--white, #fff);
    color: var(--ink, #111);
    cursor: pointer;
    transition: background var(--duration, 200ms), border-color var(--duration, 200ms), transform 0.15s ease;
}

.lao-theme-toggle:hover {
    border-color: var(--ink, #111);
    transform: scale(1.05);
}

.lao-theme-toggle:focus-visible {
    outline: 2px solid var(--accent, #e62e2e);
    outline-offset: 2px;
}

.lao-theme-toggle .lao-icon-light,
.lao-theme-toggle .lao-icon-dark {
    font-size: 18px;
    line-height: 1;
}

html[data-lao-theme="dark"] .lao-theme-toggle .lao-icon-dark {
    display: none !important;
}

html[data-lao-theme="dark"] .lao-theme-toggle .lao-icon-light {
    display: inline-block !important;
}

html:not([data-lao-theme="dark"]) .lao-theme-toggle .lao-icon-light {
    display: none !important;
}

/* ── Back to top ── */
.lao-back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 5.5rem;
    z-index: 1040;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--r-pill, 999px);
    background: var(--ink, #111);
    color: var(--ink-inverse, #fff);
    box-shadow: var(--shadow-hover);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
}

.lao-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lao-back-to-top:hover {
    background: var(--accent, #e62e2e);
}

.lao-back-to-top:focus-visible {
    outline: 2px solid var(--accent, #e62e2e);
    outline-offset: 2px;
}

/* ── Header scrolled state ── */
.lao-clean-market .lao-site-header.lao-header-scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08) !important;
}

/* ── Focus visible (keyboard users) ── */
.lao-clean-market a:focus-visible,
.lao-clean-market button:focus-visible,
.lao-clean-market input:focus-visible,
.lao-clean-market select:focus-visible,
.lao-clean-market textarea:focus-visible {
    outline: 2px solid var(--accent, #e62e2e);
    outline-offset: 2px;
}

/* ── Reduced motion ── */
html[data-lao-reduced-motion="1"] *,
html[data-lao-reduced-motion="1"] *::before,
html[data-lao-reduced-motion="1"] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

/* ================================================================
   DARK THEME
   ================================================================ */
html[data-lao-theme="dark"] {
    color-scheme: dark;

    --white: #1a1a1f;
    --bg: #0f0f12;
    --bg-alt: #16161c;
    --bg-wash: #1e1e26;

    --ink: #f3f4f6;
    --ink-secondary: #a1a1aa;
    --ink-tertiary: #71717a;
    --ink-inverse: #111111;

    --border: #2e2e38;
    --border-hover: #3f3f4a;
    --border-focus: #f3f4f6;

    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-dropdown: 0 12px 40px rgba(0, 0, 0, 0.55);
}

html[data-lao-theme="dark"] body.lao-clean-market {
    background: var(--bg) !important;
    color: var(--ink);
}

html[data-lao-theme="dark"] .lao-clean-market .bg-white,
html[data-lao-theme="dark"] .lao-clean-market .card,
html[data-lao-theme="dark"] .lao-clean-market .lao-auth-card,
html[data-lao-theme="dark"] .lao-clean-market .logo-bar-area,
html[data-lao-theme="dark"] .lao-clean-market .lao-site-header,
html[data-lao-theme="dark"] .lao-clean-market .front-header-search,
html[data-lao-theme="dark"] .lao-clean-market .aiz-side-nav,
html[data-lao-theme="dark"] .lao-clean-market .dropdown-menu {
    background: var(--white) !important;
    color: var(--ink);
    border-color: var(--border) !important;
}

html[data-lao-theme="dark"] .lao-clean-market .text-dark,
html[data-lao-theme="dark"] .lao-clean-market .fw-700.text-dark,
html[data-lao-theme="dark"] .lao-clean-market h1,
html[data-lao-theme="dark"] .lao-clean-market h2,
html[data-lao-theme="dark"] .lao-clean-market h3,
html[data-lao-theme="dark"] .lao-clean-market h4,
html[data-lao-theme="dark"] .lao-clean-market h5 {
    color: var(--ink) !important;
}

html[data-lao-theme="dark"] .lao-clean-market .text-secondary,
html[data-lao-theme="dark"] .lao-clean-market .text-muted,
html[data-lao-theme="dark"] .lao-clean-market .text-soft-dark {
    color: var(--ink-secondary) !important;
}

html[data-lao-theme="dark"] .lao-clean-market .form-control,
html[data-lao-theme="dark"] .lao-clean-market select.form-control {
    background: var(--bg-alt) !important;
    color: var(--ink) !important;
    border-color: var(--border) !important;
}

html[data-lao-theme="dark"] .lao-clean-market .lao-site-main,
html[data-lao-theme="dark"] .lao-clean-market .aiz-main-wrapper,
html[data-lao-theme="dark"] .lao-clean-market .gry-bg {
    background: var(--bg) !important;
}

html[data-lao-theme="dark"] .lao-clean-market .btn-primary {
    background: var(--ink) !important;
    border-color: var(--ink) !important;
    color: var(--ink-inverse) !important;
}

html[data-lao-theme="dark"] .lao-clean-market footer,
html[data-lao-theme="dark"] .lao-clean-market .bg-dark {
    background: #0a0a0d !important;
}

html[data-lao-theme="dark"] .lao-clean-market .top-navbar {
    background: var(--bg-alt) !important;
    border-color: var(--border);
}

html[data-lao-theme="dark"] .lao-clean-market .lao-homepage .lao-hero {
    filter: brightness(0.92);
}

html[data-lao-theme="dark"] .lao-theme-toggle {
    background: var(--bg-alt);
    border-color: var(--border);
    color: var(--ink);
}

html[data-lao-theme="dark"] .lao-scroll-progress {
    background: linear-gradient(90deg, var(--accent), #f3f4f6);
}
