@import 'theme.css';

/* 
 * SwiftBus Premium Style System - Luxury Gold & Cream Theme
 * Designed with modern CSS variables, responsive seat layouts, and smooth theme switching.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Map style variables to centralized variables */
    --bg-card: var(--card-bg);
    --text-main: var(--text-primary);
    --text-muted: var(--text-secondary);
    --border-glass: var(--border-color);

    --accent-gold-gradient: linear-gradient(135deg, #198754 0%, var(--accent-primary) 100%);
    --bg-glass: rgba(255, 255, 255, 0.95);

    /* Seat colors - Refined Premium Palette */
    --seat-available: #FFFDF8;
    --seat-selected: #0F5132;
    --seat-booked: #9CA3AF;
    --seat-hold: #EAB308;
    --seat-female: #F472B6;
    --seat-female-border: #EC4899;
    --seat-disabled: #BDC3C7;

    /* Theme mapping compatibility */
    --accent-indigo: var(--accent-primary);
    --accent-violet: #146C43;
    --accent-pink: var(--accent-secondary);

    --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 35px -5px rgba(15, 81, 50, 0.15);
    --input-bg: #FFFFFF;
    --text-white-fixed: #FFFFFF;
    --body-bg-gradient: radial-gradient(circle at 50% 0%, var(--bg-secondary) 0%, var(--bg-primary) 70%);

    /* Close button filter */
    --btn-close-filter: invert(0) grayscale(1) brightness(0);
}


[data-theme="dark"] {
    --bg-card: var(--card-bg);
    --text-main: var(--text-primary);
    --text-muted: var(--text-secondary);
    --border-glass: var(--border-color);

    --accent-gold-gradient: linear-gradient(135deg, #198754 0%, var(--accent-primary) 100%);
    --bg-glass: rgba(18, 18, 18, 0.95);

    /* Seat colors */
    --seat-available: #1a1a1a;
    --seat-selected: #198754;
    --seat-booked: #4b5563;
    --seat-hold: #CA8A04;
    --seat-female: #DB2777;
    --seat-female-border: #BE185D;
    --seat-disabled: #2a2a2a;

    /* Theme mapping compatibility */
    --accent-indigo: var(--accent-primary);
    --accent-violet: #146C43;
    --accent-pink: var(--accent-secondary);

    --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 15px 35px -5px rgba(25, 135, 84, 0.25);
    --input-bg: var(--card-bg);
    --text-white-fixed: #FFFFFF;
    --body-bg-gradient: radial-gradient(circle at 50% 0%, var(--bg-secondary) 0%, var(--bg-primary) 70%);

    /* Close button filter */
    --btn-close-filter: invert(1);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--body-bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: var(--shadow-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-hover);
}

/* Core Brand Typography */
.text-gradient {
    background: var(--accent-gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-purple {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar Premium Styling */
.navbar-swift {
    background: transparent !important;
    border-bottom: 1px solid transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 1rem 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease !important;
    will-change: transform;
}

.navbar-swift.scrolled {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    transform: translateY(0);
}

.navbar-swift.scroll-down {
    transform: translateY(-100%);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main) !important;
}

/* Transparent navbar high-contrast style rules */
.navbar-swift:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

.navbar-swift:not(.scrolled) .nav-link:hover,
.navbar-swift:not(.scrolled) .nav-link.active {
    color: #ffffff !important;
}

.navbar-swift:not(.scrolled) .navbar-brand i {
    color: #ffffff !important;
}

.navbar-swift:not(.scrolled) .navbar-brand .text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.navbar-swift:not(.scrolled) .btn-secondary-glass {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.navbar-swift:not(.scrolled) .btn-secondary-glass i {
    color: #ffffff !important;
}

.navbar-swift:not(.scrolled) .navbar-toggler-icon {
    filter: invert(1);
}

/* Dropdown Menu overrides */
.dropdown-menu.glass-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-glass) !important;
}

.dropdown-item {
    color: var(--text-main) !important;
}

.dropdown-item:hover {
    background: var(--bg-secondary) !important;
    color: var(--accent-primary) !important;
}

/* =========================================
   Profile Avatar Button & Dropdown
   ========================================= */

/* Avatar Circle Trigger */
.profile-avatar-btn {
    background: linear-gradient(135deg, var(--accent-primary), #146c43) !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(var(--accent-primary-rgb, 25, 135, 84), 0.35);
}

.profile-avatar-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 16px rgba(var(--accent-primary-rgb, 25, 135, 84), 0.45) !important;
}

.profile-avatar-btn:active {
    transform: scale(0.97);
}

.profile-avatar-initials {
    font-weight: 700;
    font-size: 0.85rem;
    color: #ffffff;
    line-height: 1;
    letter-spacing: 0;
}

/* Small status dot for admin/agent */
.profile-role-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--bg-primary);
}

