/* ============================================================
   DARK THEME — Oman Aviation Academy public website
   ------------------------------------------------------------
   Every rule here is scoped to [data-bs-theme=dark]; light mode
   is untouched. This file covers selectors whose LIGHT styles
   live in EXTERNAL stylesheets (style.css, homepage.css,
   atpl.css, vendor css). Dark rules for inline <style> blocks
   (layout critical CSS, header/footer components, per-page
   blocks) live inside those same blocks — keep that split.

   The --oaa-* semantic tokens are defined ONLY in the inline
   critical block of layouts/website.blade.php (light + dark
   values). This file consumes them and must NOT redefine them.

   Selector prefix is html[data-bs-theme=dark] (0,1,1) so rules
   out-rank both flat class selectors and any later :root token
   re-declarations (homepage.css defines its own :root set).
   ============================================================ */

/* ---------- 1. Bootstrap 5.3 variable remap ----------
   Kills Bootstrap's neutral-gray #212529 dark default in favour
   of the OAA navy family, and re-points links at the AA-safe
   light brand blue. */
html[data-bs-theme=dark] {
    --bs-body-bg: var(--oaa-bg);
    --bs-body-color: var(--oaa-ink-muted);
    --bs-heading-color: var(--oaa-ink);
    --bs-emphasis-color: var(--oaa-ink);
    --bs-secondary-color: var(--oaa-ink-muted);
    --bs-border-color: var(--oaa-border-strong);
    --bs-secondary-bg: var(--oaa-surface-2);
    --bs-tertiary-bg: var(--oaa-surface-3);
    --bs-link-color: #4faae0;
    --bs-link-color-rgb: 79, 170, 224;
    --bs-link-hover-color: #74bfe9;
    --bs-link-hover-color-rgb: 116, 191, 233;
}

/* ---------- 2. homepage.css token re-flip ----------
   homepage.css :root tokens (loaded on / only). Text/surface
   tokens flip; --oaa-primary(-hover) stay constant — they are
   used as SOLID BUTTON BACKGROUNDS (white text would fail
   contrast on the lightened blue). --oaa-dark is color-only in
   homepage.css (verified), never a background. */
html[data-bs-theme=dark] {
    --oaa-dark: var(--oaa-ink);
    --oaa-gray: var(--oaa-ink-muted);
    --oaa-dark-gray: var(--oaa-ink-muted);
    --oaa-light-gray: #55627a;
    --oaa-text: var(--oaa-ink-2);
    --oaa-text-light: var(--oaa-ink-muted);
    --oaa-bg-subtle: var(--oaa-surface-2);
    --oaa-primary-light: var(--oaa-accent-tint);
    --oaa-primary-glow: rgba(79, 170, 224, 0.18);
    --oaa-shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.35);
    --oaa-shadow-md: 0 8px 30px rgba(0, 0, 0, 0.45);
    --oaa-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
    --oaa-shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.50);
}

/* ---------- 3. style.css overrides (shared, all pages) ---------- */

/* Alternating section background */
html[data-bs-theme=dark] .bg {
    background-color: var(--oaa-surface-2);
}

/* Slider / carousel chrome */
html[data-bs-theme=dark] .hero-slider.owl-theme .owl-nav [class*=owl-]:hover {
    background: var(--oaa-surface-3);
    color: var(--oaa-accent);
}

html[data-bs-theme=dark] .case-slider.owl-theme .owl-nav [class*=owl-] {
    background: var(--oaa-accent);
    color: #0e1621;
}

/* Event cards */
html[data-bs-theme=dark] .event-date {
    background: var(--oaa-surface-3);
    color: var(--oaa-accent);
}

html[data-bs-theme=dark] .event-info {
    background: var(--oaa-surface);
    border: 1px solid var(--oaa-border);
    box-shadow: none;
}

html[data-bs-theme=dark] .event-info h4 a,
html[data-bs-theme=dark] .event-info span {
    color: var(--oaa-ink);
}

