/* =====================================================================================================
   SRV Path Lab website - visitor themes (🎨 button in the header, js/theme.js). Saved in the visitor's browser.
     colour  html[data-theme]   green (standard) | blue | teal | indigo | purple | orange | rose | slate
     mode    html[data-mode]    light | dark      (dark also sets Bootstrap's data-bs-theme="dark")
     spacing html[data-density] comfortable | compact
     text    html[data-font]    small | normal | large
     menu    html[data-menu]    top (standard) | side   (desktop: the menu becomes a panel on the left)
   ===================================================================================================== */
:root { --brand-rgb: 21, 122, 59; }
html[data-theme="blue"]   { --brand: #1d4ed8; --brand-dark: #1e3a8a; --brand-light: #dbeafe; --brand-rgb: 29, 78, 216; }
html[data-theme="teal"]   { --brand: #0f766e; --brand-dark: #134e4a; --brand-light: #ccfbf1; --brand-rgb: 15, 118, 110; }
html[data-theme="indigo"] { --brand: #4338ca; --brand-dark: #312e81; --brand-light: #e0e7ff; --brand-rgb: 67, 56, 202; }
html[data-theme="purple"] { --brand: #7e22ce; --brand-dark: #581c87; --brand-light: #f3e8ff; --brand-rgb: 126, 34, 206; }
html[data-theme="orange"] { --brand: #c2410c; --brand-dark: #7c2d12; --brand-light: #ffedd5; --brand-rgb: 194, 65, 12; }
html[data-theme="rose"]   { --brand: #be123c; --brand-dark: #881337; --brand-light: #ffe4e6; --brand-rgb: 190, 18, 60; }
html[data-theme="slate"]  { --brand: #334155; --brand-dark: #0f172a; --brand-light: #e2e8f0; --brand-rgb: 51, 65, 85; }
.site-header { box-shadow: 0 2px 12px rgba(var(--brand-rgb), .08); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); }

/* ---------------------------------------------------------------- dark mode */
html[data-mode="dark"] { --ink: #e5e7eb; --muted: #9ca3af; --soft: #162033; --line: #263247; --card: #111a2b; color-scheme: dark; }
html[data-mode="dark"] body { background: #0b1220; color: var(--ink); }
html[data-mode="dark"] .site-header, html[data-mode="dark"] .suggest-box, html[data-mode="dark"] .book-card, html[data-mode="dark"] .test-card,
html[data-mode="dark"] .why, html[data-mode="dark"] .q-box, html[data-mode="dark"] .blog-card, html[data-mode="dark"] .filter-box,
html[data-mode="dark"] .detail-box, html[data-mode="dark"] .buy-box, html[data-mode="dark"] .auth-box, html[data-mode="dark"] .centre-card,
html[data-mode="dark"] .success-box, html[data-mode="dark"] .t-step span, html[data-mode="dark"] .chat-panel, html[data-mode="dark"] .msg.bot,
html[data-mode="dark"] .chat-card, html[data-mode="dark"] .chat-form, html[data-mode="dark"] .chat-input, html[data-mode="dark"] .chat-foot,
html[data-mode="dark"] .or-line span, html[data-mode="dark"] .offcanvas, html[data-mode="dark"] .card, html[data-mode="dark"] .modal-content,
html[data-mode="dark"] .dropdown-menu, html[data-mode="dark"] .list-group-item, html[data-mode="dark"] .bg-white, html[data-mode="dark"] .partner-card,
html[data-mode="dark"] .offer-card, html[data-mode="dark"] .programs a {
    background-color: var(--card) !important; color: var(--ink); border-color: var(--line);
}
html[data-mode="dark"] .bg-soft, html[data-mode="dark"] .bg-light, html[data-mode="dark"] .empty-box, html[data-mode="dark"] .info-tile,
html[data-mode="dark"] .callback-mini, html[data-mode="dark"] .chat-body, html[data-mode="dark"] .test-chips span { background-color: var(--soft) !important; color: var(--ink); }
html[data-mode="dark"] .btn-outline-brand, html[data-mode="dark"] .quick-replies button { background: transparent; color: #e5e7eb; border-color: var(--brand); }
html[data-mode="dark"] .main-nav a, html[data-mode="dark"] .hdr-icon, html[data-mode="dark"] .mobile-links .list-group-item,
html[data-mode="dark"] .suggest-box a, html[data-mode="dark"] .suggest-box button, html[data-mode="dark"] h1, html[data-mode="dark"] h2,
html[data-mode="dark"] h3, html[data-mode="dark"] h4, html[data-mode="dark"] h5, html[data-mode="dark"] h6 { color: var(--ink); }
html[data-mode="dark"] a:not(.btn):not(.ad-ribbon-item) { color: #7dd3a8; }
html[data-mode="dark"][data-theme] a:not(.btn):not(.ad-ribbon-item) { color: color-mix(in srgb, var(--brand) 45%, #ffffff); }
html[data-mode="dark"] .site-footer a { color: #c9d5e8; }
html[data-mode="dark"] .form-control, html[data-mode="dark"] .form-select { background-color: #0f1828; color: var(--ink); border-color: #334155; }
html[data-mode="dark"] .form-control::placeholder { color: #6b7280; }
html[data-mode="dark"] .accordion-item, html[data-mode="dark"] .accordion-button { background: var(--card); color: var(--ink); border-color: var(--line); }
html[data-mode="dark"] .accordion-button:not(.collapsed) { background: var(--soft); color: #e5e7eb; }
html[data-mode="dark"] .table { --bs-table-bg: transparent; color: var(--ink); }
html[data-mode="dark"] .badge-package { background: #3b2f12; color: #fcd34d; }
html[data-mode="dark"] .text-muted { color: var(--muted) !important; }
/* the logo has dark text: keep it on a white plate */
html[data-mode="dark"] .site-header .brand { background: #fff; border-radius: 10px; padding: 4px 8px; }

/* ---------------------------------------------------------------- compact */
html[data-density="compact"] .section { padding: 26px 0; }
html[data-density="compact"] .section-head { margin-bottom: 12px; }
html[data-density="compact"] .test-card, html[data-density="compact"] .why, html[data-density="compact"] .book-card,
html[data-density="compact"] .filter-box, html[data-density="compact"] .detail-box, html[data-density="compact"] .buy-box,
html[data-density="compact"] .centre-card { padding: 10px 12px; }
html[data-density="compact"] .g-3, html[data-density="compact"] .g-4 { --bs-gutter-x: .7rem; --bs-gutter-y: .7rem; }
html[data-density="compact"] .main-nav a { padding: 6px 10px; }
html[data-density="compact"] .site-header .py-2 { padding-top: .25rem !important; padding-bottom: .25rem !important; }
html[data-density="compact"] .site-logo { height: 38px; }

/* ---------------------------------------------------------------- text size */
html[data-font="small"] main, html[data-font="small"] .site-footer, html[data-font="small"] .main-nav { zoom: .9; }
html[data-font="large"] main, html[data-font="large"] .site-footer, html[data-font="large"] .main-nav { zoom: 1.15; }

/* ---------------------------------------------------------------- menu on the side (desktop) */
@media (min-width: 992px) {
    html[data-menu="side"] .main-nav {
        position: fixed; left: 0; top: 50%; transform: translateY(-50%); width: 210px; z-index: 1025;
        background: var(--card, #fff); border: 1px solid var(--line); border-left: 0; border-radius: 0 14px 14px 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .12); padding: 8px 0;
    }
    html[data-menu="side"] .main-nav .container { flex-direction: column; gap: 0 !important; padding: 0; max-width: none; }
    html[data-menu="side"] .main-nav a { border-bottom: 0; border-left: 4px solid transparent; padding: 9px 16px; }
    html[data-menu="side"] .main-nav a:hover, html[data-menu="side"] .main-nav a.active { border-left-color: var(--yellow); background: rgba(var(--brand-rgb), .06); }
    html[data-menu="side"] main, html[data-menu="side"] .site-footer { margin-left: 210px; }
    html[data-menu="side"] .whatsapp-float { left: 228px; }
}

/* ---------------------------------------------------------------- the 🎨 panel */
.theme-panel { width: 300px; padding: 14px; }
.theme-panel h6 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 6px; }
.theme-panel h6:first-child { margin-top: 0; }
.theme-swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.theme-swatch { width: 100%; aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.theme-swatch.active { border-color: var(--ink); transform: scale(1.12); }
.theme-seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.theme-seg button { flex: 1; border: 0; background: transparent; color: var(--ink); padding: 6px 4px; font-size: 12.5px; font-weight: 600; }
.theme-seg button + button { border-left: 1px solid var(--line); }
.theme-seg button.active { background: var(--brand); color: #fff; }
.theme-btn { font-size: 20px; }