/* Dropdown Panel */
.profile-dropdown {
    width: 280px !important;
    min-width: 280px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-glass) !important;
    box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.18) !important;
    animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Dropdown Header */
.profile-dropdown-header {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.08) 0%, rgba(20, 108, 67, 0.04) 100%);
    border-bottom: 1px solid var(--border-glass);
}

.profile-avatar-lg {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #146c43);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.profile-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.3;
    max-width: 160px;
}

.profile-role-badge {
    display: inline-block;
    background: rgba(25, 135, 84, 0.12);
    color: var(--accent-primary);
    border: 1px solid rgba(25, 135, 84, 0.25);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 1px 7px;
    border-radius: 20px;
    margin-top: 2px;
}

/* Divider */
.profile-dropdown-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 0;
}

/* Menu Items */
.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.profile-dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
    transform: translateX(2px);
}

.profile-dropdown-item:active {
    transform: scale(0.98) translateX(2px);
}

.profile-item-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.profile-dropdown-item:hover .profile-item-icon {
    background: rgba(25, 135, 84, 0.12);
    color: var(--accent-primary);
}

/* Logout item */
.profile-logout {
    color: #ef4444 !important;
}

.profile-logout .profile-item-icon {
    color: #ef4444;
}

.profile-logout:hover {
    background: rgba(239, 68, 68, 0.07) !important;
    color: #ef4444 !important;
    transform: translateX(2px);
}

.profile-logout:hover .profile-item-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}


/* =========================================
   Redesigned Premium Navbar Elements
   ========================================= */

.swift-brand-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: #198754;
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

.navbar-swift:not(.scrolled) .swift-brand-text {
    color: #ffffff !important;
}

/* Glass Search Bar */
.navbar-search-wrapper {
    width: 100%;
    max-width: 420px;
    transition: max-width 0.3s ease;
}

.navbar-search-input {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 12px !important;
    padding: 0.6rem 1rem 0.6rem 2.8rem !important;
    color: #ffffff !important;
    font-size: 0.9rem !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.navbar-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.search-icon-left {
    position: absolute;
    left: 1.1rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

/* Focused search input */
.navbar-search-input:focus {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1) !important;
}

/* Scrolled state search input */
.navbar-swift.scrolled .navbar-search-input {
    background: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #1f2937 !important;
}

.navbar-swift.scrolled .navbar-search-input::placeholder {
    color: rgba(0, 0, 0, 0.45) !important;
}

.navbar-swift.scrolled .search-icon-left {
    color: rgba(0, 0, 0, 0.45);
}

.navbar-swift.scrolled .navbar-search-input:focus {
    background: #ffffff !important;
    border-color: #198754 !important;
    box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.1) !important;
}

/* Navigation Actions (My Trips / Support) */
.nav-action-link {
    text-decoration: none !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 600;
    transition: all 0.25s ease;
    text-align: center;
}

.navbar-swift.scrolled .nav-action-link {
    color: #4b5563 !important;
}

.action-icon {
    font-size: 1.25rem;
    margin-bottom: 2px;
    transition: transform 0.25s ease;
}

.action-label {
    font-size: 0.72rem;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.nav-action-link:hover {
    color: #ffffff !important;
}

.nav-action-link:hover .action-icon {
    transform: translateY(-2px);
}

.navbar-swift.scrolled .nav-action-link:hover {
    color: #198754 !important;
}

/* Vertical divider between Support and Profile */
.divider-vertical {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.25);
    align-self: center;
}

.navbar-swift.scrolled .divider-vertical {
    background: rgba(0, 0, 0, 0.08);
}

/* Custom Profile Button Toggle adjustment for new layout */
.navbar-swift:not(.scrolled) .profile-avatar-btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(255, 255, 255, 0.2) !important;
}

/* Premium Buttons */
.btn-primary-gradient {
    background: var(--accent-gold-gradient);
    border: none;
    color: var(--text-white-fixed) !important;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(15, 81, 50, 0.25);
    transition: all 0.3s ease;
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 81, 50, 0.4);
    opacity: 0.95;
    color: var(--text-white-fixed) !important;
}

