        /* Mobile Full Screen for Auth View */
@media (max-width: 600px) {
    #auth-view {
        background-color: white; /* Fill background */
        align-items: flex-start !important; /* Push to top */
    }
    
    #auth-view .selection-box {
        box-shadow: none; /* Remove floating shadow */
        padding: 4rem 1.5rem 1.5rem !important; /* Extra top padding for back button */
        max-width: 100%;
        border-radius: 0;
        height: 100dvh;    /* Force exact full height (Dynamic Viewport) */
        overflow-y: auto;  /* Allow scrolling only if needed */
        scrollbar-width: none;
        -ms-overflow-style: none;
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Ensure top content is always visible */
        box-sizing: border-box;
        position: relative;
    }
    #auth-view .selection-box::-webkit-scrollbar { display: none; }

    #auth-back-btn {
        top: 1rem !important;
        left: 1rem !important;
    }
}
        /* --- Guest App Specific Styles --- */
		
/* --- Loading Screen Styles --- */
#loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff; /* Solid white background */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    font-weight: 600;
    color: var(--primary);
    transition: opacity 0.4s ease, visibility 0.4s;
    opacity: 1;
    visibility: visible;
}

#loading-indicator.hidden {
    display: flex !important; /* Keep display flex so it occupies space while fading */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-logo {
    animation: pulse 1.5s infinite ease-in-out;
}

#app-header-logo {
    cursor: pointer;
    transition: transform 0.2s ease;
}
#app-header-logo:hover {
    transform: scale(1.05);
}
#app-header-logo:active {
    transform: scale(0.95);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.85); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}		

/* --- Views & Layout --- */
.view { 
    min-height: 100dvh; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    overflow-x: hidden; /* Prevent horizontal scroll */
}
#main-app-view { 
    justify-content: flex-start; 
    padding-bottom: 80px; 
}

/* --- Menu Section Headers --- */
.menu-section-header {
    grid-column: 1 / -1; /* Span the full width of the grid */
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-purple); /* Uses your theme color */
    color: var(--primary-text);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Adjust the first header to not have huge top margin */
.menu-section-header:first-child {
    margin-top: 0.5rem;
}

.menu-section-subheader {
    display: block;
    font-size: 1rem;
    color: var(--secondary-text);
    font-weight: 400;
    margin-top: 0.25rem;
    font-style: italic;
}

/* --- Filter Controls --- */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.search-wrapper {
    position: relative;
    flex-grow: 1;
}

.search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem; /* Space for icon */
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.95rem;
    height: 42px;
    box-sizing: border-box;
    margin: 0;
    line-height: 1;
    display: block;
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23A0AEC0" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat 1rem center;
}

.filter-toggle-btn {
    background: white;
    border: 1px solid var(--border-color);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-text);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.filter-toggle-btn.active {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    background-color: #f3ebff;
}

.filter-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.filter-panel.visible { display: grid; }

.filter-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

