/* --- FORCE DARK THEME OVERRIDES --- */
/* Fixes persistent Purple Gradient on Coming Soon pages */
.coming-soon-container {
    background: var(--dark-bg) !important;
    background-image: none !important;
    color: var(--text-light) !important;
}

/* Removes the white radial gradient animation */
.coming-soon-container::before {
    display: none !important;
}

/* Fixes Bottom Navigation Background */
.bottom-nav {
    background: var(--dark-card) !important;
    border-top: 1px solid #333 !important;
}

/* Fixes 3D Button Contrast */
.btn-3d {
    background: var(--primary) !important;
    color: black !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    text-transform: uppercase;
    font-weight: 800;
}

/* Fixes Cart Header Background */
.cart-header {
    background: var(--dark-card) !important;
    border-bottom: 1px solid #333 !important;
}

/* Fixes Cart View Background */
.cart-view {
    background: var(--dark-bg) !important;
}

/* Fixes Full Screen Login Modal Background */
.login-modal-full {
    background: var(--dark-bg) !important;
}

/* Fixes Sidebar Drawer Background */
.side-drawer {
    background: var(--dark-card) !important;
}

.drawer-header {
    background: var(--dark-card) !important;
    border-bottom: 1px solid #333 !important;
}

/* Fixes Dialogs */
.contact-dialog,
.custom-dialog {
    background: var(--dark-card) !important;
    color: var(--text-light) !important;
}

/* --- HIGH CONTRAST TEXT OVERRIDES --- */

/* Sidebar / Drawer Logic */
.drawer-item {
    color: var(--text-light) !important;
    border-bottom: 1px solid #333 !important;
}

.drawer-user-title {
    color: var(--primary) !important;
}

.drawer-user-sub {
    color: #ccc !important;
}

.drawer-profile-icon {
    background: #333 !important;
    color: var(--primary) !important;
}

.drawer-item-icon {
    color: var(--primary) !important;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-light) !important;
}

/* Cart & Order Items */
.cart-item-name,
.order-item-name {
    color: var(--text-light) !important;
}

.cart-item-price,
.order-item-price {
    color: var(--accent) !important;
}

.cart-item-variants {
    color: #ccc !important;
}

/* Summary Card */
.cart-summary-card h3,
.cart-delivery-card h3 {
    color: var(--text-muted) !important;
}

.summary-line {
    color: var(--text-light) !important;
}

.summary-line.total {
    color: var(--primary) !important;
}

.checkout-price .total-val {
    color: var(--primary) !important;
}

/* Form Inputs */
input,
textarea,
select {
    background: var(--dark-input) !important;
    color: white !important;
    border: 1px solid #444 !important;
}

::placeholder {
    color: #888 !important;
}

/* General Text Fixes */
.text-muted {
    color: #ccc !important;
}

/* --- SESSION 5 VISUAL FIXES --- */

/* 1. Fix Coming Soon Center Alignment */
.coming-soon-container {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    position: fixed !important;
    /* Pin to viewport */
    top: 60px !important;
    /* Below Header */
    bottom: 70px !important;
    /* Above Nav */
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    /* Allow it to fill space without overflow */
    margin: 0 !important;
    padding: 20px !important;
    /* Add internal spacing */
    height: auto !important;
    background: var(--dark-bg) !important;
    z-index: 999 !important;
    /* Below Header (1000) */
    box-sizing: border-box !important;
}

/* Ensure the inner wrapper is also centered and restricted */
.coming-soon-content {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.coming-soon-title,
.coming-soon-text {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    word-wrap: break-word !important;
    /* wrap long words like MOUTHWATERING */
    overflow-wrap: break-word !important;
}

.coming-soon-title {
    font-size: clamp(24px, 6vw, 36px) !important;
    /* Responsive font size */
    line-height: 1.2 !important;
}

/* 2. Fix Nav Bar Text Visibility */
.nav-item {
    color: #999 !important;
    /* Lighter gray for inactive state */
}

.nav-item.active {
    color: var(--primary) !important;
    /* Orange for active state */
}

.nav-label {
    font-size: 10px !important;
    margin-top: 2px !important;
}

/* 3. Green Cart Icon & Bold Black Image */
.fab-cart {
    background: var(--dominos-green) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4) !important;
}

.fab-icon {
    font-size: 24px !important;
    color: black !important;
    filter: brightness(0) !important;
    /* Forces emoji to be black silhouette */
    font-weight: 900 !important;
}

.fab-badge {
    background: white !important;
    color: var(--dominos-green) !important;
}

/* --- SESSION 5 PART 2: MENU VIEW THEMING --- */

/* 1. Menu Header */
.menu-header-bar {
    background: var(--dark-card) !important;
    color: var(--text-light) !important;
    border-bottom: 1px solid #333 !important;
}

.menu-title-text {
    color: var(--text-light) !important;
}

.btn-back,
.btn-search-trigger {
    color: var(--text-light) !important;
}

/* 2. Filter Bar & Chips */
.filters-bar {
    background: var(--dark-bg) !important;
    border-bottom: 1px solid #333 !important;
}

.filter-chip {
    background: var(--dark-card) !important;
    border: 1px solid #444 !important;
    color: var(--text-muted) !important;
}