.btn-secondary-glass {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    font-weight: 500;
    padding: 0.75rem 1.75rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-secondary-glass:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    color: var(--text-main);
    transform: translateY(-1px);
}

/* Form Styling */
.form-control-swift {
    background: var(--input-bg);
    border: 1px solid var(--border-glass);
    color: var(--text-main) !important;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control-swift:focus {
    background: var(--input-bg);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(15, 81, 50, 0.15);
    outline: none;
}

.form-control-swift::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Dashboard Metric Cards */
.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: rotate(30deg);
    transition: 0.8s;
}

.metric-card:hover::after {
    left: 120%;
}

.metric-icon {
    font-size: 2.2rem;
    background: rgba(200, 169, 107, 0.08);
    border: 1px solid rgba(200, 169, 107, 0.2);
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

/* Tables */
.table-swift,
.table-swift.table-dark {
    background-color: transparent !important;
    --bs-table-bg: transparent !important;
    --bs-table-color: var(--text-main) !important;
    --bs-table-hover-color: var(--text-main) !important;
    --bs-table-hover-bg: var(--bg-secondary) !important;
    color: var(--text-main) !important;
}

.table-swift tr {
    border-bottom: 1px solid var(--border-glass);
}

.table-swift th {
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-glass) !important;
    padding: 1rem;
}

.table-swift td {
    padding: 1rem;
    vertical-align: middle;
}

/* Interactive Seat Layout System */
.seat-map-container {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: var(--shadow-main);
}

.seat-grid-seater {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.seat-grid-sleeper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.seat-walkway {
    grid-column: 3;
}

/* Seats */
.seat {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    background: #E2E8F0;
    color: #475569;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: all 0.2s ease;
}

.seat.sleeper-berth {
    aspect-ratio: 1 / 2;
    border-radius: 12px;
}

.seat.available {
    background: #FFFDF8 !important;
    border-color: #D4C9B5 !important;
    color: #0F5132 !important;
}

.seat.available:hover {
    background: #F0EAD8 !important;
    border-color: #C8A96B !important;
    transform: scale(1.05);
}

.seat.selected {
    background: #0F5132 !important;
    border-color: #0a3d22 !important;
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(15, 81, 50, 0.35);
}

.seat.booked {
    background: #9CA3AF !important;
    border-color: #6B7280 !important;
    color: #ffffff !important;
    cursor: not-allowed;
}

.seat.blocked {
    background: #343a40 !important;
    border-color: #212529 !important;
    color: #adb5bd !important;
    cursor: not-allowed;
}

.seat.female_booked {
    background: #F472B6 !important;
    border-color: #EC4899 !important;
    color: #ffffff !important;
    cursor: not-allowed;
}

.seat.female_protected {
    background: rgba(244, 114, 182, 0.08) !important;
    border: 2px dashed #EC4899 !important;
    color: #EC4899 !important;
    font-weight: 700;
}

.seat.temp_locked {
    background: #FEF08A !important;
    border-color: #EAB308 !important;
    color: #854D0E !important;
}

.seat.hold {
    background: #EAB308 !important;
    border-color: #B45309 !important;
    color: #1C1917 !important;
}

.seat.reserved {
    background: #BFDBFE !important;
    border-color: #3B82F6 !important;
    color: #1E3A8A !important;
    cursor: not-allowed;
}

.seat.driver {
    background: var(--bg-secondary) !important;
    border-color: var(--border-glass) !important;
    color: var(--text-muted) !important;
    cursor: default;
    opacity: 0.5;
}

.seat .price-lbl {
    font-size: 0.55rem;
    font-weight: 500;
    margin-top: 1px;
    display: block;
}

/* Status Legend */
.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

/* Floating dynamic news notice */
.notice-marquee {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-glass);
    padding: 0.5rem 1rem;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.9rem;
}

.notice-marquee span {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 25s linear infinite;
    color: var(--text-main);
}

@keyframes marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Custom footer */
.footer-swift {
    border-top: 1px solid var(--border-glass);
    background: var(--bg-secondary);
    padding: 3rem 0;
    margin-top: 4rem;
    color: var(--text-muted);
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-link:hover {
    color: var(--accent-primary);
}

/* Sidebar Overrides for Admin & Agent Portals */
body .sidebar-admin,
body .sidebar-agent {
    background: var(--bg-card) !important;
    border-right: 1px solid var(--border-glass) !important;
}

.sidebar-link {
    color: var(--text-muted) !important;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--text-main) !important;
    background: rgba(200, 169, 107, 0.08) !important;
    border-left: 3px solid var(--accent-primary) !important;
}