/* --- Favorite Heart Button --- */
.fav-btn {
    position: absolute;
    top: 10px;
    left: 10px; /* Opposite side of price tag */
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.fav-btn:active { transform: scale(0.9); }

.heart-icon {
    width: 20px;
    height: 20px;
    stroke: #718096;
    stroke-width: 2;
    fill: none;
    transition: all 0.2s;
}

.fav-btn.active .heart-icon {
    stroke: #E53E3E; /* Red */
    fill: #E53E3E;
}

/* --- Auth & Client Selection --- */
.selection-box { 
    background: var(--secondary-bg); 
    padding: 2rem; 
    border-radius: var(--border-radius); 
    box-shadow: var(--shadow); 
    max-width: 400px; 
    width: 100%; 
    margin: 0 auto; 
}
.auth-logo { 
    display: block; 
    width: 64px; 
    height: 64px; 
    margin: 0 auto 1.5rem auto; 
}
.selection-box h1 { 
    font-size: 1.5rem; 
    margin-bottom: 0.5rem; 
    text-align: center; 
}
.selection-box p { 
    color: var(--secondary-text); 
    margin-bottom: 1.5rem; 
    text-align: center; 
}
.client-result-item { 
    padding: 0.8rem; 
    border-bottom: 1px solid var(--border-color); 
    cursor: pointer; 
    text-align: left; 
}
.client-result-item:hover { 
    background-color: #f8f9fa; 
}
.divider { 
    display: flex; 
    align-items: center; 
    text-align: center; 
    color: var(--secondary-text); 
    font-size: 0.9rem; 
    margin: 1.5rem 0; 
}
.divider::before, .divider::after { 
    content: ''; 
    flex: 1; 
    border-bottom: 1px solid var(--border-color); 
}
.divider:not(:empty)::before { margin-right: .25em; }
.divider:not(:empty)::after { margin-left: .25em; }
.auth-footer-links { 
    margin-top: 2rem; 
    text-align: center; 
    font-size: 0.9rem; 
}
.auth-footer-links a { 
    display: block; 
    color: var(--secondary-text); 
    text-decoration: none; 
    margin-top: 0.5rem; 
}

/* Layout row for form labels with an action (e.g., Forgot?) */
.form-group .label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}
.form-group .label-row a {
    font-size: 0.85em;
    color: var(--accent);
    text-decoration: none;
}
@media (max-width: 420px) {
    .form-group .label-row { flex-direction: column; align-items: flex-start; }
}
.btn-google { 
    background: #fff; 
    color: #444; 
    border: 1px solid var(--border-color); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
    background-image: none !important; 
}
.google-icon { width: 18px; height: 18px; }

/* --- Google Data Section --- */
.google-info-container {
    margin: 0.5rem 0;
    padding: 0.5rem 0.75rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Row 1: Rating | Status | Logo */
.google-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.google-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 700;
    color: #374151;
}
.google-star { color: #f59e0b; }

.google-status {
    font-weight: 600;
    font-size: 0.75rem;
}
.status-open { color: var(--success); }
.status-closed { color: var(--danger); }

/* The "G" Logo Button */
.google-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.google-logo-link:hover { opacity: 1; }
.google-g-icon { width: 16px; height: 16px; }

/* Row 2: Action Links */
.google-actions-row {
    display: flex;
    gap: 1rem;
    padding-top: 0.4rem;
    border-top: 1px solid #e2e8f0;
}

.google-link {
    text-decoration: none;
    color: #4285F4; /* Google Blue */
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.google-link:hover { text-decoration: underline; }

/* --- Main App Header --- */
.app-header {
    /* 1. Fix Transparency: Force solid white background */
    background-color: #ffffff;
    
    /* 2. Visual Separation: Add shadow like Client App */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--border-color);

    /* 3. Layout & Positioning */
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    
    /* 4. Z-Index: Ensure it stays above scrolling drink cards */
    z-index: 1100; 
    gap: 0.5rem;
}

.header-left {
    flex: 1 1 0; /* Force equal weight */
    display: flex;
    align-items: center;
    min-width: 0;
}

.header-center {
    flex: 2 1 0;
    display: flex;
    flex-direction: column;
    align-items: center; /* This centers the name box */
    justify-content: center;
    text-align: center;
    min-width: 0;
}

.header-right {
    flex: 1 1 0; /* Force equal weight to match left side */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 0;
}

/* Fix for the logo size - Unified Selector */
.header-left img, 
#app-header-logo {
    height: 48px;       /* Premium large look for Desktop */
    width: auto;
    display: block;
    max-width: 100%;
    transition: height 0.2s ease;
}

/* The anchor for the floating Pin */
#client-name-display {
    position: relative; 
    margin: 0;
    display: inline-block; 
    max-width: 100%;
    white-space: nowrap;
    
    /* THE FIX: Changed from hidden to visible */
    overflow: visible; 
    
    /* We keep this for mobile/small screen logic */
    text-overflow: ellipsis; 
    
    font-size: 1.25rem; 
    font-weight: 700; 
    color: var(--accent-purple);
}

/* Ensure the pin has a high z-index so it doesn't get buried */
#header-nav-btn {
    position: absolute;
    right: 100%;
    margin-right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    text-decoration: none;
    cursor: pointer;
    line-height: 1;
    z-index: 10; /* Ensure it stays on top */
}

