/* ========================================================================= */
/* FONT IMPORTS AND DEFINITIONS                                             */
/* ========================================================================= */

@import './ABCArizonaFlare-Regular.woff';
@import './ABCWhyte-Regular.woff';

@font-face {
    font-family: 'AltessePro-Regular16pt';
    src: url('/fonts/AltessePro-Regular16pt.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Parisienne-Regular';
    src: url('/fonts/Parisienne-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ABCWhyte-Medium';
    src: url('/fonts/ABCWhyte-Medium.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ABCWhyte-Regular';
    src: url('/fonts/ABCWhyte-Regular.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Custom font classes */
.custom-font-ABCWhyte-Regular,
.custom-font1 { /* Consolidated with .custom-font1 */
    font-family: 'ABCWhyte-Regular', sans-serif;
}

.custom-font-ABCWhyte-Medium {
    font-family: 'ABCWhyte-Medium', sans-serif;
}

.custom-font-cursive {
    font-family: 'Parisienne-Regular', sans-serif;
}

.custom-font-cursive2 {
    font-family: 'AltessePro-Regular16pt', sans-serif;
}

.custom-font {
    font-family: 'ABCArizonaFlare-Regular', sans-serif;
}

/* ========================================================================= */
/* ROOT AND GLOBAL STYLES WITH iOS FIXES                                    */
/* ========================================================================= */

:root {
    --rz-root-font-size: 14px;
    --rz-body-line-height: 1.5rem;
    --rz-primary: #004f3c;
    --rz-primary-light: #337263;
    --rz-primary-lighter: rgba(0, 79, 60, 0.12);
    --rz-primary-dark: #003f30;
    --rz-primary-darker: #003528;
    --rz-on-primary: #ffffff;
    --rz-on-primary-light: #ffffff;
    --rz-on-primary-lighter: #004f3c;
    --rz-on-primary-dark: #ffffff;
    --rz-on-primary-darker: #ffffff;
    --rz-secondary: #d3b890;
    --rz-secondary-light: #dbc6a6;
    --rz-secondary-lighter: rgba(211, 184, 144, 0.12);
    --rz-secondary-dark: #a89373;
    --rz-secondary-darker: #8f7d61;
    --rz-on-secondary: #ffffff;
    --rz-on-secondary-light: #ffffff;
    --rz-on-secondary-lighter: #d3b890;
    --rz-on-secondary-dark: #ffffff;
    --rz-on-secondary-darker: #ffffff;
    --rz-profile-menu-toggle-button-color: #d3b890;
    --rz-menu-item-hover-background-color: #f5f5f5;
    --rz-menu-item-icon-hover-color: #004f3c;
    --rz-menu-item-hover-color: #212121;
    --rz-menu-item-selected-color: #004f3c;
    --rz-panel-menu-item-hover-color: #f5f5f5;
    --rz-panel-menu-item-2nd-level-hover-color: #004f3c;
    --rz-panel-menu-item-color: #d3b890;
    --rz-panel-menu-icon-color: #d3b890;
    --rz-panel-menu-item-3rd-level-active-color: #d3b890;
    --rz-panel-menu-item-2nd-level-active-color: #d3b890;
    --rz-panel-menu-item-2nd-level-color: #f5f5f5;
    --rz-panel-menu-focus-outline: 2px solid #004f3c;
    --rz-panel-menu-item-2nd-level-background-color: rgba(0, 79, 60, 0.86);
    --rz-panel-menu-item-3rd-level-background-color: var(--rz-primary-light);
    --rz-panel-menu-item-3rd-level-hover-color: #004f3c;
    --rz-panel-menu-item-3rd-level-color: #f5f5f5;
    --rz-panel-menu-item-background-color: #004f3c;
    --rz-panel-menu-item-active-color: #f5f5f5;
    --rz-panel-menu-item-3rd-level-hover-background-color: #d3b890;
    --rz-panel-menu-item-3rd-level-active-background-color: var(--rz-primary-light);
    --rz-panel-menu-item-2nd-level-hover-background-color: #d3b890;
    --rz-panel-menu-item-2nd-level-margin-inline: 1.5rem;
    --rz-panel-menu-item-3rd-level-margin-inline: 3rem;
    --rz-splitbutton-menu-shadow: 0 6px 14px 0 rgba(0, 0, 0, 0.26);
    --rz-input-font-size: 0.8rem;
    --rz-input-height: 2rem;
    --rz-input-line-height: 1rem;
    
    /* iOS viewport and safe area variables */
    --app-height: 100vh;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);

    /* PWA-specific variables */
    --vh: 1vh;
    --vw: 1vw;
    --pwa-search-top: 12px;
    --pwa-controls-top: 92px;

       /* Better mobile browser detection */
    --mobile-bottom-safe: max(env(safe-area-inset-bottom, 0px), 20px);
    --browser-bottom-padding: 60px; /* For mobile browser bottom bars */
}

/* Support for dynamic viewport on modern browsers */
@supports (height: 100dvh) {
    :root {
        --app-height: 100dvh;
    }
}

/* Enhanced body styles for iOS stability */
body {
    font-family: var(--rz-text-font-family);
    color: var(--rz-text-color);
    font-size: var(--rz-body-font-size);
    line-height: var(--rz-body-line-height);
    background-color: var(--rz-body-background-color);
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

/* iOS fixes for full viewport */
html, body {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

.rz-body {
    --rz-body-padding: 0;
}

a {
    color: var(--rz-link-color);
}

a:hover,
a:focus {
    color: var(--rz-link-hover-color);
}

/* Modal open state - prevent body scroll */
body.modal-open {
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
    -webkit-overflow-scrolling: auto !important;
}

/* Panel dragging state - prevent layout shifts */
body.panel-dragging {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

.rz-header {
    padding-top: env(safe-area-inset-top);
    box-sizing: border-box;
    background-color: #004F3C;
}

/* ========================================================================= */
/* ERROR AND LOADING UI                                                     */
/* ========================================================================= */

#blazor-error-ui {
    background: lightyellow;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.6rem 1.25rem 0.7rem;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjYwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* ========================================================================= */
/* LOGIN AND UI COMPONENTS                                                  */
/* ========================================================================= */

.rz-login .rz-button.rz-secondary {
    background-color: #d3b890;
    color: #004f3c;
}

.rz-login .rz-link {
    color: #004f3c;
}

.rz-selectbar {
    flex-wrap: wrap;
    gap: 5px;
}

.rz-selectbar .rz-selectbar-item {
    margin-bottom: 5px;
}

.no-overflow-selectbar {
    max-width: 100%;
    overflow: hidden;
}

.rz-button:hover:not(.rz-calendar-button):not(.rz-datepicker-trigger) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.rz-progressbar-circular {
    transition: opacity 0.3s ease;
}

/* ========================================================================= */
/* ENHANCED MOBILE MAP STYLES WITH iOS FIXES                               */
/* ========================================================================= */

/* Mobile-First Map Layout - iOS Compatible */
@media (max-width: 768px) {
    .mobile-map-container {
        position: fixed !important;
        top: env(safe-area-inset-top, 0px);
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        z-index: 1 !important;
        overflow: hidden;
        transform: none !important;
        -webkit-transform: none !important;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
         /* Account for both bottom panel AND mobile browser UI */
        bottom: calc(150px + var(--mobile-bottom-safe)) !important;
        height: calc(100vh - 150px - var(--mobile-bottom-safe)) !important;
    }
    
.bottom-panel {
        position: fixed !important;
        bottom: max(env(safe-area-inset-bottom, 0px), 20px) !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        min-height: 100px !important;
        max-height: calc(80vh - env(safe-area-inset-bottom, 0px)) !important;
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
        z-index: 1000 !important;
        background: #ffffff !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15) !important;
        transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        display: flex !important;
        flex-direction: column !important;
        border: 1px solid #e8eaed !important;
        border-bottom: none !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        transform: none !important;
        -webkit-transform: none !important;
        will-change: height !important;
        backface-visibility: hidden !important;
    }

    .bottom-panel.expanded {
        /* JavaScript will handle expanded height */
    }

    .bottom-panel.fully-expanded {
        /* JavaScript will handle fully-expanded height */
    }
     .filters-modal {
        position: fixed;
        /* Start from safe top area + header height */
        top: calc(env(safe-area-inset-top, 0px) + 60px + 16px);
        left: 8px;
        right: 8px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
        background: white;
        border-radius: 20px;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
        max-height: calc(100vh - env(safe-area-inset-top, 0px) - 60px - 32px - env(safe-area-inset-bottom, 0px));
        overflow: hidden;
        width: auto;
        margin: 0;
    }

    .filters-modal.visible {
        transform: translateY(0);
    }

    /* PWA mode adjustments */
    @media all and (display-mode: standalone) {
        .filters-modal {
            /* In PWA, account for different header positioning */
            top: calc(60px + 16px);
            max-height: calc(100vh - 60px - 32px - env(safe-area-inset-bottom, 0px));
        }
    }

    /* iPhone landscape adjustments */
    @media (orientation: landscape) {
        .filters-modal {
            top: calc(env(safe-area-inset-top, 0px) + 50px + 12px);
            bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
            max-height: calc(100vh - env(safe-area-inset-top, 0px) - 50px - 24px - env(safe-area-inset-bottom, 0px));
        }
    }

    .filters-modal-header {
        padding: 16px 20px 12px;
        border-bottom: 1px solid #e8eaed;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        border-radius: 20px 20px 0 0;
        flex-shrink: 0;
    }

    .filters-modal-content {
        padding: 20px;
        overflow-y: auto;
        flex: 1;
        -webkit-overflow-scrolling: touch;
        transform: translateZ(0);
        min-height: 0;
        /* Remove excessive max-height that was causing gaps */
        max-height: none;
    }

    /* Ensure filter actions stick to bottom */
    .filter-actions {
        display: flex;
        gap: 12px;
        padding: 16px 20px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid #f1f3f4;
        margin-top: auto;
        flex-shrink: 0;
        background: white;
        border-radius: 0 0 20px 20px;
    }
}

/* Tablet-specific fixes - 769px to 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .bottom-panel {
        position: fixed !important;
        bottom: 150px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: none !important;
        min-width: auto !important;
        transform: none !important;
        -webkit-transform: none !important;
        z-index: 200 !important;
        background: #ffffff !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05) !important;
        transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        display: flex !important;
        flex-direction: column !important;
        border: 1px solid #e8eaed !important;
        overflow: hidden !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
        will-change: height !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .bottom-panel.expanded {
        /* Let JavaScript control height */
    }

    .bottom-panel.fully-expanded {
        /* Let JavaScript control height */
    }
    
    .search-overlay {
        position: fixed !important;
        top: 10px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        -webkit-transform: translateX(-50%) !important;
        width: 60vw !important;
        max-width: 600px !important;
        min-width: 400px !important;
        z-index: 100 !important;
        padding: 24px 0 12px 0 !important;
        background: transparent !important;
        pointer-events: none !important;
        display: flex !important;
        justify-content: center !important;
    }
    
    .mobile-map-container {
        position: fixed !important;
        top: env(safe-area-inset-top, 0px);
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        height: calc(100vh - 60px - env(safe-area-inset-bottom, 0px)) !important;
        bottom: 120px !important;
        z-index: 1 !important;
        overflow: hidden !important;
        transform: none !important;
        -webkit-transform: none !important;
    }
    
    .account-modal {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        -webkit-transform: translate(-50%, -50%) !important;
        width: 85vw !important;
        max-width: 750px !important;
        min-width: 600px !important;
        max-height: 85vh !important;
        height: auto !important;
        border-radius: 20px !important;
        background: white !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        z-index: 2001 !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
        border: 1px solid #e8eaed !important;
    }

    .account-modal-content {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        min-height: 0 !important;
        position: relative !important;
        transform: translateZ(0) !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
        will-change: scroll-position !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
        max-height: calc(85vh - 80px) !important;
    }

    .account-profile-container {
        padding: 32px !important;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: min-content;
    }

    .account-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        margin-bottom: 24px;
    }

    .detail-section:last-child {
        grid-column: 1 / -1;
    }

    .store-header {
        margin-bottom: 40px;
        gap: 20px;
    }

    .store-icon-large {
        width: 80px;
        height: 80px;
        font-size: 24px;
    }

    .store-header-info h3 {
        font-size: 28px;
    }

    .store-header-info p {
        font-size: 18px;
    }
}

/* Prevent layout shifts during PWA transitions */
.layout-map-page {
    overflow: hidden;
    height: var(--app-height);
    max-height: var(--app-height);
}

/* Search Overlay and Input - iOS Safe */
.search-overlay {
    position: fixed;
    top: var(--safe-top, 12px);
    left: 0;
    right: 0;
    z-index: 100;
    padding: 12px 16px;
    background: transparent;
    pointer-events: none;
    transform: none;
    -webkit-transform: none;
}

.search-container {
    background: white;
    border-radius: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    padding: 4px 8px 4px 16px;
    gap: 12px;
    pointer-events: all;
    transition: all 0.3s ease;
    transform: none;
    -webkit-transform: none;
}

.search-container:focus-within {
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    transform: translateY(1px);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #202124;
    background: transparent;
    font-family: 'ABCWhyte-Regular', Arial, sans-serif;
}

.search-input::placeholder {
    color: #9aa0a6;
}

.search-button {
    background: #004f3c;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.search-button:hover {
    background: #006b4a;
    transform: translateY(-1px);
}

.location-icon {
    color: #004f3c;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.location-icon:hover {
    background-color: rgba(0,79,60,0.1);
}

/* Map Controls */
.map-controls {
    position: fixed;
    top: calc(var(--safe-top, 12px) + 80px);
    right: 16px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: none;
    -webkit-transform: none;
}

.control-button {
    width: 48px;
    height: 48px;
    background: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #004f3c;
}

.control-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Search Area Button */
.search-area-button-container {
    position: fixed;
    top: calc(var(--safe-top, 12px) + 80px);
    left: 50%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    z-index: 200;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-area-button {
    background: linear-gradient(135deg, #004f3c 0%, #006b4a 100%);
    color: white;
    border: none;
    border-radius: 24px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0,79,60,0.3);
    transition: all 0.3s ease;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
    pointer-events: all;
    animation: slideDownIn 0.4s ease-out;
    min-height: 44px;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
}

.search-area-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,79,60,0.4);
    background: linear-gradient(135deg, #006b4a 0%, #004f3c 100%);
}

.search-area-button:active {
    transform: translateY(0px);
    box-shadow: 0 2px 8px rgba(0,79,60,0.3);
}

/* Panel Title and Close Button */
.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    color: #202124;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
    flex: 1;
    margin-right: 16px;
}

.result-count {
    font-size: 14px;
    color: #5f6368;
    font-weight: 400;
    font-family: 'ABCWhyte-Regular', Arial, sans-serif;
}

.panel-close-button {
    background: transparent;
    border: none;
    color: #5f6368;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex-shrink: 0;
    touch-action: manipulation;
}

.panel-close-button:hover {
    background: #f1f3f4;
    color: #202124;
}

.panel-close-button:active {
    background: #e8eaed;
    transform: scale(0.95);
}

/* Store List */
.store-list {
    padding: 0;
}

.store-item {
    padding: 16px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.store-item:hover {
    background-color: #f8f9fa;
}

.store-item:active {
    background-color: #f1f3f4;
}

.store-icon {
    width: 40px;
    height: 40px;
    background: #004f3c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
    font-family: 'ABCWhyte-Medium', monospace;
}

.store-info {
    flex: 1;
    min-width: 0;
}

.store-name {
    font-weight: 600;
    color: #202124;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
}

.store-details {
    font-size: 14px;
    color: #5f6368;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-family: 'ABCWhyte-Regular', Arial, sans-serif;
}

.store-address {
    font-size: 13px;
    color: #9aa0a6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'ABCWhyte-Regular', Arial, sans-serif;
}

.store-distance {
    color: #004f3c;
    font-weight: 500;
    font-size: 14px;
    flex-shrink: 0;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
}

.status-active {
    background: #e8f5e8;
    color: #137333;
}

.status-prospect {
    background: #fef7e0;
    color: #b06000;
}

.status-churned {
    background: #ffebee;
    color: #d32f2f;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e8eaed;
    border-top: 3px solid #004f3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid #e8eaed;
    border-top: 2px solid #004f3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ========================================================================= */
/* ENHANCED MODAL STYLES WITH iOS FIXES                                     */
/* ========================================================================= */

/* Filters Modal */
.filters-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

.filters-modal-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

.filters-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
}

.filters-modal.visible {
    transform: translateY(0);
}

.filters-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e8eaed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px 20px 0 0;
}

.filters-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #004f3c;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
}

.filters-modal-close {
    background: none;
    border: none;
    color: #5f6368;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    touch-action: manipulation;
}

.filters-modal-close:hover {
    background: #f1f3f4;
    color: #202124;
}

.filters-modal-content {
    padding: 24px;
    overflow-y: auto !important;
    flex: 1;
    -webkit-overflow-scrolling: touch !important;
    transform: translateZ(0);
    /*max-height: calc(100vh - 80px);*/
}

.filter-section {
    margin-bottom: 24px;
}

.filter-label {
    display: block;
    font-weight: 500;
    color: #202124;
    margin-bottom: 8px;
    font-size: 14px;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
}

.filter-dropdown {
    width: 100% !important;
    min-height: 48px !important;
    border-radius: 12px !important;
    border: 2px solid #e8eaed !important;
    font-size: 14px !important;
    padding: 12px 16px !important;
    font-family: 'ABCWhyte-Regular', Arial, sans-serif !important;
    transition: border-color 0.2s ease !important;
}

.filter-dropdown:focus {
    border-color: #004f3c !important;
    box-shadow: 0 0 0 3px rgba(0, 79, 60, 0.1) !important;
}

.filter-actions {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #f1f3f4;
    margin-top: 8px;
}

.filter-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
    min-height: 48px;
    touch-action: manipulation;
}

.filter-button.primary {
    background: linear-gradient(135deg, #004f3c 0%, #006b4a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 79, 60, 0.3);
}

.filter-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 79, 60, 0.4);
}