/* Text elements & titles in admin/agent dashboard */
.text-white {
    color: var(--text-main) !important;
}

.text-secondary {
    color: var(--text-muted) !important;
}

/* Modal Overrides */
body .modal-content,
.modal-content.glass-card,
.modal-content {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-glass) !important;
}

.modal-content.text-white {
    color: var(--text-main) !important;
}

.modal-header,
.modal-footer {
    border-color: var(--border-glass) !important;
}

.modal-title,
.modal-title.text-white {
    color: var(--text-main) !important;
}

.btn-close-white {
    filter: var(--btn-close-filter) !important;
}

/* Floating Theme Toggle Button Styling */
.theme-toggle-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-main);
    color: var(--text-main);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1050;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-primary);
}

.theme-toggle-btn:active {
    transform: translateY(-1px) scale(0.95);
}

/* Bootstrap Utility Theme Overrides */
.bg-dark {
    background-color: var(--bg-secondary) !important;
}

/* Custom Accordion Styling to adapt to light/dark themes */
.accordion-button {
    color: var(--text-main) !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    color: var(--accent-primary) !important;
    background-color: transparent !important;
}

.accordion-button::after {
    filter: var(--btn-close-filter);
}

.bg-secondary {
    background-color: var(--border-glass) !important;
    color: var(--text-main) !important;
}

.border-secondary {
    border-color: var(--border-glass) !important;
}

.border-opacity-30,
.border-opacity-25,
.border-opacity-20 {
    border-color: var(--border-glass) !important;
}

.text-white {
    color: var(--text-main) !important;
}

.text-white-fixed {
    color: var(--text-white-fixed) !important;
}

/* 
 * Premium Representational Seating Styles
 * Visually distinguishes Seater, Semi-Sleeper, Sleeper, and Double Sleeper layout nodes.
 */

/* Force direct relative boundaries for seat containers and text z-index */
.seat,
.builder-seat,
.console-seat-box,
.pricing-seat-box {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-end !important;
    /* Align text cleanly to bottom half */
    padding-bottom: 8px !important;
    box-sizing: border-box !important;
}

/* Ensure text stays on top of visual cushions and pillows */
.seat span,
.seat i,
.builder-seat span,
.console-seat-box span,
.pricing-seat-box span {
    z-index: 5 !important;
}

/* 1. Normal Seater Seats */
.type-normal {
    border-radius: 8px 8px 14px 14px !important;
    border-width: 1.5px !important;
}

.seat.type-normal::before,
.builder-seat.type-normal::before,
.console-seat-box.type-normal::before,
.pricing-seat-box.type-normal::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 12%;
    width: 76%;
    height: 30%;
    border-bottom: 1.5px solid currentColor;
    opacity: 0.35;
    border-radius: 4px 4px 0 0;
}

/* 2. Semi Sleeper Seats (Luxury Headrest Cushion & Border) */
.type-semi-sleeper {
    border-radius: 10px 10px 16px 16px !important;
    border-width: 2px !important;
    box-shadow: inset 0 0 5px rgba(200, 169, 107, 0.2) !important;
}

.seat.type-semi-sleeper::before,
.builder-seat.type-semi-sleeper::before,
.console-seat-box.type-semi-sleeper::before,
.pricing-seat-box.type-semi-sleeper::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 15%;
    width: 70%;
    height: 28%;
    border-bottom: 2px solid currentColor;
    opacity: 0.5;
    border-radius: 4px 4px 0 0;
}

.seat.type-semi-sleeper::after,
.builder-seat.type-semi-sleeper::after,
.console-seat-box.type-semi-sleeper::after,
.pricing-seat-box.type-semi-sleeper::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 25%;
    width: 50%;
    height: 5px;
    background: currentColor;
    opacity: 0.35;
    border-radius: 3px;
}

/* 3. Sleeper Berths (Long Single Bed with pillow accent) */
.type-sleeper,
.type-lower-sleeper,
.type-upper-sleeper {
    border-radius: 10px !important;
}

.seat.type-sleeper::before,
.seat.type-lower-sleeper::before,
.seat.type-upper-sleeper::before,
.builder-seat.type-sleeper::before,
.builder-seat.type-lower-sleeper::before,
.builder-seat.type-upper-sleeper::before,
.console-seat-box.type-sleeper::before,
.console-seat-box.type-lower-sleeper::before,
.console-seat-box.type-upper-sleeper::before,
.pricing-seat-box.type-sleeper::before,
.pricing-seat-box.type-lower-sleeper::before,
.pricing-seat-box.type-upper-sleeper::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 15%;
    width: 70%;
    height: 10px;
    background: rgba(15, 81, 50, 0.1);
    border: 1px solid currentColor;
    opacity: 0.55;
    border-radius: 3px;
}