#change-client-btn {
    display: block;
    font-size: 0.7rem;
    color: var(--secondary-text);
    text-decoration: underline;
    cursor: pointer;
    margin-top: 0.2rem;
}

#user-name-display {
    font-size: 0.8rem;
    color: var(--primary-text);
    font-weight: 500;
    line-height: 1.2;
}

#user-role-display {
    font-size: 0.7rem;
    color: var(--secondary-text);
    background-color: var(--primary-bg);
    border: 1px solid var(--border-color);
    padding: 3px 8px;
    border-radius: 12px;
}

#header-logout-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    line-height: 1.2;
}

/* --- Mobile Header Adjustments (Syncs with Bottom Nav) --- */
@media (max-width: 992px) {
    /* 1. Global Padding & Layout */
    .app-header {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem; /* Slightly more gap to breathe */
    }
    
    .container { 
        padding-bottom: 90px !important; 
    }

    /* 2. Resize Logo */
    .header-left img, 
    #app-header-logo {
        height: 32px; /* Smaller logo for mobile to save vertical space */
    }
    
    /* 3. Center Text Adjustment */
    #client-name-display {
        font-size: 1.1rem;
        max-width: 160px; /* Allow a bit more width since we hide the user name */
        overflow: visible; 
        text-overflow: ellipsis;
    }

    #header-nav-btn {
        font-size: 1rem;
        margin-right: 6px;
    }
    
    /* 4. Hide User Name (The Fix) */
    #user-name-display {
        display: none !important; /* Hide name to prevent stacking alignment issues */
    }
    
    /* 5. Tweak Right Side Alignment */
    .header-right {
        gap: 0; /* Remove gap so Role and Logout sit tighter */
        justify-content: center;
    }

    #user-role-display {
        transform: scale(0.9); /* Slightly smaller Guest badge */
        margin-bottom: 2px;
    }
    
    #header-logout-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
}



    /* --- Desktop Title Adjustment --- */
@media (min-width: 601px) {
    #client-name-display {
        font-size: 1.25rem;
    }
}

/* --- Bottom Tab Bar --- */

/* 1. Ensure the color variables exist */
:root {
    --accent-purple: #6B46C1; 
    --nav-inactive: #A0AEC0;
}

.bottom-tab-bar { 
    position: fixed; 
    bottom: 0; 
    left: 0; right: 0; 
    background: #ffffff; 
    border-top: 1px solid #e2e8f0; 
    display: flex; 
    justify-content: space-around; 
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    height: 60px; 
    box-shadow: 0 -2px 10px rgba(0,0,0,0.03);
}

.tab-item { 
    flex: 1; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* Default State (Inactive) */
    color: #A0AEC0; 
    
    cursor: pointer; 
    font-size: 0.7rem; 
    font-weight: 500;
    position: relative; 
    transition: color 0.2s ease;
}

/* --- Active State (Explicit Purple Fix) --- */
.tab-item.active { 
    /* We use the hex code directly to guarantee it works */
    color: #6B46C1 !important; 
    font-weight: 700; 
}

