/* ========================================
   VERSION: 2024-10-26-15:00-MOBILE-READY
   Reset and Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
}

/* ========================================
   Header
   ======================================== */
#main-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #ab1c1d;
    color: white;
    padding: 10px 20px;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    gap: 20px;
}

.header-title-section {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.main-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 4px 0;
    letter-spacing: 0.5px;
    color: white;
}

.subtitle {
    font-size: 13px;
    font-weight: 400;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    max-width: 700px;
}

#main-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
}

.admin-button {
    background: white;
    border: 1px solid #999;
    color: #333;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-button:hover {
    background: #f5f5f5;
    border-color: #666;
}

/* Info Button (replaces admin button) */
.info-button {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.info-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.info-button svg {
    display: block;
}

/* Hidden Admin Trigger Circle */
.admin-trigger-circle {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(200, 200, 200, 0.03);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(200, 200, 200, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10; /* Above modal content */
}

/* Small grey dot in center for identification */
.admin-trigger-circle::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(120, 120, 120, 0.4);
    transition: all 0.3s ease;
    pointer-events: none; /* Let clicks pass through to parent */
}

.admin-trigger-circle:hover {
    background: rgba(200, 200, 200, 0.08);
    border-color: rgba(200, 200, 200, 0.1);
    box-shadow: 0 0 8px rgba(200, 200, 200, 0.1);
}

.admin-trigger-circle:hover::before {
    background: rgba(100, 100, 100, 0.6);
    width: 10px;
    height: 10px;
}

/* Inline Admin Trigger Circle (in About popup footer) */
.admin-trigger-circle-inline:hover {
    background: rgba(100, 100, 100, 0.6) !important;
    transform: scale(1.3);
}

/* Admin Dropdown */
.admin-dropdown-container {
    position: relative;
}

.admin-dropdown-btn {
    background: white;
    border: 1px solid #999;
    color: #333;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.admin-dropdown-btn:hover {
    background: #f5f5f5;
    border-color: #666;
}

.admin-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1100;
}

.admin-dropdown-container.active .admin-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item.logout {
    color: #d32f2f;
    font-weight: 500;
    border-radius: 0 0 8px 8px;
}

.dropdown-item.logout:hover {
    background: #ffebee;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 4px 0;
}

.admin-button.logged-in {
    background: #555;
    color: white;
    border-color: #555;
}

.admin-button.logged-in:hover {
    background: #444;
}

/* ========================================
   Admin Modal
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    animation: modalSlideIn 0.3s ease;
    position: relative; /* For absolute positioned children (admin trigger circle) */
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.close-modal {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background-color: white;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #999;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 36px;
}

.form-group select:hover {
    border-color: #bbb;
}

.form-group select:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #555;
    color: white;
}

.btn-primary:hover {
    background: #444;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* ========================================
   Map Container
   ======================================== */
#map {
    position: absolute;
    top: 0; /* Start from top on all screens, header sits on top */
    left: 0;
    width: 100%;
    height: 100%; /* Full height on all screens */
    z-index: 1;
}

/* ========================================
   Search Container
   ======================================== */
#search-container {
    position: absolute;
    top: 80px;
    right: 15px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-box {
    position: relative;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    overflow: visible;
    width: 40px;
    height: 40px;
}

.search-box:hover,
.search-box:focus-within {
    width: 280px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.search-icon {
    position: absolute;
    left: 10px;
    pointer-events: none;
    font-size: 16px;
    color: #666;
    z-index: 2;
}

#restaurant-search,
#address-search {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
    color: #333;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#restaurant-search::placeholder,
#address-search::placeholder {
    color: #999;
}

.search-box:hover #restaurant-search,
.search-box:focus-within #restaurant-search,
.search-box:hover #address-search,
.search-box:focus-within #address-search {
    opacity: 1;
}

/* Custom search suggestions (CSV only) */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 5px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
}

.suggestion-item {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #e8e8e8;
}

.suggestion-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin-bottom: 2px;
}

.suggestion-region {
    font-size: 12px;
    color: #666;
}

/* Google Places Autocomplete dropdown styling (for address search) */
.pac-container {
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-top: 5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    z-index: 10000 !important;
}