/* 4. Double Sleeper Berths (Wider Double Bed with two pillows side-by-side) */
.type-double-sleeper-lower,
.type-double-sleeper-upper,
.type-double-sleeper {
    border-radius: 12px !important;
    border-width: 2px !important;
}

.seat.type-double-sleeper-lower::before,
.seat.type-double-sleeper-upper::before,
.seat.type-double-sleeper::before,
.builder-seat.type-double-sleeper-lower::before,
.builder-seat.type-double-sleeper-upper::before,
.builder-seat.type-double-sleeper::before,
.console-seat-box.type-double-sleeper-lower::before,
.console-seat-box.type-double-sleeper-upper::before,
.console-seat-box.type-double-sleeper::before,
.pricing-seat-box.type-double-sleeper-lower::before,
.pricing-seat-box.type-double-sleeper-upper::before,
.pricing-seat-box.type-double-sleeper::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 12%;
    width: 32%;
    height: 10px;
    background: rgba(200, 169, 107, 0.1);
    border: 1px solid currentColor;
    opacity: 0.55;
    border-radius: 3px;
}

.seat.type-double-sleeper-lower::after,
.seat.type-double-sleeper-upper::after,
.seat.type-double-sleeper::after,
.builder-seat.type-double-sleeper-lower::after,
.builder-seat.type-double-sleeper-upper::after,
.builder-seat.type-double-sleeper::after,
.console-seat-box.type-double-sleeper-lower::after,
.console-seat-box.type-double-sleeper-upper::after,
.console-seat-box.type-double-sleeper::after,
.pricing-seat-box.type-double-sleeper-lower::after,
.pricing-seat-box.type-double-sleeper-upper::after,
.pricing-seat-box.type-double-sleeper::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 12%;
    width: 32%;
    height: 10px;
    background: rgba(15, 81, 50, 0.1);
    border: 1px solid currentColor;
    opacity: 0.55;
    border-radius: 3px;
}

/* Color overrides for branding classes */
.text-indigo {
    color: var(--accent-primary) !important;
}

.bg-indigo {
    background-color: var(--accent-primary) !important;
}

.text-pink {
    color: var(--accent-secondary) !important;
}

.bg-pink {
    background-color: var(--accent-secondary) !important;
}

.text-gradient-purple {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--accent-primary) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* Page structural fix to prevent white space below footer on short content pages */
html,
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.footer-swift {
    margin-top: auto !important;
}

/* Theme compatibility styles for the redesigned Light/Dark footer */
.footer-swift {
    background: #ffffff !important;
    color: #4b5563 !important;
    border-top: 1px solid rgba(25, 135, 84, 0.08) !important;
}

.footer-swift h5 .text-dark,
.footer-swift h6 {
    color: #1f2937 !important;
}

.footer-swift p,
.footer-swift .footer-link,
.footer-swift .social-btn {
    color: #6b7280 !important;
}