/* --- SVG Icon Styling --- */
.tab-item .icon {
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Forces SVG to use the text color (Gray or Purple) */
.tab-item svg {
    width: 24px;
    height: 24px;
    display: block;
    fill: none;            
    stroke: currentColor;  /* This is the magic property */
    stroke-width: 2px;
    transition: all 0.2s;
}

/* Active Icon Glow */
.tab-item.active svg {
    stroke-width: 2.5px;
    filter: drop-shadow(0 2px 4px rgba(107, 70, 193, 0.3));
    stroke: #6B46C1; /* Double insurance */
}

/* --- Restricted State --- */
.tab-item.restricted {
    opacity: 0.5;
    pointer-events: none; 
}

/* --- Navigation Highlight Line --- */
.tab-item.active::after {
    content: "";
    position: absolute;
    top: -1px; 
    left: 20%;
    right: 20%;
    height: 3px;
    background-color: #6B46C1; /* Hardcoded Purple */
    border-radius: 0 0 4px 4px;
    z-index: 1002;
    box-shadow: 0 1px 3px rgba(107, 70, 193, 0.4);
}

/* --- Directional Slide Transitions --- */
@keyframes slideInRight {
    from { transform: translateX(30px); opacity: 0; filter: blur(2px); }
    to { transform: translateX(0); opacity: 1; filter: blur(0); }
}

@keyframes slideInLeft {
    from { transform: translateX(-30px); opacity: 0; filter: blur(2px); }
    to { transform: translateX(0); opacity: 1; filter: blur(0); }
}

.slide-forward {
    animation: slideInRight 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.slide-back {
    animation: slideInLeft 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Hide tab content by default */
.tab-content {
    display: none;
    will-change: transform, opacity;
}

.tab-content.active {
    display: block;
}

/* --- Logout → Menu Transition (Bevurity brand) --- */
.tab-content { display: none; position: relative; }
.page-transition {
    animation: bevurity-switch 420ms cubic-bezier(.2,.9,.3,1);
    box-shadow: 0 10px 30px rgba(106, 80, 255, 0.12); /* soft purple glow */
    border-radius: 8px;
    transform-origin: top center;
}
@keyframes bevurity-switch {
    0% { opacity: 0; transform: translateY(8px) scale(0.995); filter: blur(2px); }
    60% { opacity: 1; transform: translateY(0) scale(1.003); filter: blur(0); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: none; }
}

/* --- Pulse Animation for Profile Tab --- */
@keyframes tabPulsePurple {
    0% { color: var(--secondary); transform: scale(1); }
    50% { color: var(--accent-purple); transform: scale(1.2); }
    100% { color: var(--secondary); transform: scale(1); }
}

.tab-pulse {
    /* 0.5s duration x 4 iterations = 2 seconds total */
    animation: tabPulsePurple 0.5s ease-in-out 4; 
    font-weight: 700;
}

/* Pending claim prompt (actionable toast) */
.pending-claim-toast {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: white;
    border: 1px solid rgba(106,80,255,0.12);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(106,80,255,0.06);
    margin-bottom: 0.5rem;
}
.pending-claim-message { flex: 1; font-size: 0.95rem; }
.pending-claim-actions { display:flex; gap:0.5rem; }

.tab-content.active { display: block; }
.page-title { 
    font-size: 2rem; 
    font-weight: 700; 
    margin-bottom: 1.5rem; 
}

/* --- Drink Grid & Cards --- */
.drink-grid { 
    display: grid; 
    grid-template-columns: minmax(0, 1fr); 
    gap: 1rem; 
    align-items: start; 
}

/* Responsive Columns */
@media (min-width: 600px) { 
    .drink-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } 
}
@media (min-width: 900px) { 
    .drink-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } 
}

/* Section Headers - Force them to span ALL columns */
.menu-section-header {
    grid-column: 1 / -1; /* Critical: Spans full width */
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #6b46c1;
    color: var(--primary-text);
    font-size: 1.5rem;
    font-weight: 700;
}
.menu-section-header:first-child { margin-top: 0.5rem; }

.menu-section-subheader {
    display: block;
    font-size: 1rem;
    color: var(--secondary-text);
    font-weight: 400;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Card Styling - Accent Strip Version */
.drink-card { 
    display: flex; 
    flex-direction: column; 
    background: var(--secondary-bg); 
    border-radius: var(--border-radius); 
    box-shadow: var(--shadow); 
    overflow: hidden; 
    transition: transform 0.2s ease;
    
    /* Reserve 5px space on the left for the strip */
    border-left: 5px solid transparent; 
}

/* --- Drink Card Image Placeholder --- */
.drink-card-placeholder {
    background-color: #f8fafc; /* Very light grey */
    position: relative;
    width: 100%;
    height: 160px; /* Must match the normal image height */
}

.drink-card-placeholder::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* The background image is injected via CSS variables in the JS */
    background-image: var(--placeholder-img);
    background-size: 48px; /* Keeps the logo small and tasteful */
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.12; /* Fades the logo into a subtle watermark */
    z-index: 1;
}

/* Ensure the price and heart sit safely ABOVE the watermark */
.drink-card-price, .fav-btn {
    z-index: 10 !important;
}

/* Main Menu Highlight - Purple Strip Only */
.drink-card.main-menu-item {
    border-left-color: #6b46c1; /* Hardcoded purple */
    background-color: var(--secondary-bg); /* Keep background white/standard */
}

.drink-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.drink-card-content { 
    padding: 1rem; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
}

.drink-card-title { 
    font-size: 1.25rem; 
    font-weight: 600; 
    margin-bottom: 0.25rem; 
}

.drink-card-category { 
    font-size: 0.9rem; 
    color: var(--secondary-text); 
    margin-bottom: 1rem; 
}

.drink-card-actions { 
    margin-top: auto; 
    display: flex; 
    gap: 0.5rem; 
    justify-content: flex-end; 
}

/* --- Drink Price Badge --- */
.drink-card-price {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

/* --- Drink Details Modal Styles --- */
.detail-ingredient-item {
    padding: 0.5rem 0.75rem;
    background-color: var(--primary-bg, #f7fafc); /* Fallback if var not set */
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
}
.detail-ingredient-item::before {
    content: '•';
    color: var(--accent-purple, #6b46c1);
    font-weight: bold;
    font-size: 1.2em;
}

#badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}
.badge-item {
    text-align: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s;
}
.badge-item:hover {
    background-color: #f7fafc;
}

/* --- Profile / Passport Styles --- */
.passport-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

.passport-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.passport-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.passport-info h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--primary);
}

.passport-info p {
    margin: 0.25rem 0 0 0;
    font-size: 0.8rem;
    color: var(--secondary);
}

.passport-arrow {
    color: var(--accent);
    font-weight: bold;
    font-size: 1.2rem;
}

.passport-controls input:focus, .passport-controls select:focus {
    outline: none;
    border-color: var(--accent);
}

/* --- Explore Map Styles (Fixed Layout) --- */
#explore-tab-content {
    position: fixed;
    top: 85px;    /* If the search bar is still too high, increase to 90px or 95px */
    bottom: 60px; 
    left: 0;
    right: 0;
    z-index: 5;
    background-color: #e2e8f0;
    overflow: visible !important; 
}

#explore-map {
    width: 100%;
    height: 100%;
}