/* Testimonials */
html[data-bs-theme=dark] .testimonial-item {
    background: var(--oaa-surface);
    border: 1px solid var(--oaa-border);
    box-shadow: none;
}

/* Case / project widgets */
html[data-bs-theme=dark] .case-content .case-link {
    background: var(--oaa-surface-3);
    color: var(--oaa-accent);
}

html[data-bs-theme=dark] .new-project-btn {
    background: var(--oaa-surface-3);
    color: var(--oaa-ink);
}

html[data-bs-theme=dark] .new-project-btn:hover {
    background: var(--oaa-accent);
    color: #0e1621;
}

/* Isotope filter buttons */
html[data-bs-theme=dark] .filter-btns li {
    color: var(--oaa-ink) !important;
    border-bottom-color: var(--oaa-surface-2);
}

html[data-bs-theme=dark] .filter-btns li.active,
html[data-bs-theme=dark] .filter-btns li:hover {
    color: var(--oaa-accent) !important;
    border-bottom-color: var(--oaa-accent);
}

/* Blog set (shared template selectors) */
html[data-bs-theme=dark] .blog-item,
html[data-bs-theme=dark] .blog-author {
    background: var(--oaa-surface);
    border: 1px solid var(--oaa-border);
    box-shadow: none;
}

html[data-bs-theme=dark] .blog-details-tags ul a {
    background: var(--oaa-surface-2);
}

html[data-bs-theme=dark] .blog-comments-form {
    background: var(--oaa-surface-2);
}

html[data-bs-theme=dark] .author-name,
html[data-bs-theme=dark] .author-social a {
    color: var(--oaa-ink);
}

/* Sidebar widgets (live on /elpac) */
html[data-bs-theme=dark] .widget .tag-list a {
    background: var(--oaa-surface-3);
}

html[data-bs-theme=dark] .widget .tag-list a:hover {
    background-color: var(--oaa-accent-hover);
    color: #0e1621;
}

/* Team cards */
html[data-bs-theme=dark] .team-content,
html[data-bs-theme=dark] .team-single-wrapper {
    background: var(--oaa-surface);
    border: 1px solid var(--oaa-border);
    box-shadow: none;
}

html[data-bs-theme=dark] .team-social a:hover {
    background: var(--oaa-surface-3);
}

/* Login form (style.css shared block) */
html[data-bs-theme=dark] .login-form {
    background: var(--oaa-surface);
    border: 1px solid var(--oaa-border);
    box-shadow: none;
}

html[data-bs-theme=dark] .login-form label {
    color: var(--oaa-ink);
}

/* Pagination — light version is navy-on-white; on a dark page the
   navy pill disappears, so step it up a surface + border */
html[data-bs-theme=dark] .pagination .page-link {
    background: var(--oaa-surface-3);
    border: 1px solid var(--oaa-border);
    color: var(--oaa-ink);
}

/* FAQ accordions (style.css shell; Bootstrap themes the innards) */
html[data-bs-theme=dark] .faq-area .accordion-item {
    box-shadow: none;
    border: 1px solid var(--oaa-border);
}

html[data-bs-theme=dark] .accordion-button:not(.collapsed) {
    border-bottom-color: var(--oaa-accent);
}

/* Fees section (ATPL/PPL pricing) */
html[data-bs-theme=dark] .fees-section {
    background: linear-gradient(135deg, var(--oaa-surface-2) 0%, var(--oaa-bg) 100%);
}

html[data-bs-theme=dark] .fee-card {
    background: var(--oaa-surface);
    box-shadow: none;
    border: 2px solid var(--oaa-border);
}

html[data-bs-theme=dark] .fee-card:hover {
    box-shadow: var(--oaa-shadow);
    border-color: var(--oaa-accent);
}

html[data-bs-theme=dark] .fee-card.premium {
    background: var(--oaa-surface);
    border-color: var(--oaa-accent);
}