.footer-swift .social-btn {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.footer-swift hr {
    border-color: rgba(0, 0, 0, 0.05) !important;
}

/* Dark theme overrides for footer */
[data-theme="dark"] .footer-swift {
    background: #080808 !important;
    color: #adb5bd !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 -15px 30px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .footer-swift h5 .text-dark,
[data-theme="dark"] .footer-swift h6 {
    color: #ffffff !important;
}

[data-theme="dark"] .footer-swift p,
[data-theme="dark"] .footer-swift .footer-link,
[data-theme="dark"] .footer-swift .social-btn {
    color: #adb5bd !important;
}

[data-theme="dark"] .footer-swift .social-btn {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .footer-swift hr {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* =========================================
   Responsive Design Rules & Media Queries
   ========================================= */

@media (max-width: 991.98px) {
    .sidebar-agent {
        display: none !important;
    }

    .main-display-panel,
    .main-site-content {
        padding-top: 1.5rem !important;
        padding-bottom: 2rem !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        width: 100% !important;
    }
}

@media (max-width: 767.98px) {

    /* Responsive Spacing & Padding */
    .glass-card {
        padding: 1.25rem !important;
        border-radius: 12px !important;
    }

    /* Responsive Titles and Typography */
    h2,
    .fs-2 {
        font-size: 1.6rem !important;
    }

    h3,
    .fs-3 {
        font-size: 1.4rem !important;
    }

    h4,
    .fs-4 {
        font-size: 1.2rem !important;
    }

    h5,
    .fs-5 {
        font-size: 1.05rem !important;
    }

    /* Metrics Layout adjustments */
    .metric-card {
        padding: 1.25rem !important;
    }

    .metric-icon {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.6rem !important;
    }

    /* Checkout Form tweaks */
    #paymentCheckForm .p-4 {
        padding: 1.25rem !important;
        border-radius: 12px !important;
    }

    /* Summary Panel (Disable fixed top on mobile) */
    .col-lg-4 .glass-card,
    .col-lg-5 .glass-card {
        position: static !important;
        margin-top: 0 !important;
    }

    /* Homepage Hero & Search Panel Reset */
    #search-panel {
        margin: 1.5rem auto !important;
        position: static !important;
    }

    .hero-video-section {
        height: auto !important;
        min-height: auto !important;
        padding-bottom: 3rem !important;
    }
}

@media (max-width: 575.98px) {
    .glass-card {
        padding: 1rem !important;
    }

    /* Grid Seat Layout scaling for extremely narrow viewports */
    #seats-builder-canvas,
    #grid-canvas {
        transform: scale(0.9);
        transform-origin: top center;
    }

    .seat-map-container {
        padding: 1rem !important;
    }
}

/* =======================================================
   MOBILE-FIRST RESPONSIVE AUDIT OVERRIDES (320px - 1440px)
   ======================================================= */

/* 1. Global Overflow Prevention */
* {
    max-width: 100%;
}

html,
body {
    overflow-x: hidden !important;
    width: 100%;
}

.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Word breaks to prevent text/email/reference overflow */
.text-break-all,
.table td,
.table th,
.info-value,
.profile-name,
.passenger-table td,
.passenger-table th {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

/* 2. Responsive Tables Custom Grid Fallback for Viewports < 768px */
@media (max-width: 767.98px) {
    .table-swift-mobile-cards {
        display: block !important;
        width: 100% !important;
    }

    .table-swift-mobile-cards thead {
        display: none !important;
    }

    .table-swift-mobile-cards tbody,
    .table-swift-mobile-cards tr,
    .table-swift-mobile-cards td {
        display: block !important;
        width: 100% !important;
    }

    .table-swift-mobile-cards tr {
        margin-bottom: 1rem !important;
        background: var(--bg-card) !important;
        border: 1px solid var(--border-glass) !important;
        border-radius: 12px !important;
        padding: 0.75rem !important;
    }

    .table-swift-mobile-cards td {
        text-align: left !important;
        padding: 0.5rem 0.25rem !important;
        border: none !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-bottom: 1px dashed var(--border-glass) !important;
    }

    .table-swift-mobile-cards td:last-child {
        border-bottom: none !important;
    }

    .table-swift-mobile-cards td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.8rem;
        text-transform: uppercase;
        margin-right: 15px;
    }
}

/* 3. Seat Map Scaling for Small Devices */
@media (max-width: 480px) {
    .seat-map-container {
        transform: scale(0.9);
        transform-origin: top center;
        margin-bottom: -10% !important;
    }
}

@media (max-width: 375px) {
    .seat-map-container {
        transform: scale(0.82);
        transform-origin: top center;
        margin-bottom: -18% !important;
    }
}

@media (max-width: 320px) {
    .seat-map-container {
        transform: scale(0.72);
        transform-origin: top center;
        margin-bottom: -28% !important;
    }
}

/* 4. Floating Elements Z-Index and Placement Protection */
.theme-toggle-btn {
    bottom: 1rem !important;
    right: 1rem !important;
    width: 3rem !important;
    height: 3rem !important;
    font-size: 1rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* 5. Fluid Typography Protection */
@media (max-width: 575.98px) {

    h1,
    .fs-1 {
        font-size: 2rem !important;
    }

    h2,
    .fs-2 {
        font-size: 1.5rem !important;
    }

    h3,
    .fs-3 {
        font-size: 1.3rem !important;
    }

    h4,
    .fs-4 {
        font-size: 1.1rem !important;
    }

    body,
    p,
    input,
    select,
    button {
        font-size: 0.9rem !important;
    }

    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* 6. Form elements optimization */
input,
select,
textarea {
    font-size: 16px !important;
    /* Prevents auto-zoom on iOS Safari */
}