/* Update for the Map CTA Button */
.map-main-cta {
    padding: 0.8rem 1rem !important; /* Larger touch area */
    font-size: 1.1rem !important;    /* Larger text */
    font-weight: 700 !important;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 6px rgba(107, 70, 193, 0.25); /* Subtle purple shadow */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

/* Optional: Add an icon before the text via CSS */
.map-main-cta::before {
    content: '➡️'; 
    font-size: 1.2rem;
}

/* --- Floating Close Button for Map Card --- */
.close-card-x {
    position: absolute;
    /* Move it slightly outside the padding for a 'float' look */
    top: -12px; 
    right: -8px;
    
    width: 36px; /* Slightly larger for easier tapping */
    height: 36px;
    background-color: white; /* Solid white so map doesn't peek through */
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 1100;
}

/* Ensure the Map Card has relative positioning so the X stays in the corner */
.map-venue-card {
    position: absolute;
    /* 
       THE FIX: Change bottom from 20px to 80px 
       (60px for the Tab Bar + 20px for a clean gap) 
    */
    bottom: 80px; 
    left: 1rem;
    right: 1rem;
    
    background: white;
    border-radius: 16px; /* Slightly rounder for a more modern feel */
    padding: 1.25rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 1001; /* Sit above the Map and Ticker */
    
    /* 
       THE FIX: Remove 'overflow: hidden' so the shadow 
       and the Close Button aren't clipped.
    */
    overflow: visible; 

    /* Hidden State */
    opacity: 0;
    transform: translateY(30px); /* Start slightly lower and faded */
    pointer-events: none; /* Can't click it while hidden */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-venue-card.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.map-card-info h3 { margin: 0; font-size: 1rem; color: var(--primary-text); }
.map-card-info p { margin: 0; font-size: 0.85rem; color: var(--secondary-text); }
.map-card-tags { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.map-tag { font-size: 0.7rem; background: var(--primary-bg); padding: 2px 6px; border-radius: 4px; }



/* --- Map Search Overlay --- */
.map-search-overlay {
    position: absolute;
    top: 1.25rem; /* Push it down slightly from the very top edge of the map */
    left: 1rem;
    right: 1rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

#map-search-input {
    width: 100%;
    padding: 0.8rem 1rem;
    padding-left: 2.5rem; /* Space for icon */
    border-radius: 50px;
    border: none;
    /* Search Icon SVG background */
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23718096" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat 1rem center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-size: 0.95rem;
    pointer-events: auto; /* Re-enable clicks for input */
}

#map-search-input:focus {
    outline: none;
    box-shadow: 0 4px 20px rgba(107, 70, 193, 0.2); /* Purple shadow */
}

/* --- Filter Pills Container --- */
.map-filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 8px; /* Space for scrollbar */
    pointer-events: auto; /* Re-enable clicks */
    align-items: center;
    
    /* Desktop Behavior: Drag Cursor & Scrollbar */
    cursor: grab; 
    scrollbar-width: thin; /* Firefox: Thin scrollbar */
    scrollbar-color: #cbd5e0 transparent; /* Firefox: Handle Color / Track Color */
    
    /* Visual Hint: Fade the right edge to show there is more */
    -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, black 90%, transparent 100%);
}