html[data-bs-theme=dark] .fee-amount {
    background: var(--oaa-surface-2);
}

html[data-bs-theme=dark] .fee-header h3,
html[data-bs-theme=dark] .fee-amount .amount {
    color: var(--oaa-ink);
}

html[data-bs-theme=dark] .fee-amount .currency,
html[data-bs-theme=dark] .fee-details li,
html[data-bs-theme=dark] .fee-note {
    color: var(--oaa-ink-muted);
}

html[data-bs-theme=dark] .fee-cta .btn-outline-primary {
    border-color: var(--oaa-accent);
    color: var(--oaa-accent);
}

/* Search popup (magnifier overlay) — inputs have no explicit light
   bg (UA white); pin them to the dark surface */
html[data-bs-theme=dark] .search-popup .form-group input[type="text"],
html[data-bs-theme=dark] .search-popup .form-group input[type="search"] {
    background: var(--oaa-surface-3);
    color: var(--oaa-ink);
}

html[data-bs-theme=dark] .search-popup input::placeholder,
html[data-bs-theme=dark] .search-popup textarea::placeholder {
    color: var(--oaa-ink-muted);
}

/* Floating social sidebar */
html[data-bs-theme=dark] .sticky li {
    background-color: rgba(24, 35, 51, 0.65);
}

/* Mobile search icon (shown <992px) */
html[data-bs-theme=dark] .mobile-search-btn {
    color: var(--oaa-ink);
}

/* ---------- 4. Vendor components ---------- */

/* jquery.nice-select — white panel dropdown replacing <select> */
html[data-bs-theme=dark] .nice-select {
    background-color: var(--oaa-surface-3);
    border-color: var(--oaa-border-strong);
    color: var(--oaa-ink-muted);
}

html[data-bs-theme=dark] .nice-select:hover,
html[data-bs-theme=dark] .nice-select.open,
html[data-bs-theme=dark] .nice-select:active,
html[data-bs-theme=dark] .nice-select:focus {
    border-color: var(--oaa-accent);
}

html[data-bs-theme=dark] .nice-select .list {
    background-color: var(--oaa-surface-3);
    box-shadow: var(--oaa-shadow);
    border: 1px solid var(--oaa-border);
}

html[data-bs-theme=dark] .nice-select .option {
    color: var(--oaa-ink-muted);
}

html[data-bs-theme=dark] .nice-select .option:hover,
html[data-bs-theme=dark] .nice-select .option.focus,
html[data-bs-theme=dark] .nice-select .option.selected.focus {
    background-color: var(--oaa-accent-tint);
    color: var(--oaa-ink);
}

/* SweetAlert2 — CSS-only theming; the Swal.fire() call sites keep
   confirmButtonColor '#1782c5' (brand, theme-constant) untouched */
html[data-bs-theme=dark] .swal2-popup {
    background: var(--oaa-surface-3);
    color: var(--oaa-ink-muted);
}

html[data-bs-theme=dark] .swal2-title {
    color: var(--oaa-ink);
}

html[data-bs-theme=dark] .swal2-html-container {
    color: var(--oaa-ink-muted);
}

html[data-bs-theme=dark] .swal2-input,
html[data-bs-theme=dark] .swal2-select,
html[data-bs-theme=dark] .swal2-textarea {
    background: var(--oaa-surface);
    color: var(--oaa-ink);
    border-color: var(--oaa-border-strong);
}

/* Google Maps embeds can't be CSS-themed — frame them so the light
   tiles don't glow hard-edged against the navy page */
html[data-bs-theme=dark] iframe[src*="google.com/maps"] {
    border: 1px solid var(--oaa-border);
    border-radius: 8px;
}

/* NOTE: no global floating-label patch here. The legacy service-request
   form components that paint .form-floating>.form-select~label{background:#fff}
   carry their own scoped [data-bs-theme=dark] overrides; a global dark patch
   would add an opaque chip on pages whose light theme has none (it clipped
   the select text on /services). */