.pac-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.pac-item:hover {
    background-color: #e8e8e8;
}

.pac-item-query {
    color: #333;
    font-size: 14px;
}

/* ========================================
   Map Style Toggle Control
   ======================================== */
.map-style-control {
    position: absolute;
    top: 80px;
    left: 15px;
    z-index: 1000;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    overflow: hidden;
}

.style-btn {
    padding: 10px 16px;
    background: white;
    border: none;
    border-right: 1px solid #ddd;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.style-btn:last-child {
    border-right: none;
}

.style-btn:hover {
    background: #f5f5f5;
}

.style-btn.active {
    background: #555;
    color: white;
}

/* ========================================
   Google Maps Custom Controls
   ======================================== */
.reset-control {
    background: white;
    border: 2px solid #fff;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    margin: 10px;
    padding: 0;
    width: 40px;
    height: 40px;
    font-size: 18px;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.reset-control:hover {
    background: #f5f5f5;
    color: #333;
}

/* ========================================
   Detail Popup (Flyover - Vertical)
   ======================================== */
.detail-popup {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 20%;
    max-width: 380px;
    min-width: 300px;
    max-height: 90vh; /* 90% of viewport height (works in fullscreen and normal mode) */
    background: white;
    border-radius: 16px 0 0 0; /* Only top-left corner rounded */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1500;
    overflow: hidden; /* Keep hidden for border-radius clipping */
    transform: translateY(100%);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.detail-popup.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* Popup close button */
.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 24px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    flex-shrink: 0; /* Don't shrink when content scrolls */
}

.popup-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* Popup content */
.popup-content {
    padding: 24px;
    flex: 1; /* Take remaining space */
    overflow-y: auto !important; /* Show scrollbar when content overflows */
    overflow-x: hidden;
    display: block;
    box-sizing: border-box;
}

.popup-content h2 {
    font-size: 22px;
    color: #333;
    margin: 0 0 4px 0; /* Minimal spacing below title */
    padding-right: 40px; /* Space for close button */
}

/* Category and Rank */
.detail-category-rank {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px 0; /* Zero top margin for tight spacing with title */
    font-weight: 500;
}

/* Rating */
.detail-rating {
    margin: 0;
}

.rating-stars {
    color: #ffa500;
    font-size: 16px;
    margin-right: 8px;
}

.rating-text {
    color: #666;
    font-size: 14px;
}

/* Photo carousel section */
.popup-photo-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 16px; /* Add spacing after photo section */
}

.popup-photo-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Blurred background layer (Instagram/WhatsApp style) */
.popup-photo-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px) brightness(0.8);
    transform: scale(1.1); /* Slightly larger to hide blur edges */
    z-index: 1;
}

/* Main photo (fitted, not cropped) */
.popup-photo {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from 'cover' to 'contain' - this is the key! */
    z-index: 2;
}

/* Photo controls (arrows + counter) INSIDE image */
.photo-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    pointer-events: none; /* Allow clicks through to image */
    z-index: 10; /* Above both background (z-1) and main photo (z-2) */
}

.photo-counter {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    pointer-events: auto;
}

.photo-nav {
    background: transparent;
    color: white;
    border: none;
    width: 48px;
    height: 100%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    pointer-events: auto;
    outline: none; /* Remove focus outline */
}

.photo-nav:hover:not(:disabled) {
    transform: scale(1.2); /* Slight zoom effect instead of background */
}

.photo-nav:focus {
    outline: none; /* Remove focus outline when clicked */
}

.photo-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Popup details section */
.popup-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-info {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.detail-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px; /* Align with text baseline */
}

.detail-info strong {
    color: #333;
    margin-right: 4px;
}

.detail-info a {
    color: #555;
    text-decoration: underline;
}

.detail-info a:hover {
    color: #333;
}

.detail-description {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    line-height: 1.8;
}

.detail-video {
    margin-top: 4px;
}

.no-photos {
    color: #999;
    font-style: italic;
    font-size: 14px;
    text-align: center;
}