.map-filters:active {
    cursor: grabbing; /* Feedback when dragging */
}

/* Custom Scrollbar for Chrome/Safari/Edge */
.map-filters::-webkit-scrollbar { 
    display: block; 
    height: 4px; /* Very thin */
}
.map-filters::-webkit-scrollbar-track {
    background: transparent; 
}
.map-filters::-webkit-scrollbar-thumb {
    background-color: #cbd5e0; /* Light Grey */
    border-radius: 4px; 
}
.map-filters::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-purple); /* Highlight on hover */
}

/* --- Individual Filter Pill --- */
.filter-pill {
    background: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: var(--secondary-text);
    flex-shrink: 0; /* Prevent squishing */
    
    /* Prevent text selection while dragging */
    user-select: none;
    -webkit-user-select: none;
}

.filter-pill.active {
    background: var(--accent-purple);
    color: white;
    border-color: var(--accent-purple);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
}

/* --- Map Card Spotlight Carousel --- */
.map-card-spotlight-container {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.map-card-spotlight-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-purple);
    margin-bottom: 0.5rem;
    display: block;
}

.map-card-carousel {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem; /* Space for scroll */
    scrollbar-width: none; /* Firefox */
}
.map-card-carousel::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.spotlight-mini-card {
    flex: 0 0 60px; /* Fixed width */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.spotlight-mini-img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.25rem;
    background-color: #f7fafc;
}