.filter-chip.active {
    background: rgba(251, 197, 49, 0.2) !important;
    /* Gold tint */
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

/* 3. Category Chips Stick Bar */
.menu-cat-chips {
    background: var(--dark-bg) !important;
    border-bottom: 1px solid #333 !important;
}

.cat-chip {
    color: var(--text-muted) !important;
}

.cat-chip.active {
    color: var(--primary) !important;
    /* Gold/Orange */
    border-bottom-color: var(--primary) !important;
}

/* --- SESSION 6: CUSTOM ALERTS --- */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    /* Darker backdrop */
    z-index: 2000;
    /* Highest priority */
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.custom-alert-box {
    background: var(--dark-card) !important;
    border: 1px solid var(--primary) !important;
    padding: 24px;
    border-radius: 16px;
    width: 85%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-alert-content p {
    color: var(--text-light) !important;
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.custom-alert-btn {
    width: 100%;
    padding: 12px 0;
    font-size: 14px;
    letter-spacing: 1px;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- SESSION 9: PROFILE VIEW THEMING --- */
.profile-view-container {
    background: var(--dark-bg) !important;
    color: var(--text-light) !important;
    min-height: 100vh;
}

.profile-section-card {
    background: var(--dark-card) !important;
    border: 1px solid #333 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
    margin-bottom: 15px;
    border-radius: 12px;
}

.profile-section-title {
    color: var(--primary) !important;
    font-weight: 800;
    margin-bottom: 10px;
}

.btn-action-tile {
    color: var(--text-light) !important;
    background: transparent !important;
    /* Ensure no white bg */
}

/* Ensure saved cards/wallet text is visible */
.btn-action-tile span {
    color: var(--text-light);
}

.profile-header-title {
    color: var(--text-light) !important;
}

.btn-back {
    color: var(--text-light) !important;
}

.profile-header-bar {
    background: var(--dark-bg) !important;
    border-bottom: 1px solid #333 !important;
    color: var(--text-light) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
}

/* --- SESSION 7: PWA BANNER THEMING --- */
#pwa-install-banner {
    background: var(--dark-card) !important;
    border-top: 1px solid var(--primary) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5) !important;
    color: var(--text-light) !important;
}

#pwa-install-banner h4 {
    color: var(--primary) !important;
    /* Gold/Orange */
    margin-bottom: 4px !important;
}

#pwa-install-banner p {
    color: var(--text-muted) !important;
}

#closePwaBtn {
    color: var(--text-muted) !important;
    font-size: 24px !important;
    opacity: 0.8;
}

#installBtn {
    background: var(--dominos-green) !important;
    color: white !important;
    border: none !important;
    font-weight: bold;
    text-transform: uppercase;
}

/* Force dark theme for PWA banner with new class */
:root {
    /* Soft Dark Palette Overrides */
    --dark-bg: #161616 !important;
    --dark-card: #222222 !important;
    --dark-input: #2a2a2a !important;
    --text-light: #e8e8e8 !important;
    --text-muted: #b8b8b8 !important;
}

.dark-theme-banner {
    background: var(--dark-card) !important;
    color: var(--text-light) !important;
    border-top: 1px solid var(--primary) !important;
}

/* --- EYE COMFORT & VISIBILITY POLISH --- */
.card,
.section-card,
.side-drawer,
.cart-summary-card,
.dashboard-card,
.profile-section-card {
    border: 1px solid #3a3a3a !important;
    /* Soft border to define boundaries */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Softer inputs for less eye strain */
input,
textarea,
select {
    background: #1e1e1e !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

input:focus {
    border-color: var(--primary) !important;
}

/* Ensure headings are clear but not "glowing" */
h1,
h2,
h3 {
    letter-spacing: 0.5px;
    font-weight: 700;
}

/* --- CART VISIBILITY FIXES --- */
.cart-view {
    background: var(--dark-bg) !important;
}

.cart-item,
.cart-delivery-card,
.bill-details,
.cart-summary-card,
.section-card {
    background: #222222 !important;
    /* Force hardcoded Soft Dark */
    border: 1px solid #3a3a3a !important;
    color: #e8e8e8 !important;
    /* Force hardcoded Off-White */
    padding: 15px !important;
    border-radius: 12px !important;
    margin-bottom: 15px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Ensure inputs inside these cards are also themed */
.cart-delivery-card input,
.cart-delivery-card textarea {
    background: #1e1e1e !important;
    border: 1px solid #444 !important;
    color: #e8e8e8 !important;
}


.cart-item-name {
    color: var(--text-light) !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    margin-bottom: 4px !important;
}

.cart-item-price {
    color: var(--primary) !important;
    /* Gold for price visibility */
    font-weight: 600 !important;
    font-size: 13px !important;
    opacity: 1 !important;
}

.bill-header {
    color: var(--text-light) !important;
    font-weight: 800 !important;
    border-bottom: 1px solid #444 !important;
    padding-bottom: 10px !important;
    margin-bottom: 10px !important;
}

.bill-row {
    color: var(--text-light) !important;
    display: flex !important;
    justify-content: space-between !important;
    margin-bottom: 8px !important;
}

.bill-row span:last-child {
    font-weight: 700 !important;
}

.to-pay-row {
    color: var(--primary) !important;
    border-top: 1px dashed #444 !important;
    padding-top: 10px !important;
    margin-top: 10px !important;
}

/* Fix for light background in Cart Header */
.cart-header {
    background: var(--dark-bg) !important;
    color: var(--text-light) !important;
    border-bottom: 1px solid #333 !important;
}

.cart-header h2 {
    color: var(--text-light) !important;
}