.filter-button.secondary {
    background: white;
    color: #5f6368;
    border: 2px solid #e8eaed;
}

.filter-button.secondary:hover {
    background: #f8f9fa;
    border-color: #5f6368;
    transform: translateY(-1px);
}

/* Account Modal - Full iOS Support */
.account-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

.account-modal-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

/* Enhanced Account Modal for iOS */
@media (max-width: 768px) {
    .account-modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: none !important;
        -webkit-transform: none !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        height: var(--app-height) !important;
        width: 100vw !important;
        border-radius: 0 !important;
        background: white !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        z-index: 2001 !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
        overflow: hidden !important;
    }

    @supports (padding: env(safe-area-inset-top)) {
        .account-modal {
            padding-top: var(--safe-top) !important;
            padding-bottom: var(--safe-bottom) !important;
            padding-left: var(--safe-left) !important;
            padding-right: var(--safe-right) !important;
        }
    }

    .account-modal-content {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        min-height: 0 !important;
        position: relative !important;
        transform: translateZ(0) !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
        will-change: scroll-position !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
    }

    .account-profile-container {
        padding: 24px !important;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: min-content;
        padding-bottom: calc(24px + var(--safe-bottom)) !important;
    }
}

/* Desktop modal positioning */
@media (min-width: 769px) {
    .filters-modal {
        position: fixed;
        top: 50%;
        left: 50%;
        bottom: auto;
        right: auto;
        transform: translate(-50%, -50%) scale(0.9);
        border-radius: 20px;
        max-width: 500px;
        width: calc(100vw - 32px);
        max-height: calc(90vh);
        background: white;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        margin: 0;
    }

    .filters-modal.visible {
        transform: translate(-50%, -50%) scale(1);
    }

    .filters-modal-header {
        padding: 20px 24px 16px;
        border-radius: 20px 20px 0 0;
        flex-shrink: 0;
    }

    .filters-modal-content {
        padding: 24px;
        overflow-y: auto;
        flex: 1;
        -webkit-overflow-scrolling: touch;
        transform: translateZ(0);
        /*max-height: calc(90vh - 140px);*/
    }

    .filter-actions {
        flex-direction: row;
        padding: 16px 24px;
        border-radius: 0 0 20px 20px;
    }
    .account-modal {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        -webkit-transform: translate(-50%, -50%) !important;
        max-width: min(900px, calc(100vw - 32px)) !important;
        max-height: min(90vh, calc(100vh - 32px)) !important;
        width: auto !important;
        height: auto !important;
        border-radius: 20px !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
}

.account-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e8eaed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    flex-shrink: 0;
    border-radius: 20px 20px 0 0 !important;
}