.spotlight-mini-name {
    font-size: 0.65rem;
    line-height: 1.1;
    color: var(--primary-text);
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Map Actions Overlay (Location/QR) --- */
.map-actions-overlay {
    position: absolute;
    top: 170px; /* Increased from 100px to clear the Search bar + Filter pills */
    right: 1rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.map-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.map-action-btn:active {
    transform: scale(0.9);
}

/* --- DESKTOP / TABLET OVERRIDES --- */
@media (min-width: 992px) {
    
    /* 1. Fix Search Bar: Float Top-Left & Constrain Width */
    .map-search-overlay {
        top: 2rem;       /* Push down further to clear header */
        left: 2rem;      /* Align left */
        right: auto;     /* Stop stretching */
        width: 400px;    /* Fixed width */
        max-width: 100%;
    }

    /* 2. Fix Venue Card: Float Bottom-Left & Constrain Width */
    .map-venue-card {
        width: 400px !important; 
        left: 20px !important;
        bottom: 30px !important;
        right: auto;
        max-width: 90%;
        flex-direction: column; 
        align-items: stretch;
        padding: 1.25rem; /* Slightly more padding for the desktop "panel" look */
    }

    /* Adjust internal card layout for the panel look */
    .map-card-info {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    /* 3. Move Floating Action Buttons (Locate/QR) */
    .map-actions-overlay {
        top: 2rem;
        right: 2rem; /* Keep these on the right to balance the UI */
    }

    /* Ensure the Map Card info clears the floated logo correctly */
.map-card-info::after {
    content: "";
    display: table;
    clear: both;
}

#map-card-thumb {
    /* Ensure object-fit is respected on the map card specifically */
    object-fit: contain; 
    border: 1px solid var(--border-color);
}
}

/* --- TOAST & PROMPT FIXES --- */

#toast-container {
    position: fixed;
    top: 1rem;
    left: 50%; /* Start at center */
    transform: translateX(-50%); /* Shift back by half its width to perfectly center */
    width: 100%; /* Occupy full width context */
    max-width: 400px; /* Prevent it from being too wide on desktop */
    z-index: 20000; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none; 
}

/* General Toast Styling */
.toast {
    pointer-events: auto; /* Re-enable clicks */
    z-index: 20001;
    max-width: 90%;
    /* Add slight bounce animation */
    animation: slideDownFade 0.3s ease-out;
}

/* Specific Style for the "Resume Claim" Card */
.pending-claim-toast {
    pointer-events: auto; /* Re-enable clicks */
    display: flex;
    flex-direction: column; /* Stack vertically for mobile */
    gap: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.toast {
    /* ... existing ... */
    pointer-events: auto; /* Ensure clicks register */
    display: flex;
    align-items: center;
    justify-content: center;
}
.toast a, .toast strong {
    color: inherit;
}

.pending-claim-message {
    font-size: 1.05rem;
    color: #2d3748;
    line-height: 1.5;
}

.pending-claim-message strong {
    color: var(--accent-purple);
}

.pending-claim-actions {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

/* Make buttons large and touch-friendly */
.pending-claim-actions .btn {
    flex: 1; 
    justify-content: center;
    padding: 0.75rem;
    font-size: 1rem;
}

@keyframes slideDownFade {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- Drink Details Review Carousel --- */
.review-carousel-container {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    min-height: 80px; /* Prevent layout shift */
    display: flex;
    align-items: center;
}

.review-carousel-item {
    width: 100%;
    animation: fadeEffect 1s;
    display: none; /* Hidden by default */
}

.review-carousel-item.active {
    display: block;
}

.review-quote {
    font-style: italic;
    font-size: 0.95rem;
    color: var(--primary-text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.review-author {
    font-size: 0.8rem;
    color: var(--secondary-text);
    font-weight: 600;
    text-align: right;
}

.review-stars-display {
    color: #ECC94B;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

@keyframes fadeEffect {
    from {opacity: 0;}
    to {opacity: 1;}
}
/* --- Dynamic Venue Menu Logo Shapes --- */
.venue-logo-base {
    border: 2px solid white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background-color: #fff;
    flex-shrink: 0;
}

.venue-logo-square {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
}

.venue-logo-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.venue-logo-rectangle {
    width: 140px;
    height: 60px;
    border-radius: 8px;
    object-fit: contain; /* Contain ensures wide logos aren't cropped */
    padding: 2px; /* Slight padding so the logo doesn't touch the white border */
}

/* --- Updated Live Ticker Styles --- */
#live-ticker {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background: rgba(26, 32, 44, 0.95);
    color: white;
    height: 36px;
    z-index: 999;
    font-size: 0.85rem;
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    
    /* NEW: Contain the scroll */
    overflow: hidden; 
    display: flex;
    align-items: center;
}

#live-ticker.visible { transform: translateY(0); }

#ticker-text {
    white-space: nowrap;
    display: inline-block;
    padding-left: 20px;
    padding-right: 20px;
    will-change: transform;
}

/* The "Reload" animation - only used when switching messages */
.ticker-swipe-in {
    animation: ticker-swipe 0.5s ease-out;
}

@keyframes ticker-swipe {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* The Marquee Animation for long text */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.marquee-active {
    animation: marquee linear infinite;
    /* Speed will be set dynamically via JS */
}

/* Constant Flag Style */
.canada-flag-img {
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* This is a high-res SVG of the Canada Flag */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 320'%3E%3Cpath fill='%23ff0000' d='M0 0h640v320H0z'/%3E%3Cpath fill='%23fff' d='M160 0h320v320H160z'/%3E%3Cpath fill='%23ff0000' d='M320 45.4l11.5 35.4 37.2-12.1-1.3 39 31.3 23.6-31.3 23.5 1.3 39-37.2-12-11.5 35.4-11.5-35.4-37.2 12 1.3-39-31.3-23.5 31.3-23.6-1.3-39 37.2 12.1L320 45.4z'/%3E%3Crect width='32' height='100' x='304' y='180' fill='%23ff0000'/%3E%3C/svg%3E");
    background-size: 24px auto; /* Scaled down to look nice */
    background-repeat: no-repeat;
    background-position: center;
}

/* QR Scanner Styling */
#qr-reader {
    border: none !important;
}
#qr-reader__scan_region {
    background: #000;
}
#qr-reader__dashboard {
    padding: 10px !important;
}
#qr-reader video {
    border-radius: 8px;
}

/* --- Shared Heart Button Wrapper --- */
.fav-btn-container {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20;
}

/* Hide the text-price in standard Grid view (we use the image badge instead) */
.drink-card-compact-price {
    display: none; 
}

/* --- Compact List View Overrides --- */
.drink-grid.compact-view {
    /* Intentionally keeping display: grid so Desktop naturally forms 3 columns! */
    gap: 0.75rem;
}

.drink-grid.compact-view .drink-card {
    flex-direction: row; /* Side-by-side instead of stacked */
    align-items: center;
    height: 100px; 
    padding: 0;
    border-left-width: 4px; 
    overflow: visible !important; /* Allow heart pop-out */
    z-index: 1;
}

/* Hide the large price badge in compact view */
.drink-grid.compact-view .drink-card-price {
    display: none; 
}

/* Position the heart button to pop out diagonally in Compact view */
.drink-grid.compact-view .fav-btn-container {
    position: absolute;
    top: -12px;
    left: -12px;
    z-index: 100;
}

/* Stable Thumbnail with Controlled Bleed */
.drink-grid.compact-view .drink-card-image-wrapper {
    width: 100px;
    height: 100px;
    margin-left: 0;
    position: relative;
    flex-shrink: 0;
}

/* The bleed effect using a pseudo-element */
.drink-grid.compact-view .drink-card-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0; 
    left: 0; 
    width: 150px; /* Bleed length */
    height: 100%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    filter: blur(12px);
    -webkit-mask-image: linear-gradient(to right, black 60px, transparent 140px);
    mask-image: linear-gradient(to right, black 60px, transparent 140px);
    z-index: -1; /* Behind the main thumbnail image */
    pointer-events: none;
}

.drink-grid.compact-view .drink-card-image,
.drink-grid.compact-view .drink-card-placeholder {
    width: 100% !important;
    height: 100% !important;
    margin-right: 0;
    border-radius: 8px 0 0 8px; /* Match card corners */
    flex-shrink: 0;
    overflow: hidden !important; /* CLIP INTERNAL BLUR */
}

/* Ensure placeholder watermark doesn't scale too much */
.drink-grid.compact-view .drink-card-placeholder > div:first-child > div {
    transform: scale(0.6);
}

/* 1. Reset 'Glitch' prevention - width handled above */

/* 2. Shrink the heart button slightly for the smaller thumbnails */
.drink-grid.compact-view .fav-btn {
    width: 28px;
    height: 28px;
    top: 0;
    left: 0;
}

.drink-grid.compact-view .heart-icon {
    width: 16px;
    height: 16px;
}

/* 3. Ensure the watermark logo inside the small box scales down */
.drink-grid.compact-view .drink-card-placeholder > div:first-child > div {
    transform: scale(0.6); /* Shrinks the watermark to fit the 100px box */
}

/* Adjust Content Spacing */
.drink-grid.compact-view .drink-card-content {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; 
}

/* Show the text-price in Compact view */
.drink-grid.compact-view .drink-card-compact-price {
    display: block;
    font-weight: 700;
    color: var(--primary-text);
    font-size: 0.95rem;
    flex-shrink: 0; /* Prevents the price from being squished */
}

/* Ensure the title truncates neatly and leaves room for the price */
.drink-grid.compact-view .drink-card-title {
    font-size: 1rem;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drink-grid.compact-view .drink-card-category {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Re-style Actions for Compact View */
.drink-grid.compact-view .drink-card-actions {
    margin-top: 0;
    gap: 0.25rem;
    justify-content: flex-start;
}

.drink-grid.compact-view .btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
}