/* Photo Loader */
.photo-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b6b;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile responsiveness for popup */
@media (max-width: 768px) {
    .detail-popup {
        width: 100%;
        right: 0;
        left: 0;
        max-width: none;
        bottom: 0;
        max-height: 90vh;
        border-radius: 16px 16px 0 0; /* Rounded top corners on mobile */
        padding-bottom: env(safe-area-inset-bottom); /* iPhone notch support */
    }

    .popup-content {
        padding: 20px 16px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom)); /* Extra padding for iPhone home indicator */
    }

    .popup-content h2 {
        font-size: 20px;
    }

    .photo-nav {
        width: 44px; /* Larger touch targets for mobile */
        height: 100%;
        font-size: 20px;
    }

    .detail-icon {
        width: 18px;
        height: 18px;
    }

    .popup-close {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    #main-header {
        padding: 8px 15px;
    }

    .header-logo {
        height: 32px;
    }

    .main-title {
        font-size: 18px;
    }

    .subtitle {
        font-size: 11px;
        max-width: none;
    }

    #main-header h1 {
        font-size: 18px;
    }

    .admin-button {
        padding: 6px 14px;
        font-size: 13px;
    }

    .search-box {
        width: 40px;
    }

    .search-box:hover,
    .search-box:focus-within {
        width: calc(100vw - 70px);
        max-width: 280px;
    }

    .style-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .modal-content {
        width: 95%;
    }

    .detail-drawer {
        max-height: 70vh;
    }

    .drawer-content h2 {
        font-size: 20px;
    }

    .detail-photo {
        width: 250px;
        height: 170px;
    }
}

/* Small to medium screens - move controls WAY lower to avoid header overlap */
@media (max-width: 770px) {
    .map-style-control {
        top: 100px; /* WAY below header - big clearance */
        left: 10px;
    }

    #search-container {
        top: 100px; /* Align with map style control */
    }
}

@media (max-width: 480px) {
    #main-header {
        padding: 6px 15px;
    }

    .header-logo {
        height: 28px;
    }

    .main-title {
        font-size: 16px;
    }

    .subtitle {
        font-size: 10px;
    }

    #main-header h1 {
        font-size: 16px;
    }

    .admin-button {
        padding: 5px 10px;
        font-size: 12px;
    }

    #search-container {
        top: 80px; /* WAY below smaller header - big clearance */
    }

    .search-box:hover,
    .search-box:focus-within {
        width: calc(100vw - 60px);
    }

    .map-style-control {
        flex-direction: column;
        top: 80px; /* WAY below smaller header - big clearance */
    }

    .style-btn {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .style-btn:last-child {
        border-bottom: none;
    }

    .detail-photo {
        width: 200px;
        height: 140px;
    }
}

/* ========================================
   Loading Indicator
   ======================================== */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
}

/* ========================================
   Accessibility Improvements
   ======================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Focus styles for keyboard navigation */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #555;
    outline-offset: 2px;
}

/* ========================================
   Custom Alert System
   ======================================== */
.custom-alert {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-150%);
    min-width: 300px;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.custom-alert.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.custom-alert-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.custom-alert-success .custom-alert-icon {
    background: #4caf50;
    color: white;
}

.custom-alert-error .custom-alert-icon {
    background: #f44336;
    color: white;
}

.custom-alert-warning .custom-alert-icon {
    background: #ff9800;
    color: white;
}

.custom-alert-info .custom-alert-icon {
    background: #2196f3;
    color: white;
}

.custom-alert-message {
    flex: 1;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    white-space: pre-line;
}

.custom-alert-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.custom-alert-close:hover {
    color: #333;
}

@media (max-width: 768px) {
    .custom-alert {
        min-width: 280px;
        max-width: calc(100vw - 40px);
        top: 70px;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    #search-container,
    .map-style-control,
    .detail-drawer,
    #main-header .admin-button,
    .custom-alert {
        display: none;
    }
}

/* ===== Embedded Mode Styling ===== */
.embedded-mode {
    display: none !important; /* hides header entirely, no space left */
}

/* Hide title/subtitle when embedded */
.embedded-mode .header-title-section {
    display: none !important;
}

/* Keep Admin button visible */
.embedded-mode .admin-button {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #c62828 !important; /* match your current red */
    color: #fff !important;
    opacity: 0.9;
    border: none;
    z-index: 999;
}