.account-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #004f3c;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
}

.account-modal-close {
    background: none;
    border: none;
    color: #5f6368;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.account-modal-close:hover {
    background: #f1f3f4;
    color: #202124;
}

.store-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f3f4;
    flex-shrink: 0;
}

.store-icon-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
    font-family: 'ABCWhyte-Medium', monospace;
}

.store-header-info {
    flex: 1;
    min-width: 0;
}

.store-header-info h3 {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 600;
    color: #202124;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
    line-height: 1.2;
    word-wrap: break-word;
}

.store-header-info p {
    margin: 0 0 12px;
    font-size: 16px;
    color: #5f6368;
    font-family: 'ABCWhyte-Regular', Arial, sans-serif;
}

.store-status-large {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
    display: inline-block;
}

.account-details {
    margin-bottom: 24px;
}

.detail-section {
    margin-bottom: 12px;
    border-bottom: 1px solid #f1f3f4;
}

.detail-section h4 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #004f3c;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-label {
    font-weight: 500;
    color: #5f6368;
    min-width: 120px;
    font-size: 14px;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
}

.detail-value {
    color: #202124;
    font-size: 14px;
    font-family: 'ABCWhyte-Regular', Arial, sans-serif;
    line-height: 1.4;
    flex: 1;
    word-wrap: break-word;
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 24px;
    padding-bottom: 60px;
    flex-shrink: 0;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
    min-height: 48px;
}

.action-button.primary {
    background: linear-gradient(135deg, #004f3c 0%, #006b4a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 79, 60, 0.3);
}

.action-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 79, 60, 0.4);
}

.action-button.secondary {
    background: white;
    color: #004f3c;
    border: 2px solid #e8eaed;
}

.action-button.secondary:hover {
    background: #f8f9fa;
    border-color: #004f3c;
    transform: translateY(-1px);
}

/* Distributor Section */
.distributor-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #e8eaed;
    transition: all 0.2s ease;
}

.distributor-item:hover {
    background: #f1f3f4;
    border-color: #004f3c;
}

.distributor-item:last-child {
    margin-bottom: 0;
}

.distributor-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.distributor-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #004f3c 0%, #006b4a 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.distributor-info {
    flex: 1;
    min-width: 0;
}

.distributor-name {
    font-weight: 600;
    color: #202124;
    font-size: 14px;
    margin-bottom: 2px;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
    word-wrap: break-word;
}

.distributor-id {
    font-size: 12px;
    color: #5f6368;
    font-family: 'ABCWhyte-Regular', Arial, sans-serif;
}

.distributor-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    padding-left: 32px;
}

.distributor-detail:last-child {
    margin-bottom: 0;
}

.distributor-detail-label {
    font-size: 12px;
    color: #5f6368;
    font-weight: 400;
    min-width: 90px;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
}

.distributor-detail-value {
    font-size: 12px;
    color: #202124;
    font-family: 'ABCWhyte-Regular', Arial, sans-serif;
    word-wrap: break-word;
    flex: 1;
}

.no-distributors {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px dashed #e8eaed;
}

.no-distributors-icon {
    flex-shrink: 0;
}

.no-distributors-text {
    color: #5f6368;
    font-family: 'ABCWhyte-Regular', Arial, sans-serif;
}

