/* 1. SILENT PRELOAD: Forces the browser to download the images instantly in the background so they are ready with zero delay */
body::after {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    z-index: -1;
    content: url("https://s6.imgcdn.dev/YXNggn.webp") url("https://s6.imgcdn.dev/YXNJGv.webp");
}

/* 2. SMOOTH ANIMATION: Creates a premium fade and blur reveal effect */
@keyframes smoothSwap {
    0% { opacity: 0.3; filter: blur(5px); }
    100% { opacity: 1; filter: blur(0); }
}

/* 3. MOBILE IMAGE: Replaces the image on screens smaller than 640px */
@media (max-width: 639px) {
    .advanced-slider__slide img[src*="c7524471"] {
        content: url("https://s6.imgcdn.dev/YXNggn.webp") !important;
        animation: smoothSwap 0.6s ease-out forwards !important;
    }
}

/* 4. DESKTOP IMAGE: Replaces the image on screens 640px and larger */
@media (min-width: 640px) {
    .advanced-slider__slide img[src*="c7524471"] {
        content: url("https://s6.imgcdn.dev/YXNJGv.webp") !important;
        animation: smoothSwap 0.6s ease-out forwards !important;
    }
}

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

/* ========================================== */
/* CSS FOR WHITE THEME OVERLAY & HEADER BADGE */
/* ========================================== */

/* Body scroll lock class */
body.loc-scroll-locked {
    overflow: hidden !important;
}

/* Full screen white overlay */
#custom-loc-overlay, #custom-loc-conflict-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.50); /* Dark blurred background */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: none; /* Hidden by default via JS */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Tajawal', 'Almarai', sans-serif !important;
    color: #1a1a1a;
}

#custom-loc-overlay *, #custom-loc-conflict-overlay * {
    font-family: 'Tajawal', sans-serif !important;
}

/* Minimalist Dialog */
.loc-content-wrapper {
    background: #ffffff;
    padding: 35px 25px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    max-width: 90%;
    width: 340px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Close X Button */
.loc-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 22px;
    color: #cccccc;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}
.loc-close-btn:hover {
    color: #0f1f5f;
}

/* Minimalist Location Icon */
.loc-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
}
.loc-icon svg {
    width: 100%;
    height: 100%;
    stroke: #0f1f5f;
    fill: none;
    stroke-width: 1.5;
}

.loc-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #111111;
}

.loc-desc {
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Main Action Button (Allow GPS) */
.loc-btn-primary {
    background-color: #0f1f5f; /* Dark Blue */
    color: #ffffff;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background-color 0.2s ease;
}
.loc-btn-primary:hover {
    background-color: #0a1540;
}

/* Override Button */
.loc-btn-override {
    background-color: #ffffff;
    color: #333333;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #dddddd;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}
.loc-btn-override:hover {
    background-color: #f9f9f9;
    border-color: #cccccc;
}

/* Skip Link */
.loc-btn-skip {
    background: none;
    border: none;
    color: #999999;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s;
}
.loc-btn-skip:hover {
    color: #555555;
}

/* Header Location Badge Design - Dark Blue Theme */
.header-loc-badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0f1f5f; /* Theme Dark Blue */
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    margin: 0 10px;
    font-family: inherit;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 6px rgba(15, 31, 95, 0.2);
}

.header-loc-badge-btn svg {
    width: 16px;
    height: 16px;
    stroke: #ffffff; /* White Icon */
    fill: none;
    stroke-width: 2;
}

.header-loc-badge-btn:hover {
    opacity: 0.9;
}

/* Hide restricted elements utility */
.loc-restricted-hidden {
    display: none !important;
}

/* Custom Mini Toast (Fallback if Salla toast fails) */
.loc-custom-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333333;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif !important;
    font-size: 14px;
    z-index: 9999999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.loc-custom-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.loc-custom-toast.error {
    background: #ef4444; /* Red for error */
}
.loc-custom-toast.success {
    background: #10b981; /* Green for success */
}

/* Store Status Animations */
@keyframes loc-pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.loc-pulse-green {
    animation: loc-pulse-green 2s infinite;
}
@keyframes loc-pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.loc-pulse-red {
    animation: loc-pulse-red 2s infinite;
}

/* Motorcycle Animation */
@keyframes loc-motorcycle-drive {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-2px) rotate(-5deg); }
    75% { transform: translateY(-2px) rotate(5deg); }
}
.loc-animated-icon {
    display: inline-block;
    animation: loc-motorcycle-drive 1s ease-in-out infinite;
}

/* Tomorrow Ordering Modal */
.loc-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 9999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.loc-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.loc-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.loc-modal-overlay.show .loc-modal-box {
    transform: scale(1) translateY(0);
}
.loc-modal-icon {
    font-size: 48px;
    color: #ef4444;
    margin-bottom: 16px;
}
.loc-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}
.loc-modal-text {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 24px;
}
.loc-modal-btn {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease;
}
.loc-modal-btn:hover {
    background: #059669;
}