/* Add Account Modal - Enhanced for iOS */
.account-modal[data-modal="add-account"] .account-modal-content {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    transform: translateZ(0);
    will-change: scroll-position;
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.account-modal[data-modal="add-account"] .detail-section {
    margin-bottom: 36px;
    padding: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.account-modal[data-modal="add-account"] .detail-section h4 {
    margin: 0 0 24px;
    font-size: 18px;
    font-weight: 800;
    color: #2d3748;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.025em;
}

.account-modal[data-modal="add-account"] .account-modal-header {
    background: #004f3c;
    color: white;
    border-bottom: none;
}

.account-modal[data-modal="add-account"] .account-modal-header h2 {
    color: white;
    font-size: 22px;
    font-weight: 800;
}

.account-modal[data-modal="add-account"] .account-modal-close {
    color: rgba(255, 255, 255, 0.9);
}

.account-modal[data-modal="add-account"] .account-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* Form Elements - iOS Compatible */
.form-group {
    margin-bottom: 16px;
    position: relative;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #1a202c;
    margin-bottom: 5px;
    font-size: 14px;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
    letter-spacing: 0.025em;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 8px 10px;
    min-height: 35px !important;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    font-family: 'ABCWhyte-Regular', Arial, sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #2d3748;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.form-input:focus {
    outline: none;
    border-color: #004f3c;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 79, 60, 0.12), 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.form-input:hover:not(:focus) {
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.form-input::placeholder {
    color: #a0aec0;
    font-style: italic;
}

.form-dropdown {
    width: 100% !important;
    line-height: 20px !important;
    min-height: 35px !important;
    border-radius: 16px !important;
    border: 2px solid #e2e8f0 !important;
    font-size: 14px !important;
    padding: 8px 10px !important;
    font-family: 'ABCWhyte-Regular', Arial, sans-serif !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
}

.form-dropdown:focus,
.form-dropdown:focus-within {
    border-color: #004f3c !important;
    background: white !important;
    box-shadow: 0 0 0 4px rgba(0, 79, 60, 0.12), 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px) !important;
}

.rz-dropdown:focus,
.rz-dropdown.rz-state-focused {
    position: relative !important;
    z-index: 1 !important;
}

.rz-dropdown-panel {
    position: fixed !important;
    z-index: 10002 !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

@media (max-width: 768px) {
    .rz-dropdown-panel {
        max-height: 40vh !important;
    }
}

/* ========================================================================= */
/* GROUPED ORDER HISTORY STYLES                                             */
/* ========================================================================= */

.order-history-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Explicitly prevent scrolling and height constraints */
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    /* Ensure it expands naturally to fit content */
    flex: none !important;
    min-height: auto !important;
}

.order-date-group {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #e8eaed;
}

.date-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8eaed;
}

.date-header-icon {
    width: 24px;
    height: 24px;
    background: #004f3c;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.date-group-title {
    font-weight: 600;
    color: #202124;
    font-size: 14px;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
    flex: 1;
}

.date-group-orders {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-item {
    background: white;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #e8eaed;
    transition: all 0.2s ease;
}

.order-item:hover {
    border-color: #004f3c;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.order-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-icon.beer-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #d4a574 0%, #b8956a 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.order-icon.beer-icon:nth-child(3n+1) {
    background: linear-gradient(135deg, #d4a574 0%, #b8956a 100%);
}

.order-icon.beer-icon:nth-child(3n+2) {
    background: linear-gradient(135deg, #8b4513 0%, #6b3410 100%);
}

.order-icon.beer-icon:nth-child(3n+3) {
    background: linear-gradient(135deg, #cd853f 0%, #a0522d 100%);
}

.order-icon.beer-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.order-info {
    flex: 1;
    min-width: 0;
}

.order-flavor {
    font-weight: 600;
    color: #202124;
    font-size: 14px;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-cases {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 6px 10px;
    min-width: 50px;
    border: 1px solid #e8eaed;
}

.cases-number {
    font-size: 16px;
    font-weight: 700;
    color: #004f3c;
    line-height: 1;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
}

.cases-label {
    font-size: 10px;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'ABCWhyte-Regular', Arial, sans-serif;
}

.order-summary {
    margin-top: 8px;
    padding: 16px;
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    border-radius: 12px;
    border: 1px solid #c8e6c9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-label {
    font-size: 13px;
    color: #2e7d32;
    font-weight: 500;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
}

.summary-value {
    font-size: 13px;
    color: #1b5e20;
    font-weight: 600;
    font-family: 'ABCWhyte-Medium', Arial, sans-serif;
}

.no-orders {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px dashed #e8eaed;
}

.no-orders-icon {
    flex-shrink: 0;
    color: #d4a574;
}

.no-orders-text {
    color: #5f6368;
    font-family: 'ABCWhyte-Regular', Arial, sans-serif;
    text-align: left;
}

/* ========================================================================= */
/* MAP AND POPUP STYLES                                                     */
/* ========================================================================= */

.mobile-map-control {
    position: absolute;
    z-index: 1010;
    background: white;
    border: 1px solid #004f3c;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    min-width: 48px;
    min-height: 48px;
    padding: 12px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.mobile-map-control:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.store-popup {
    font-family: Arial, sans-serif;
    max-width: 300px;
    padding: 10px;
}

.store-popup h4 {
    margin: 0 0 10px;
}

.store-popup p {
    margin: 5px 0;
}

.store-popup button {
    padding: 5px;
    cursor: pointer;
    border: none;
    border-radius: 3px;
    margin-bottom: 5px;
    width: 100%;
    text-align: left;
}

.store-popup .view-account {
    background-color: #007bff;
    color: white;
}

.store-popup .schedule-activity {
    background-color: #28a745;
    color: white;
}

.store-popup .check-in {
    background-color: #6c757d;
    color: white;
}

.gm-style .gm-style-iw {
    font-family: Arial, sans-serif;
}

.gm-style .gm-style-iw-c {
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    padding:0px;
}
.gm-style-iw-d {
    overflow: hidden !important; /* Remove scrollbar */
    padding: 0 !important; /* Ensure no padding */
    margin: 0 !important; /* Ensure no margin */
    max-height: none !important; /* Remove max-height restriction if not needed */
}
.custom-info-window {
    padding: 0 !important; /* Reinforce no padding on your custom div */
    margin: 0 !important;
    box-sizing: border-box; /* Ensure padding/margin don’t increase size */
}
/* ========================================================================= */
/* MENU STYLES                                                              */
/* ========================================================================= */

.desktop-menu {
    display: inline-block;
}

.mobile-menu-toggle {
    display: none;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 90vw;
    height: 100%;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    overflow-y: auto;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e8eaed;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.mobile-menu-content {
    padding: 16px 0;
}

.mobile-menu-section {
    margin-bottom: 8px;
}

.mobile-submenu {
    background: #f8f9fa;
    border-left: 3px solid var(--rz-primary);
    margin: 0 16px;
    border-radius: 0 6px 6px 0;
}

/* ========================================================================= */
/* GRID AND HEADER STYLES                                                   */
/* ========================================================================= */

.simple-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 12px;
    flex-wrap: wrap;
}

.header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-search {
    display: flex;
    align-items: center;
}

img {
    object-fit: contain;
}

/* ========================================================================= */
/* MOBILE ACCOUNT PROFILE STYLES                                            */
/* ========================================================================= */

.mobile-breadcrumb {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #e8eaed;
    position: sticky;
    top: 0;
    z-index: 100;
}

.breadcrumb-text {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.mobile-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading-text {
    margin-top: 16px;
    color: #5f6368;
    font-size: 14px;
}

.mobile-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.error-title {
    margin: 16px 0 8px;
    color: #202124;
}

.error-description {
    color: #5f6368;
    margin-bottom: 24px;
    line-height: 1.5;
}

.mobile-account-header {
    background: white;
   /* border-bottom: 1px solid #e8eaed;*/
}

.account-header-gradient {
    background: linear-gradient(135deg, #004f3c 0%, #337263 100%);
    color: white;
    padding: 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.account-info {
    flex: 1;
    min-width: 0;
}

.account-name {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-chain {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-location {
    font-size: 12px;
    opacity: 0.8;
    display: flex;
    align-items: center;
}

.account-status {
    flex-shrink: 0;
}

.mobile-quick-actions {
    padding: 16px;
    background: #f8f9fa;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.quick-action-btn {
    background: white;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    color: #202124;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-tab-nav {
    background: white;
    border-bottom: 1px solid #e8eaed;
    position: sticky;
    top: 60px;
    z-index: 99;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-nav-container {
    display: flex;
    padding: 0 16px;
    min-width: max-content;
}

.tab-nav-item {
    background: none;
    border: none;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #5f6368;
    font-size: 11px;
    font-weight: 500;
    min-width: 70px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.tab-nav-item.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

.tab-nav-item i {
    font-size: 20px;
}

.mobile-tab-content {
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.tab-content-panel {
    padding: 16px;
}

.mobile-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-title {
    margin: 0 0 16px;
    color: #202124;
    font-size: 16px;
    font-weight: 600;
}

.card-subtitle {
    margin: 0 0 12px;
    color: #202124;
    font-size: 14px;
    font-weight: 600;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    margin: 0;
    color: #202124;
    font-size: 18px;
    font-weight: 600;
}

.section-title {
    margin: 0 0 20px;
    color: #202124;
    font-size: 18px;
    font-weight: 600;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
    gap: 16px;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #5f6368;
    font-size: 14px;
    flex-shrink: 0;
    min-width: 80px;
}

.info-value {
    color: #202124;
    font-size: 14px;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.success {
    background: #e8f5e8;
    color: #34a853;
}

.activity-icon.info {
    background: #e3f2fd;
    color: #1a73e8;
}

.activity-icon.warning {
    background: #fff3e0;
    color: #fbbc04;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    color: #202124;
    font-size: 14px;
    margin-bottom: 2px;
}

.activity-time {
    font-size: 12px;
    color: #5f6368;
}

.category-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.category-pill {
    background: #f1f3f4;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    color: #5f6368;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.category-pill.active {
    background: #1a73e8;
    color: white;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.photo-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8eaed;
}

.photo-placeholder {
    aspect-ratio: 16/9;
    background: #f1f3f4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-info {
    padding: 8px;
}

.photo-title {
    font-size: 12px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 2px;
}

.photo-date {
    font-size: 11px;
    color: #5f6368;
}

.upcoming-activity {
    display: flex;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    margin-bottom: 12px;
}

.activity-date {
    text-align: center;
    flex-shrink: 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
    min-width: 48px;
}

.date-day {
    font-size: 18px;
    font-weight: 600;
    color: #202124;
    line-height: 1;
}

.date-month {
    font-size: 11px;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-details {
    flex: 1;
}

.activity-desc {
    font-size: 13px;
    color: #5f6368;
    margin-top: 4px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.action-item {
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    color: #202124;
}

.action-item:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-timeline {
    position: relative;
    padding-left: 24px;
}

.mobile-timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e8eaed;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-dot {
    position: absolute;
    left: -18px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 1px #e8eaed;
}

.timeline-content {
    background: white;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 16px;
    margin-left: 12px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 16px;
}

.timeline-title {
    font-weight: 500;
    color: #202124;
    font-size: 14px;
}

.timeline-date {
    color: #5f6368;
    font-size: 12px;
    flex-shrink: 0;
}

.timeline-desc {
    color: #5f6368;
    font-size: 13px;
    line-height: 1.4;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.metric-item {
    text-align: center;
    padding: 16px;
    border-radius: 8px;
}

.metric-item.success {
    background: #e8f5e8;
}

.metric-item.info {
    background: #e3f2fd;
}

.metric-item.warning {
    background: #fff3e0;
}

.metric-item.error {
    background: #fce4ec;
}

.metric-value {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.metric-item.success .metric-value {
    color: #137333;
}

.metric-item.info .metric-value {
    color: #1565c0;
}

.metric-item.warning .metric-value {
    color: #ef6c00;
}

.metric-item.error .metric-value {
    color: #c2185b;
}

.metric-label {
    font-size: 12px;
    color: #5f6368;
}

.display-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.display-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #e8eaed;
    border-radius: 8px;
}

.display-info {
    flex: 1;
}

.display-title {
    font-weight: 500;
    color: #202124;
    font-size: 14px;
    margin-bottom: 2px;
}

.display-location {
    color: #5f6368;
    font-size: 12px;
}

/* ========================================================================= */
/* RESPONSIVE STYLES WITH iOS ENHANCEMENTS                                  */
/* ========================================================================= */

/* Mobile (up to 768px) - Enhanced for iOS */
@media (max-width: 768px) {
    .rz-button {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        min-width: 44px;
        min-height: 44px;
    }

    .rz-googlemap {
        touch-action: pan-x pan-y;
    }

    .mobile-scrollable-grid {
        touch-action: pan-x pan-y;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-scrollable-grid .rz-datatable-scrollable-body {
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
        transform: translateZ(0);
        overscroll-behavior: contain;
        position: relative;
    }

    .mobile-scrollable-grid .rz-datatable-scrollable-body table,
    .mobile-scrollable-grid td,
    .mobile-scrollable-grid th {
        touch-action: pan-x pan-y;
    }

    .mobile-scrollable-grid button {
        touch-action: manipulation;
    }

    .simple-grid-header {
        justify-content: flex-start;
        gap: 8px;
    }

    .header-buttons {
        gap: 6px;
    }

    .header-buttons .rz-button {
        font-size: 12px;
        padding: 6px 10px;
    }

    .header-search,
    .hide-on-mobile,
    .rz-column.hide-on-mobile,
    .rz-card.hide-on-mobile {
        display: none !important;
    }

    .desktop-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .mobile-menu-panel {
        width: 280px;
    }

    .rz-menuitem-text {
        display: none;
    }

    /* Enhanced order history for mobile */
    .order-history-container {
        gap: 12px;
    }

    .order-date-group {
        padding: 10px;
    }

    .date-group-header {
        gap: 6px;
        margin-bottom: 10px;
    }

    .date-header-icon {
        width: 20px;
        height: 20px;
    }

    .date-header-icon svg {
        width: 12px;
        height: 12px;
    }

    .date-group-title {
        font-size: 13px;
    }

    .order-header {
        gap: 10px;
    }

    .order-icon.beer-icon {
        width: 28px;
        height: 28px;
    }

    .order-icon.beer-icon svg {
        width: 14px;
        height: 14px;
    }

    .order-flavor {
        font-size: 13px;
    }

    .order-cases {
        padding: 5px 8px;
        min-width: 45px;
    }

    .cases-number {
        font-size: 14px;
    }

    .cases-label {
        font-size: 9px;
    }

    .summary-label,
    .summary-value {
        font-size: 12px;
    }

    .no-orders {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .no-orders-text {
        text-align: center;
    }

    /* Enhanced landscape mode for iOS */
    @media (orientation: landscape) {
        .mobile-map-container {
            bottom: calc(100px + var(--safe-bottom)) !important;
            height: calc(var(--app-height) - 100px - var(--safe-bottom)) !important;
        }

        .bottom-panel {
            height: calc(100px + var(--safe-bottom)) !important;
            min-height: calc(100px + var(--safe-bottom)) !important;
        }

        .bottom-panel.expanded {
            height: calc(60vh + var(--safe-bottom)) !important;
        }

        .bottom-panel.fully-expanded {
            height: calc(80vh + var(--safe-bottom)) !important;
        }

        .search-overlay {
            top: calc(var(--safe-top) + 8px) !important;
            padding: 8px 16px !important;
        }

        .map-controls {
            top: calc(var(--safe-top) + 60px) !important;
        }

        .search-area-button-container {
            top: calc(var(--safe-top) + 60px) !important;
        }
    }
}

/* Tablet (481px to 768px) */
@media (max-width: 768px) and (min-width: 481px) {
    .mobile-menu-panel {
        width: 280px;
    }
}

/* Phone (up to 480px) */
@media (max-width: 480px) {
    .mobile-menu-panel {
        width: 100%;
        max-width: 100vw;
    }

    .search-container {
        padding: 4px 6px 4px 12px !important;
    }

    .map-controls {
        right: 12px !important;
    }

    .control-button {
        width: 44px !important;
        height: 44px !important;
    }
}

/* Desktop (769px and above) */
@media (min-width: 769px) {
    .mobile-breadcrumb {
        padding: 16px 24px;
    }

    .account-header-gradient {
        padding: 24px;
    }

    .account-name {
        font-size: 24px;
    }

    .quick-action-grid {
        grid-template-columns: repeat(6, 1fr);
        max-width: 600px;
        margin: 0 auto;
    }

    .tab-content-panel {
        padding: 24px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .order-date-group:hover {
        background: #f1f3f4;
        border-color: #004f3c;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .order-item:hover .order-cases {
        border-color: #004f3c;
        background: white;
        box-shadow: 0 2px 4px rgba(0, 79, 60, 0.1);
    }

    .order-item:hover .cases-number {
        color: #006b4a;
    }

  .order-history-container {
        display: flex;
        flex-direction: column;
        gap: 16px;
        max-width: 800px; /* Optional: limit width for better readability */
        margin: 0 auto;   /* Optional: center the content */
    }

    .order-summary {
        width: 100%;
    }

    /* Desktop map layout */
    .search-overlay {
        position: fixed;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        width: 50vw;
        max-width: 600px;
        min-width: 400px;
        z-index: 100;
        padding: env(safe-area-inset-top, 24px) 0 12px 0;
        background: transparent;
        pointer-events: none;
        display: flex;
        justify-content: center;
    }

    .search-area-button-container {
        top: 90px;
    }

    .search-area-button {
        padding: 14px 24px;
        font-size: 15px;
        min-height: 48px;
        border-radius: 28px;
        box-shadow: 0 6px 20px rgba(0,79,60,0.25);
    }

    .search-area-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 24px rgba(0,79,60,0.35);
        scale: 1.02;
    }

    .bottom-panel {
        position: fixed;
        bottom: 0;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 60vw;
        max-width: 1200px;
        min-width: 600px;
        z-index: 200;
        background: #ffffff;
        border-radius: 20px;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
        height: 120px;
        transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        border: 1px solid #e8eaed;
        overflow: hidden;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        will-change: height;
       /* margin-bottom: 16px;*/
    }
}

/* Large Desktop (1024px and above) */
@media (min-width: 1024px) {
    .mobile-tab-nav {
        position: relative;
        top: auto;
    }

    .tab-nav-container {
        justify-content: center;
        max-width: 800px;
        margin: 0 auto;
    }

    .tab-nav-item {
        padding: 16px 24px;
        min-width: 120px;
    }
}

/* Extra Large Desktop (1100px and above) */
@media (max-width: 1100px) {
    .desktop-menu .rz-menuitem {
        padding: 8px 12px;
    }

    .desktop-menu .rz-menuitem-text {
        font-size: 9px;
    }
}

@media (max-width: 1200px) {
    .desktop-menu .rz-menuitem-text {
        font-size: 10px;
    }
}

/* ========================================================================= */
/* CONSOLIDATED PWA STYLES - REPLACES ALL EXISTING PWA SECTIONS             */
/* ========================================================================= */

@media all and (display-mode: standalone) {
 
    /* HTML - Green background for status bar */
    html {
        height: 100% !important;
        min-height: 100% !important;
        max-height: 100% !important;
        overflow: hidden !important;
        background-color: #004F3C !important;
        margin: 0 !important;
        padding: 0 !important;
        background: linear-gradient(
            to bottom,
            #004F3C 0px,
            #004F3C env(safe-area-inset-top, 44px),
            #f9f6ef env(safe-area-inset-top, 44px),
            #f9f6ef 100%
        ) !important;
        background-attachment: fixed !important;
    }
    

    /* Radzen layout fixes */
    .rz-layout {
        height: 100vh !important;
        min-height: 100vh !important;
        background-color: #f9f6ef !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
      .rz-body,
    .rz-layout-content,
    main {
        margin-top: 0 !important;
        padding-top: calc(60px + 16px) !important;
        /* FIX: Add extra space for mobile browser bars when NOT in PWA */
        padding-bottom: max(120px, env(safe-area-inset-bottom), 80px) !important;
        height: calc(100vh - env(safe-area-inset-top, 0px) - 60px - 16px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        background-color: #f9f6ef !important;
    }
    
    .rz-sidebar {
        padding-bottom: 90px;
    }
    /* Exception for pages that need custom spacing */
    main:not(:has(.mobile-map-wrapper)) {
        margin-top: 0 !important; /* Content positioning handled by padding-top above */
    }

    /* Sidebar toggle - always accessible */
    .rz-sidebar-toggle {
        position: relative !important;
        z-index: 4000 !important;
        min-height: 44px !important;
        min-width: 44px !important;
        background: transparent !important;
        border: none !important;
        color: #d3b890 !important;
        pointer-events: all !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(211, 184, 144, 0.3) !important;
    }
    
    .mobile-map-wrapper,
    [data-component="AccountMap"] {
        position: fixed !important;
        top: 0 !important;  /* Changed from calc() to 0 since body margin handles offset */
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: calc(100vh - env(safe-area-inset-top, 0px) - 60px) !important;
        background: #f9f6ef !important;
        overflow: hidden !important;
        z-index: 1 !important;
        /* REMOVED: margin-top offset - body positioning handles this */
        margin: 0 !important;
    }
    
    /* Map container */
    .mobile-map-container {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 1 !important;
        overflow: hidden !important;
        background: #f9f6ef !important;
    }
    
    /* Google Maps fills container */
    .mobile-map-container .rz-googlemap,
    .mobile-map-container > div,
    .mobile-map-container .rz-googlemap > div,
    .mobile-map-container [style*="position: relative"] {
        width: 100% !important;
        height: 100% !important;
        position: relative !important;
    }
    
    /* Bottom panel positioning */
    .bottom-panel {
        position: fixed !important;
        bottom: 100px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        z-index: 1000 !important;
        background: #ffffff !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15) !important;
        border: 1px solid #e8eaed !important;
        border-bottom: none !important;
        margin: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .bottom-panel.has-safe-area {
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    }
    
    /* PWA search and controls positioning */
    .search-overlay {
        top: var(--pwa-search-top) !important;
        padding: 8px 16px 12px 16px !important;
    }
    
    .map-controls {
        top: var(--pwa-controls-top) !important;
    }
    
    .search-area-button-container {
        top: var(--pwa-controls-top) !important;
    }
    
    /* Remove any body padding overrides */
    .rz-body {
        --rz-body-padding: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .camera-fullscreen-dialog {
        /* Ensure it starts from the very top, ignoring safe areas */
        top: calc(-1 * env(safe-area-inset-top, 0px)) !important;
        height: calc(100vh + env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px)) !important;
    }
    
    .camera-fullscreen-dialog .rz-dialog-content {
        /* Content should fill the extended height */
        height: calc(100vh + env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px)) !important;
        padding-top: env(safe-area-inset-top, 0px) !important;
    }
    /* Force remove any inherited spacing */
    * {
        box-sizing: border-box !important;
    }
    
    /* Remove any Radzen default spacing */
    div[b-*],
    .rz-component,
    .rz-layout,
    .rz-layout-content,
    .rz-layout-content-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        background: #f9f6ef !important;
    }
    
    /* Exception for non-map pages that need header spacing */
    main:not(:has(.mobile-map-wrapper)) {
        margin-top: 0 !important; /* Body already handles this */
    }
}

/* iOS-specific enhancements */
@supports (-webkit-touch-callout: none) {
     :root {
        --mobile-bottom-safe: max(env(safe-area-inset-bottom, 0px), 34px);
        --browser-bottom-padding: 80px; /* iOS Safari needs more space */
    }
    @media all and (display-mode: standalone) {
        /* Additional iOS fixes */
        html, body {
            width: 100vw !important;
            -webkit-overflow-scrolling: auto !important;
            overscroll-behavior: none !important;
        }
        
        /* Ensure sidebar doesn't block header interactions */
        .rz-sidebar.rz-sidebar-expanded {
            z-index: 2000 !important;
        }
        
        .rz-sidebar-overlay {
            z-index: 1999 !important;
        }
    }
}

/* ========================================================================= */
/* ANIMATIONS AND UTILITIES                                                 */
/* ========================================================================= */

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes slideDownIn {
    0% { opacity: 0; transform: translateY(-20px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes desktopBounceIn {
    0% { opacity: 0; transform: scale(0.8) translateY(-20px); }
    60% { opacity: 1; transform: scale(1.05) translateY(5px); }
    80% { transform: scale(0.95) translateY(-2px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Icons */
@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/materialicons/v140/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
}

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Debug utilities - remove in production */
.debug-safe-areas {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 999999;
    display: none; /* Set to block to see safe areas */
}

.debug-safe-areas::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--safe-top);
    background: rgba(255, 0, 0, 0.3);
}

.debug-safe-areas::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--safe-bottom);
    background: rgba(0, 255, 0, 0.3);
}

/* ========================================================================= */
/* PWA BACKGROUND IMAGE AND LOGIN FIXES                                     */
/* ========================================================================= */

@media all and (display-mode: standalone) {
    /* Override the global background for login pages  
  html.login-page {
        background: none !important;
        background-color: transparent !important;
        overflow: hidden !important;
        height: 100vh !important;
        position: fixed !important;
        width: 100vw !important;
        /* Add safe area support */
        padding-top: env(safe-area-inset-top) !important;
        padding-left: env(safe-area-inset-left) !important;
        padding-right: env(safe-area-inset-right) !important;
        box-sizing: border-box !important;
    }
    
  body.login-page {
        background-color: transparent !important;
        overflow: hidden !important;
        height: calc(100vh - env(safe-area-inset-top)) !important;
        position: fixed !important;
        width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
        top: env(safe-area-inset-top) !important;
        left: env(safe-area-inset-left) !important;
        right: env(safe-area-inset-right) !important;
        -webkit-overflow-scrolling: auto !important;
        overscroll-behavior: none !important;
        touch-action: none !important;
        box-sizing: border-box !important;
    }
    
.login-layout {
        height: calc(100vh - env(safe-area-inset-top)) !important;
        height: calc(100dvh - env(safe-area-inset-top)) !important;
        overflow: hidden !important;
        position: fixed !important;
        width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right)) !important;
        top: env(safe-area-inset-top) !important;
        left: env(safe-area-inset-left) !important;
        right: env(safe-area-inset-right) !important;
        /* REMOVED: background-color: transparent !important; */
        /* REMOVED: background: inherit !important; */
        /* Allow inline background styles to work */
        touch-action: none !important;
        -webkit-overflow-scrolling: auto !important;
        overscroll-behavior: none !important;
        box-sizing: border-box !important;
    }
    .login-layout.rz-layout {
        /* Same as above - preserve background images */
        height: calc(100vh - env(safe-area-inset-top)) !important;
        height: calc(100dvh - env(safe-area-inset-top)) !important;
        overflow: hidden !important;
        position: fixed !important;
        width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right)) !important;
        top: env(safe-area-inset-top) !important;
        left: env(safe-area-inset-left) !important;
        right: env(safe-area-inset-right) !important;
        /* REMOVED: background-color: transparent !important; */
        /* REMOVED: background: inherit !important; */
        touch-action: none !important;
        -webkit-overflow-scrolling: auto !important;
        overscroll-behavior: none !important;
        box-sizing: border-box !important;
    }
   /* Fix login body */
    .login-layout .rz-body {
        height: 100% !important;
        overflow: hidden !important;
        /* Keep transparent background for the body overlay */
        background-color: transparent !important;
        touch-action: none !important;
        -webkit-overflow-scrolling: auto !important;
        overscroll-behavior: none !important;
        position: relative !important;
    }
    
    /* Fix RadzenStack in login */
    .login-layout .rz-stack {
        height: 100% !important;
        max-height: 100% !important;
        overflow: hidden !important;
        touch-action: none !important;
        margin: 0 !important;
        padding: 0 !important; /* Remove any default padding that could cause overflow */
        box-sizing: border-box !important;
        position: relative !important;
    }
    
    /* Fix RadzenCard in login */
    .login-layout .rz-card {
        touch-action: none !important;
        overflow: hidden !important;
        max-height: calc(100vh - 16px) !important;
        max-height: calc(100dvh - 16px) !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Fix RadzenRow and RadzenColumn in login */
    .login-layout .rz-row {
        touch-action: none !important;
        overflow: hidden !important;
        flex: 1 !important;
        min-height: 0 !important;
    }
    
 .login-layout .rz-col {
    overflow: hidden !important;
    touch-action: none !important;
    padding: 0 !important; /* Remove column padding that could cause overflow */
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    min-height: 0 !important;
}
  */ 
    /* Mobile-specific login adjustments */
    @media (max-width: 768px) {
         /* Ensure bottom content is visible in mobile Safari */
    .rz-body,
    .rz-layout-content,
    main {
        padding-bottom: var(--browser-bottom-padding) !important;
         /* Add safe area for devices that support it */
        padding-bottom: calc(var(--browser-bottom-padding) + env(safe-area-inset-bottom, 0px)) !important;
    
  
     
    }
    .rz-sidebar.rz-sidebar-expanded ~ .rz-layout-header .rz-profile-menu,
    .rz-sidebar.rz-sidebar-expanded ~ .rz-header .rz-profile-menu {
        display: none !important;
    }

        .login-layout .rz-stack {
            padding: 0 !important; /* Remove padding to prevent overflow */
            max-width: 100% !important;
            height: 100vh !important;
            height: 100dvh !important;
        }
        
        .login-layout .rz-card {
            margin: 0 !important;
            border-radius: 0 !important;
            height: 100vh !important;
            height: 100dvh !important;
            max-height: 100vh !important;
            max-height: 100dvh !important;
            display: flex !important;
            flex-direction: column !important;
        }
        
        /* Mobile login header styling - full width */
        .mobile-login-header {
            width: 100% !important;
            background: linear-gradient(135deg, var(--rz-primary) 0%, var(--rz-primary-darker) 80%) !important;
            margin: 0 !important;
            padding: 20px 16px !important;
            text-align: center !important;
            border-radius: 0 !important;
            box-shadow: none !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
            flex-shrink: 0 !important; /* Prevent header from shrinking */
        }
        
        .mobile-login-header .rz-image {
            margin-bottom: 8px !important;
        }
        
        .mobile-login-header .rz-text {
            margin: 0 !important;
            color: var(--rz-secondary) !important;
        }
        
        /* Fix row to fill remaining space */
        .login-layout .rz-row {
            flex: 1 !important;
            height: auto !important;
            min-height: 0 !important;
            margin: 0 !important;
            display: flex !important;
        }
        
        /* Make the login column fill available space */
        .login-layout .rz-col {
            padding: 0 !important; /* Remove default padding */
            justify-content: center !important;
            flex: 1 !important;
            min-height: 0 !important;
            display: flex !important;
            flex-direction: column !important;
            overflow: hidden !important; /* Prevent scrolling */
        }
        
        /* Style the login form container */
        .login-layout .rz-col > div {
            flex: 1 !important;
            display: flex !important;
            flex-direction: column !important;
            justify-content: center !important;
            padding: 20px !important; /* Add padding here instead */
            min-height: 0 !important;
        }
        
        /* Compact form elements on mobile */
        .login-layout .rz-textbox,
        .login-layout .rz-password,
        .login-layout .rz-button {
            margin-bottom: 12px !important;
        }
        
        /* Reduce text sizes */
        .login-layout .rz-text {
            font-size: 16px !important;
            margin-bottom: 8px !important;
        }
        
        /* Make login form more compact */
        .login-layout form,
        .login-layout .rz-login {
            padding: 0 !important;
            margin: 0 !important;
        }
        
        /* Compact spacing for mobile */
        .login-layout .rz-field {
            margin-bottom: 12px !important;
        }
        
        /* Fix login form title spacing */
        .login-layout .rz-login .rz-text:first-child,
        .login-layout h1,
        .login-layout h2,
        .login-layout h3 {
            margin-top: 0 !important;
            padding-top: 0 !important;
        }
        
        /* Ensure proper bottom spacing */
        .login-layout .rz-login > *:last-child,
        .login-layout form > *:last-child {
            margin-bottom: 20px !important;
        }
    }
    
    /* Compact mobile landscape */
    @media (max-width: 768px) and (orientation: landscape) {
        .mobile-login-header {
            padding: 12px 16px !important;
        }
        
        .mobile-login-header .rz-image {
            width: 60px !important;
        }
        
        .login-layout .rz-col > div {
            padding: 12px !important;
        }
        
        .login-layout .rz-field {
            margin-bottom: 8px !important;
        }
        
        .login-layout .rz-textbox,
        .login-layout .rz-password,
        .login-layout .rz-button {
            margin-bottom: 8px !important;
            height: 32px !important;
        }
        
        .login-layout .rz-login > *:last-child,
        .login-layout form > *:last-child {
            margin-bottom: 12px !important;
        }
    }
    
    /* Allow RadzenLayout background images in PWA mode */
    .rz-layout:has([style*="background: url"]),
    .rz-layout[style*="background: url"],
    [style*="background: url('https://berobrewing.com"]) {
        background-attachment: fixed !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }
    
    /* Override specific PWA body background for login */
    body:has(.login-layout) {
        background-color: transparent !important;
        height: 100vh !important;
        overflow: hidden !important;
        position: fixed !important;
        margin-top: 0 !important;
    }
    
    /* Fix for RadzenLayout with inline background styles */
    .rz-layout[style*="background:"],
    .rz-layout[style*="background-image:"] {
        background-attachment: fixed !important;
    }
    
    /* Disable all scrolling on login form elements */
    .login-layout input,
    .login-layout button,
    .login-layout .rz-button,
    .login-layout .rz-textbox,
    .login-layout .rz-password {
        touch-action: manipulation !important;
    }
    
    /* Fix any nested containers */
    .login-layout * {
        overscroll-behavior: none !important;
    }
}
html.login-page,
body.login-page {
    overflow: hidden !important;
    height: 100vh !important;
    position: relative !important;
    background: #004F3C !important; /* Solid green background */
    
}
.login-layout .rz-body {
    overflow: hidden !important;
}

/* Add this CSS for full-screen camera dialog */
.camera-fullscreen-dialog {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 9999 !important;
}

.camera-fullscreen-dialog .rz-dialog-content {
    padding: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
}

/* Hide dialog overlay for camera */
.camera-fullscreen-dialog + .rz-dialog-mask {
    background: transparent !important;
}

/* LOGIN PAGE DESKTOP FIXES - Override PWA rules */
@media (min-width: 769px) {
    /* Reset login layout positioning */
    .login-layout.rz-layout {
        position: static !important;
        height: 100vh !important;
        width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
        /* Preserve the inline background image */
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center !important;
    }
    
    .login-layout .rz-body {
        position: static !important;
        height: 100vh !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        overflow: auto !important;
    }
    
    .login-layout .rz-stack {
        max-width: 1440px !important;
        height: 100vh !important;
        margin: 0 auto !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Hide mobile header on desktop */
    .login-layout .mobile-login-header {
        display: none !important;
    }
    
    /* Show desktop welcome column */
    .login-layout .rz-col.rz-display-none.rz-display-sm-flex {
        display: flex !important;
    }
      .login-layout .rz-col[class*="SizeSM-6"]:first-of-type {
        /* Welcome column - narrower */
        flex: 0 0 40% !important;
        max-width: 40% !important;
    }
    
    .login-layout .rz-col[class*="SizeSM-6"]:last-of-type {
        /* Login form column - wider */
        flex: 0 0 60% !important;
        max-width: 60% !important;
    }
}

/* ========================================================================= */
/* MOBILE BROWSER ONLY FIX - WON'T AFFECT YOUR PWA APPS                     */
/* ========================================================================= */

/* This ONLY affects regular mobile browsers, NOT PWA apps */
@@media (max-width: 768px) and not all and (display-mode: standalone) {
    .rz-body,
    .rz-layout-content,
    main {
        /* Extra padding for mobile browser bottom bars */
        padding-bottom: 100px !important;
        min-height: calc(100vh - 100px) !important;
    }
    
    /* Exception for map pages if needed */
    .layout-map-page .rz-body,
    .layout-map-page .rz-layout-content,
    .layout-map-page main {
        padding-bottom: 0 !important;
    }
}
@@media (max-height: 600px) and (orientation: landscape) {
    .rz-sidebar {
        width: var(--rz-sidebar-width-sm) !important;
    }

    .rz-sidebar.rz-sidebar-expanded {
        width: var(--rz-sidebar-width-sm) !important;
    }
}

/* ========================================================================= */
/* PROMOTIONAL CALENDAR - MOBILE BUTTON TEXT HIDING                          */
/* Global styles needed because scoped CSS ::deep doesn't work reliably      */
/* ========================================================================= */
@@media (max-width: 768px) {
    /* Hide text on buttons with hide-text-mobile class */
    .hide-text-mobile .rz-button-text {
        display: none !important;
        width: 0 !important;
        overflow: hidden !important;
    }

    .hide-text-mobile .rz-button-box {
        gap: 0 !important;
    }

    .hide-text-mobile .rzi {
        margin: 0 !important;
    }

    /* View toggle selectbar - icon only on mobile */
    .view-toggle-selectbar .rz-button-text,
    .view-toggle-wrapper .rz-selectbar .rz-button-text {
        display: none !important;
        width: 0 !important;
        overflow: hidden !important;
    }

    .view-toggle-selectbar .rz-button-box,
    .view-toggle-wrapper .rz-selectbar .rz-button-box {
        gap: 0 !important;
    }

    .view-toggle-selectbar .rzi,
    .view-toggle-wrapper .rz-selectbar .rzi {
        margin: 0 !important;
        font-size: 20px !important;
    }

    .view-toggle-selectbar .rz-selectbar-item,
    .view-toggle-wrapper .rz-selectbar-item {
        padding: 8px 10px !important;
        min-width: 40px !important;
        height: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Fix Radzen numeric spinner button order on mobile */
    /* Radzen renders down before up in DOM, use flexbox order to fix */
    .rz-spinner-button-group {
        display: flex !important;
        flex-direction: column !important;
    }

    .rz-spinner-button-group .rz-numeric-up {
        order: 1 !important;
    }

    .rz-spinner-button-group .rz-numeric-down {
        order: 2 !important;
    }
}

/* ========================================================================= */
/* RADZEN GRID COLUMN HEADER WRAPPING                                        */
/* ========================================================================= */
/* Override Radzen's default nowrap behavior for column headers */

.rz-grid-table thead th .rz-column-title-content {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.3;
}

/* On Premise Dashboard specific - accounts grid */
.accounts-grid .rz-grid-table thead th .rz-column-title-content {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

/* ========================================================================= */
/* TALENT MODULE - HELP/INFO BUTTONS AND TOOLTIPS                            */
/* ========================================================================= */

.info-btn {
    padding: 0.25rem !important;
    min-width: unset !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    opacity: 0.6;
    transition: opacity 0.2s, background-color 0.2s;
}

.info-btn:hover {
    opacity: 1;
    background-color: var(--rz-primary-lighter) !important;
}

.info-btn .rz-button-icon {
    font-size: 16px !important;
}

.help-tooltip {
    font-size: 0.85rem;
    line-height: 1.5;
}

.help-tooltip strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--rz-primary);
}

.help-tooltip p {
    margin: 0 0 0.75rem;
    color: var(--rz-text-secondary-color);
}

.help-tooltip ul {
    margin: 0;
    padding-left: 1.25rem;
}

.help-tooltip li {
    margin-bottom: 0.35rem;
}

.help-tooltip li strong {
    display: inline;
    font-size: inherit;
    margin: 0;
    color: var(--rz-text-color);
}

/* Help Panel (click-to-toggle info box) */
.help-panel {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border: 1px solid #7dd3fc;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 0.5rem 1.5rem 1rem;
    animation: helpSlideDown 0.2s ease-out;
}

@keyframes helpSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.help-panel-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.help-panel-header strong {
    flex: 1;
    font-size: 1rem;
    color: #0369a1;
}

.help-panel-header .rz-icon {
    color: #0369a1;
    font-size: 20px;
}

.help-close-btn {
    padding: 0.2rem !important;
    min-width: unset !important;
}

.help-panel p {
    margin: 0 0 0.75rem;
    color: #0c4a6e;
    font-size: 0.9rem;
    line-height: 1.5;
}

.help-panel ul {
    margin: 0;
    padding-left: 1.25rem;
}

.help-panel li {
    margin-bottom: 0.5rem;
    color: #0c4a6e;
    font-size: 0.85rem;
    line-height: 1.4;
}

.help-panel li strong {
    color: #0369a1;
}

/* Mobile/PWA: Remove horizontal padding on talent pages */
@media (max-width: 768px) {
    .pipeline-page .rz-px-4,
    .pipeline-page .rz-pl-4,
    .jobs-page .rz-px-4,
    .jobs-page .rz-pl-4,
    .candidates-page .rz-px-4,
    .candidates-page .rz-pl-4,
    .candidate-profile .rz-px-4,
    .candidate-profile .rz-pl-4,
    .dashboard-page .rz-px-4,
    .dashboard-page .rz-pl-4,
    .analytics-page .rz-px-4,
    .analytics-page .rz-pl-4,
    .settings-page .rz-px-4,
    .settings-page .rz-pl-4,
    .bulk-import-page .rz-px-4,
    .bulk-import-page .rz-pl-4,
    .job-editor .rz-px-4,
    .job-editor .rz-pl-4,
    .talent-page .rz-px-4,
    .talent-page .rz-pl-4 {
        padding-left: 0 !important;
    }

    .pipeline-page .rz-px-4,
    .pipeline-page .rz-pr-4,
    .jobs-page .rz-px-4,
    .jobs-page .rz-pr-4,
    .candidates-page .rz-px-4,
    .candidates-page .rz-pr-4,
    .candidate-profile .rz-px-4,
    .candidate-profile .rz-pr-4,
    .dashboard-page .rz-px-4,
    .dashboard-page .rz-pr-4,
    .analytics-page .rz-px-4,
    .analytics-page .rz-pr-4,
    .settings-page .rz-px-4,
    .settings-page .rz-pr-4,
    .bulk-import-page .rz-px-4,
    .bulk-import-page .rz-pr-4,
    .job-editor .rz-px-4,
    .job-editor .rz-pr-4,
    .talent-page .rz-px-4,
    .talent-page .rz-pr-4 {
        padding-right: 0 !important;
    }
}