/* ==========================================================
   _variables.css — Design Tokens: Tropical Daytime
   Single source of truth for all CSS custom properties.
   Palette: Ocean teal, warm sand, sunset orange, coral, palm green
   ========================================================== */

:root {
    /* ---- OCEAN (Primary) ---- */
    --color-ocean-50:  #eefbfb;
    --color-ocean-100: #d4f5f5;
    --color-ocean-200: #a3e8ea;
    --color-ocean-300: #5fd4d8;
    --color-ocean-400: #22b8bf;
    --color-ocean-500: #0e9ca3;
    --color-ocean-600: #0a7f86;
    --color-ocean-700: #0d656c;
    --color-ocean-800: #105258;
    --color-ocean-900: #0c3d42;

    /* ---- SAND (Backgrounds) ---- */
    --color-sand-50:  #fffcf7;
    --color-sand-100: #fef7ec;
    --color-sand-200: #fcecd0;
    --color-sand-300: #f8d9a5;

    /* ---- SUNSET (Accent / CTA) ---- */
    --color-sunset-300: #fdba74;
    --color-sunset-400: #fb923c;
    --color-sunset-500: #f97316;
    --color-sunset-600: #ea580c;

    /* ---- CORAL (Danger / Hearts) ---- */
    --color-coral-400: #f77171;
    --color-coral-500: #ef4444;
    --color-coral-600: #dc2626;

    /* ---- PALM GREEN (Success / Positive) ---- */
    --color-palm-400: #4ade80;
    --color-palm-500: #22c55e;
    --color-palm-600: #16a34a;
    --color-palm-700: #15803d;

    /* ---- SEMANTIC MAPPINGS ---- */
    /* Primary: Ocean teal for interactive elements, links, buttons */
    --color-primary: var(--color-ocean-500);
    --color-primary-hover: var(--color-ocean-600);
    --color-primary-dark: var(--color-ocean-700);
    --color-primary-darker: var(--color-ocean-800);
    --color-primary-light: var(--color-ocean-50);
    --color-primary-light-hover: var(--color-ocean-100);
    --color-primary-muted: var(--color-ocean-300);

    /* Secondary: Palm green for success states */
    --color-secondary: var(--color-palm-500);
    --color-secondary-light: var(--color-palm-400);
    --color-secondary-hover: var(--color-palm-600);
    --color-secondary-dark: var(--color-palm-700);

    /* Accent: Sunset orange for CTAs, highlights */
    --color-accent: var(--color-sunset-400);
    --color-accent-light: var(--color-sunset-300);
    --color-accent-hover: var(--color-sunset-500);
    --color-accent-dark: var(--color-sunset-600);

    /* Success / Error / Warning */
    --color-success: var(--color-secondary);
    --color-success-dark: var(--color-secondary-hover);
    --color-error: var(--color-coral-500);
    --color-error-dark: var(--color-coral-600);
    --color-error-light: rgba(239, 68, 68, 0.1);
    --color-error-light-hover: rgba(239, 68, 68, 0.2);
    --color-error-bg: #fef2f2;
    --color-error-bg-hover: #fee2e2;
    --color-warning: #f59e0b;
    --color-warning-dark: #d97706;

    /* Guide link colors */
    --color-guide-link: var(--color-ocean-600);
    --color-guide-link-hover: var(--color-ocean-700);

    /* ---- BACKGROUNDS ---- */
    /* Light-first: sand/warm tones as default */
    --color-bg-primary: var(--color-sand-50);
    --color-bg-secondary: var(--color-sand-100);
    --color-bg-tertiary: var(--color-sand-200);
    --color-bg-card-dark: var(--color-ocean-900);

    /* Light mode surface hierarchy */
    --color-bg-light-primary: #ffffff;
    --color-bg-light-secondary: #f9fafb;
    --color-bg-light-tertiary: #f3f4f6;

    /* ---- TEXT ---- */
    /* Dark text on light backgrounds (default) */
    --color-text-primary: #1c1917;
    --color-text-secondary: #57534e;
    --color-text-muted: #78716c;
    --color-text-dark: #374151;
    --color-text-darker: #111827;
    --color-text-on-light: #1f2937;
    --color-text-secondary-light: #4b5563;
    --color-text-muted-light: #6b7280;

    /* ---- GRAY SCALE (warm stone) ---- */
    --color-gray-50:  #fafaf9;
    --color-gray-100: #f5f5f4;
    --color-gray-200: #e7e5e4;
    --color-gray-300: #d6d3d1;
    --color-gray-400: #a8a29e;
    --color-gray-500: #78716c;
    --color-gray-600: #57534e;
    --color-gray-700: #44403c;
    --color-gray-800: #292524;
    --color-gray-900: #1c1917;
    --color-white: #ffffff;

    /* ---- SURFACES & BORDERS ---- */
    --color-surface: #ffffff;
    --color-surface-hover: #f5f5f4;
    --color-surface-muted: #fafaf9;
    --color-overlay: rgba(0, 0, 0, 0.5);
    --color-overlay-dark: rgba(0, 0, 0, 0.85);
    --color-border: var(--color-gray-200);
    --color-border-light: var(--color-gray-100);
    --color-border-solid: #e7e5e4;
    --color-border-solid-light: #f5f5f4;
    --color-card-bg: #ffffff;

    /* ---- FOCUS ---- */
    --color-focus-ring: rgba(14, 156, 163, 0.5);
    --color-focus-ring-light: rgba(14, 156, 163, 0.3);
    --color-focus-ring-lighter: rgba(14, 156, 163, 0.2);
    --color-focus-ring-faint: rgba(14, 156, 163, 0.1);

    /* ---- SCORE BADGES ---- */
    --score-exceptional-bg: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    --score-excellent-bg: linear-gradient(135deg, #0a7f86 0%, #0e9ca3 100%);
    --score-good-bg: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    --score-average-bg: var(--color-gray-400);

    /* ---- SHADOWS (light-context: softer than dark theme) ---- */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
    --shadow-popup: 0 10px 25px -5px rgba(0, 0, 0, 0.12);
    --shadow-dropdown: 0 10px 25px -5px rgba(0, 0, 0, 0.08);

    /* ---- Z-INDEX STACK ---- */
    --z-sticky: 30;
    --z-nav: 40;
    --z-drawer: 50;
    --z-drawer-content: 51;
    --z-modal: 60;
    --z-lightbox: 65;
    --z-lightbox-controls: 66;
    --z-chat: 70;
    --z-toast: 100;
    --z-skip-link: 9999;

    --color-slate-700: #334155;
    --color-slate-50: #f8fafc;
}

body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
}
/* ==========================================================
   _base.css — Typography, surface utilities, animations
   Used by: all pages (global styles)
   Dependencies: _variables.css
   ========================================================== */

/* ========================================
   TYPOGRAPHY - SERIF DISPLAY
   ======================================== */

.font-uncharted {
    font-family: 'DM Serif Display', 'Playfair Display', Georgia, serif;
    font-style: italic;
}

/* ========================================
   SCROLLBAR HIDING FOR CAROUSELS
   ======================================== */

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* ========================================
   SUN ICON ROTATION ANIMATION
   ======================================== */

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hover-spin:hover {
    animation: spin-slow 2s linear infinite;
}

.hover-spin {
    transition: transform 0.3s ease;
}

/* ========================================
   SURFACE UTILITIES (replaces glassmorphism)
   ======================================== */

/* Elevated surface — white card with subtle shadow */
.surface-elevated {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    border-radius: 0.75rem;
}

/* Muted surface — subtle background */
.surface-muted {
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border-light);
    border-radius: 0.75rem;
}

/* ==========================================================
   _loading.css — Toast notifications, skeleton loaders, HTMX states
   Used by: all pages (global loading states)
   Dependencies: _variables.css
   ========================================================== */

/* ========================================
   GLOBAL MOBILE OVERFLOW PROTECTION
   ======================================== */

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Ensure images and media don't overflow */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

/* Text overflow handling */
h1, h2, h3, h4, h5, h6, p, span, a, li {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */

.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    font-size: 0.875rem;
    font-weight: 500;
    pointer-events: auto;
    animation: toast-in 0.3s ease-out;
    max-width: 350px;
}

.toast.toast-success {
    background: linear-gradient(135deg, var(--color-success) 0%, var(--color-success-dark) 100%);
    color: white;
}

.toast.toast-error {
    background: linear-gradient(135deg, var(--color-error) 0%, var(--color-error-dark) 100%);
    color: white;
}

.toast.toast-info {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: white;
}

.toast.toast-warning {
    background: linear-gradient(135deg, var(--color-warning) 0%, var(--color-warning-dark) 100%);
    color: white;
}

.toast-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

.toast-message {
    flex: 1;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.5rem;
    transition: opacity 0.15s ease;
}

.toast-close:hover {
    opacity: 1;
}

.toast.show {
    animation: toast-in 0.3s ease-out forwards;
}

.toast.removing {
    animation: toast-out 0.3s ease-in forwards;
}

@keyframes toast-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ========================================
   LOADING STATES
   ======================================== */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 16/9;
}

.skeleton-title {
    height: 1.5rem;
    width: 70%;
    margin-bottom: 0.75rem;
}

.skeleton-text {
    height: 1rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.skeleton-card {
    background: var(--color-surface);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Skeleton variants */
.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-badge {
    height: 1.5rem;
    width: 80px;
    border-radius: 9999px;
}

.skeleton-button {
    height: 2.5rem;
    width: 120px;
    border-radius: 0.5rem;
}

/* Review card skeleton */
.skeleton-review {
    background: var(--color-surface);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--color-gray-200);
}

.skeleton-review .skeleton-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Drawer skeleton */
.skeleton-drawer .skeleton-hero {
    height: 200px;
    border-radius: 0;
}

.skeleton-drawer .skeleton-content {
    padding: 1.5rem;
}

/* Pulse animation alternative */
.skeleton-pulse {
    animation: pulse-opacity 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-opacity {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.loading-spinner-lg {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* HTMX loading states */
.htmx-request {
    position: relative;
    pointer-events: none;
}

.htmx-request::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-flex;
}

/* Button loading state - use higher specificity to override text colors */
button.btn-loading,
a.btn-loading,
[type="button"].btn-loading,
[type="submit"].btn-loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

/* ==========================================================
   _cards.css — Tropical Daytime surface components, beach cards, score badges, prose
   Used by: beach-card.php, quick-facts.php, sidebar.php, info-bar.php
   Dependencies: _variables.css
   ========================================================== */

.btn-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid white;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

/* ========================================
   EXTENDED CONTENT PROSE STYLING
   ======================================== */

.prose-brand p {
    color: var(--color-gray-700);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.prose-brand p:last-child {
    margin-bottom: 0;
}

.prose-brand strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

.prose-brand ul,
.prose-brand ol {
    color: var(--color-gray-600);
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.prose-brand li {
    margin-bottom: 0.5rem;
}

.prose-brand h3 {
    color: var(--color-text-primary);
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose-brand h3:first-child {
    margin-top: 0;
}

.prose-brand a {
    color: var(--color-guide-link);
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.prose-brand a:hover {
    opacity: 0.8;
}

/* ========================================
   REUSABLE COMPONENT CLASSES
   ======================================== */

/* Glass card — light surface container used across beach detail, sidebar, quick facts */
.card-glass {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    border-radius: 0.75rem;
    padding: 0.75rem;
    display: flex;
    gap: 0.75rem;
}

.card-glass--interactive {
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.card-glass--interactive:hover {
    border-color: var(--color-primary);
}

/* Glass button — solid light action button */
.btn-glass {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--color-bg-light-secondary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.btn-glass:hover {
    background: var(--color-bg-light-tertiary);
}

/* Primary CTA button — yellow accent */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-accent);
    color: var(--color-gray-900);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.15s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
}

/* Text shadow for hero overlays on images */
.text-shadow-hero {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* ========================================
   BEACH CARDS - SIMPLIFIED
   ======================================== */

.beach-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.beach-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

.beach-card:focus-within,
.beach-card:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.beach-card:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}


/* Card action buttons - mobile optimization */
@media (max-width: 480px) {
    .beach-card .card-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .beach-card .card-actions > * {
        width: 100%;
        justify-content: center;
        min-height: 44px; /* Touch target minimum */
    }

    /* Stack secondary actions in a row */
    .beach-card .card-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* Ensure minimum touch target size on all buttons */
@media (max-width: 768px) {
    button,
    a.inline-flex,
    [role="button"] {
        min-height: 44px;
        min-width: 44px;
    }

    /* Exception for inline text links */
    a:not(.inline-flex):not([role="button"]) {
        min-height: auto;
        min-width: auto;
    }

    /* Tag buttons can be smaller but need adequate padding */
    .tag-btn,
    .mobile-tag-btn {
        min-height: 36px;
        padding: 0.5rem 0.875rem;
    }
}

/* ========================================
   SCORE BADGES (Nomads-style)
   ======================================== */

/* Score badge on beach cards - positioned bottom-right of image */
.beach-card .score-badge {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    min-width: 52px;
}

/* Generic score badge (for use outside cards) */
.score-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    min-width: 52px;
}

.score-badge .score-value {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    color: inherit;
}

.score-badge .score-label {
    font-size: 0.5625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.9;
    margin-top: 2px;
    white-space: nowrap;
    color: inherit;
}

.score-exceptional {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    color: white;
}

.score-excellent {
    background: linear-gradient(135deg, #0a7f86 0%, #0e9ca3 100%);
    color: white;
}

.score-good {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    color: white;
}

.score-average {
    background: var(--color-gray-100);
    color: var(--color-gray-500);
    border: 1px solid var(--color-gray-200);
}

/* ========================================
   BEACH BADGES (Auto-generated labels)
   ======================================== */

.beach-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.beach-badge-gold {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.beach-badge-purple {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #7c3aed;
}

.beach-badge-blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: var(--color-primary-dark);
}

.beach-badge-cyan {
    background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%);
    color: #0e7490;
}

.beach-badge-green {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #047857;
}

.beach-badge-pink {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #be185d;
}

/* ========================================
   EMOJI TAG CHIPS
   ======================================== */

.tag-chip-emoji {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    background: var(--color-ocean-50, #eefbfb);
    color: var(--color-primary);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.tag-chip-emoji .emoji {
    font-size: 0.875rem;
}

.tag-chip-emoji:hover {
    background: var(--color-primary);
    color: white;
}
/* ==========================================================
   _filters.css — Filter chips, condition meters, view toggles, theme toggle
   Used by: filters.php, index.php
   Dependencies: _variables.css
   ========================================================== */

/* ========================================
   FILTER CHIP BUTTONS (Nomads-style)
   ======================================== */

.filter-chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-chip-btn:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
    transform: translateY(-1px);
}

.filter-chip-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.filter-chip-btn .emoji {
    font-size: 1rem;
}

/* Quick filter presets */
.quick-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--color-card-bg);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.quick-filter-btn:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.quick-filter-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* ========================================
   VIEW MODE TOGGLE (Grid/List/Map)
   ======================================== */

.view-mode-toggle {
    display: flex;
    background: var(--color-bg-tertiary);
    border-radius: 0.75rem;
    padding: 0.25rem;
    gap: 0.125rem;
}

.view-mode-toggle button {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-mode-toggle button:hover {
    color: var(--color-text-primary);
}

.view-mode-toggle button.active {
    background: var(--color-surface);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   CONDITIONS METER (Visual indicators)
   ======================================== */

.conditions-widget {
    background: var(--color-bg-tertiary);
    border-radius: 0.75rem;
    padding: 1rem;
}

.condition-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.condition-row:not(:last-child) {
    border-bottom: 1px solid var(--color-border-light);
}

.condition-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.condition-label .emoji {
    font-size: 1rem;
}

.condition-meter {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.meter-track {
    flex: 1;
    height: 8px;
    background: var(--color-border);
    border-radius: 4px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Surf meter colors */
.meter-fill.surf-calm { background: var(--color-success); width: 20%; }
.meter-fill.surf-small { background: var(--color-primary); width: 40%; }
.meter-fill.surf-medium { background: var(--color-warning); width: 70%; }
.meter-fill.surf-large { background: var(--color-error); width: 100%; }

/* Sargassum meter colors */
.meter-fill.sargassum-none { background: var(--color-success); width: 5%; }
.meter-fill.sargassum-light { background: #84cc16; width: 33%; }
.meter-fill.sargassum-moderate { background: var(--color-warning); width: 66%; }
.meter-fill.sargassum-heavy { background: var(--color-error); width: 100%; }

/* Wind meter colors */
.meter-fill.wind-calm { background: var(--color-success); width: 20%; }
.meter-fill.wind-light { background: var(--color-primary); width: 40%; }
.meter-fill.wind-moderate { background: var(--color-warning); width: 70%; }
.meter-fill.wind-strong { background: var(--color-error); width: 100%; }

.meter-value {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-primary);
    min-width: 60px;
    text-align: right;
}

/* ========================================
   THEME TOGGLE BUTTON
   ======================================== */

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
}

.theme-toggle .icon-sun {
    display: block;
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

/* ========================================
   FILTER CHIPS
   ======================================== */

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.filter-chip:hover {
    background: var(--color-primary-light-hover);
}

.filter-chip .remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(29, 78, 216, 0.1);
    color: var(--color-primary-dark);
    font-size: 0.75rem;
    transition: background 0.15s ease;
    /* Touch target: actual clickable area is 44px via padding/margin */
    position: relative;
}
/* Expand touch target to 44px without changing visual size */
.filter-chip .remove-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.filter-chip .remove-btn:hover {
    background: rgba(29, 78, 216, 0.2);
}

.filter-chip .remove-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.filter-chip.clear-all {
    background: var(--color-error-bg);
    color: var(--color-error-dark);
    cursor: pointer;
    border: none;
}

.filter-chip.clear-all:hover {
    background: var(--color-error-bg-hover);
}

/* ========================================
   FILTERS - MOBILE RESPONSIVE
   ======================================== */

.filters-container {
    position: relative;
}

/* Mobile filter layout */
@media (max-width: 640px) {
    .filter-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .filter-row > * {
        width: 100%;
        min-width: 0;
        flex-basis: 100%;
    }

    .tag-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .tag-btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Tag button styles */
.tag-btn {
    transition: all 0.15s ease;
    border: 2px solid transparent;
}

.tag-btn:focus {
    outline: none;
    border-color: var(--color-primary);
}
/* ==========================================================
   _map.css — MapLibre container, markers, popups, legend, clustering
   Used by: beach/sidebar.php (map section), index.php (homepage map)
   Dependencies: _variables.css
   ========================================================== */

/* Tag button active state - handled by Tailwind classes (bg-brand-yellow text-brand-darker) */

/* ========================================
   MAP CONTAINER & CONTROLS
   ======================================== */

#map-container {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 0.75rem;
    overflow: hidden;
}

@media (min-width: 768px) {
    #map-container {
        height: 600px;
    }
}

/* Map loading overlay */
.map-loading {
    position: absolute;
    inset: 0;
    background: var(--color-gray-100);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 10;
}

/* Map legend */
.map-legend {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--color-surface);
    border-radius: 0.5rem;
    padding: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 0.75rem;
    z-index: 10;
}

.legend-title {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--color-gray-700);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.75rem;
    color: var(--color-gray-600);
}

.legend-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.legend-icon.user-icon {
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.legend-count {
    background: var(--color-primary-hover);
    color: white;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
}

/* Map markers */
.beach-marker {
    width: 36px;
    height: 36px;
    background-color: var(--color-primary-hover);
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.beach-marker:hover {
    transform: scale(1.15);
}

.beach-marker.selected {
    background-color: var(--color-error-dark);
    transform: scale(1.2);
}

.beach-marker.clustered {
    background-color: #7c3aed;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.user-marker {
    width: 20px;
    height: 20px;
    background-color: var(--color-primary);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
    animation: marker-pulse 2s infinite;
}

@keyframes marker-pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.1);
    }
}

.user-marker-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Map popups */
.beach-popup-container .maplibregl-popup-content {
    padding: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.beach-popup {
    padding: 1rem;
    min-width: 220px;
}

.popup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.popup-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text-darker);
    line-height: 1.3;
}

.popup-rating {
    font-size: 0.875rem;
    color: var(--color-gray-500);
    white-space: nowrap;
}

.popup-municipality {
    font-size: 0.875rem;
    color: var(--color-gray-500);
    margin-bottom: 0.5rem;
}

.popup-distance {
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.popup-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.popup-tag {
    display: inline-block;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    font-size: 0.625rem;
    font-weight: 500;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
}

.popup-actions {
    display: flex;
    gap: 0.5rem;
}

.popup-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.375rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
}

.popup-btn-primary {
    background: var(--color-primary-hover);
    color: white;
}

.popup-btn-primary:hover {
    background: var(--color-primary-dark);
}

.popup-btn-secondary {
    background: var(--color-gray-100);
    color: var(--color-gray-700);
}

.popup-btn-secondary:hover {
    background: var(--color-gray-200);
}

/* Popup button focus states */
.popup-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.popup-btn-primary:focus-visible {
    outline-color: var(--color-primary-dark);
}

.popup-btn-secondary:focus-visible {
    outline-color: var(--color-primary);
}

/* MapLibre attribution control - fix contrast issue */
.maplibregl-ctrl-attrib-inner {
    color: rgba(0, 0, 0, 0.75) !important;
}

[data-theme="dark"] .maplibregl-ctrl-attrib-inner {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Mobile map controls */
@media (max-width: 640px) {
    #map-container {
        height: 400px;
        border-radius: 0;
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
    }

    .map-legend {
        top: auto;
        bottom: 0.75rem;
        left: 0.75rem;
        padding: 0.5rem;
    }
}
/* ==========================================================
   _drawers.css — Modal overlays, slide-up drawers, filter drawer
   Used by: filters.php, beach-card.php (drawer interactions)
   Dependencies: _variables.css
   ========================================================== */

/* ========================================
   DRAWER / MODAL
   ======================================== */

.drawer-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--color-overlay);
    z-index: var(--z-drawer);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.drawer-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-surface);
    border-radius: 1.5rem 1.5rem 0 0;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.2s ease;
    z-index: var(--z-drawer-content);
    will-change: transform;
    contain: layout style paint;
}

.drawer-overlay.open .drawer-content {
    transform: translateY(0);
}

/* Drawer handle for mobile */
.drawer-handle {
    width: 40px;
    height: 4px;
    background: var(--color-gray-300);
    border-radius: 2px;
    margin: 0.75rem auto;
}

@media (min-width: 768px) {
    .drawer-content {
        left: 50%;
        right: auto;
        bottom: auto;
        top: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        border-radius: 1rem;
        max-width: 600px;
        width: 90%;
        max-height: 85vh;
    }

    .drawer-overlay.open .drawer-content {
        transform: translate(-50%, -50%) scale(1);
    }

    .drawer-handle {
        display: none;
    }
}

/* Drawer loading state */
.drawer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    gap: 1rem;
}

/* ========================================
   FILTER DRAWER (MOBILE)
   ======================================== */

.filter-drawer-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--color-overlay);
    z-index: var(--z-drawer);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.filter-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.filter-drawer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-surface);
    border-radius: 1.5rem 1.5rem 0 0;
    max-height: 85vh;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: var(--z-drawer-content);
    display: flex;
    flex-direction: column;
}

.filter-drawer-overlay.open .filter-drawer {
    transform: translateY(0);
}

.filter-drawer-handle {
    width: 40px;
    height: 4px;
    background-color: var(--color-gray-300);
    border-radius: 2px;
    margin: 0.75rem auto 0;
}

/* ==========================================================
   _modals.css — Share modal, lightbox gallery, image viewer
   Used by: footer.php (share modal), beach/photos.php (lightbox)
   Dependencies: _variables.css
   ========================================================== */

/* ========================================
   SHARE MODAL
   ======================================== */

.share-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-overlay);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.share-modal.open {
    opacity: 1;
    visibility: visible;
}

.share-modal-content {
    background-color: var(--color-surface);
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.share-modal.open .share-modal-content {
    transform: scale(1);
}

/* ========================================
   GALLERY
   ======================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.gallery-grid img:hover {
    transform: scale(1.03);
    opacity: 0.9;
}

/* ========================================
   LIGHTBOX
   ======================================== */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--color-overlay-dark);
    z-index: var(--z-lightbox);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-counter {
    margin-top: 1rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
    z-index: var(--z-lightbox-controls);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: var(--z-lightbox-controls);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-close:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

@media (max-width: 640px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }
}

/* ========================================
   WELCOME POPUP (Registration CTA)
   ======================================== */

.welcome-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.welcome-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.welcome-popup {
    max-width: 24rem;
    width: 100%;
    background: var(--color-surface);
    border-radius: 1.25rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease;
}

.welcome-popup-overlay.active .welcome-popup {
    transform: scale(1) translateY(0);
}

.welcome-popup-hero {
    position: relative;
    height: 140px;
    overflow: hidden;
}

.welcome-popup-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-popup-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.8) 70%,
        rgba(255, 255, 255, 1) 100%);
}

.welcome-popup-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    z-index: 10;
}

.welcome-popup-close:hover {
    background: rgba(0, 0, 0, 0.5);
    color: white;
}

.welcome-popup-body {
    padding: 1.5rem;
    padding-top: 0.75rem;
}

.welcome-popup-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.welcome-popup-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.25rem;
}

.welcome-popup-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.welcome-popup-benefits li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.welcome-popup-benefits li svg,
.welcome-popup-benefits li i {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.welcome-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.welcome-popup-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    color: #1f2937;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
}

.welcome-popup-btn-google:hover {
    background: #f3f4f6;
}

.welcome-popup-btn-google:active {
    transform: scale(0.98);
}

.welcome-popup-btn-google svg {
    width: 1.25rem;
    height: 1.25rem;
}

.welcome-popup-btn-email {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-accent);
    color: var(--color-gray-900);
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
}

.welcome-popup-btn-email:hover {
    background: #fde047;
}

.welcome-popup-btn-email:active {
    transform: scale(0.98);
}

.welcome-popup-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.welcome-popup-divider::before,
.welcome-popup-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.welcome-popup-btn-dismiss {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.welcome-popup-btn-dismiss:hover {
    color: var(--color-text-secondary);
}

.welcome-popup-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.welcome-popup-trust svg,
.welcome-popup-trust i {
    width: 0.875rem;
    height: 0.875rem;
}

/* Hide hero image on mobile for cleaner look */
@media (max-width: 480px) {
    .welcome-popup-hero {
        height: 100px;
    }
}

/* ==========================================================
   _layout.css — Hero section, search autocomplete, empty states
   Used by: index.php (hero), collection pages, error pages
   Dependencies: _variables.css
   ========================================================== */

/* ========================================
   HERO SECTION
   ======================================== */



/* Ocean teal gradient for collection/dark hero pages */
.hero-gradient-dark {
    background: linear-gradient(135deg, var(--color-ocean-800) 0%, var(--color-ocean-900) 100%);
}

/* Green gradient for guide pages */
.hero-gradient-guide {
    background: linear-gradient(135deg, var(--color-palm-600) 0%, var(--color-palm-700) 100%);
}


.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-surface);
    color: var(--color-primary-hover);
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1.125rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Hero Search Form */
.hero-search-form {
    position: relative;
}

.hero-search-form input::placeholder {
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .hero-search-form input::placeholder {
        font-size: 1rem;
    }
}

/* Search Autocomplete Dropdown */
#search-autocomplete {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    z-index: 50;
}

#search-autocomplete a {
    text-decoration: none;
}

/* Hero Category Cards */
.hero-category-card {
    min-height: 100px;
}

.hero-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hero-category-card:active {
    transform: translateY(0);
}

/* Ensure smooth animations */
.hero-category-card * {
    transition: transform 0.2s ease, color 0.2s ease;
}

/* ========================================
   EMPTY STATES
   ======================================== */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--color-gray-50);
    border-radius: 1rem;
    border: 2px dashed var(--color-gray-200);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-gray-700);
    margin-bottom: 0.5rem;
}

.empty-state-message {
    color: var(--color-gray-500);
    margin-bottom: 1rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-context {
    color: var(--color-gray-500);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.empty-state-suggestions {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-suggestions li {
    padding: 0.375rem 0;
    font-size: 0.875rem;
    color: var(--color-gray-500);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.empty-state-suggestions li::before {
    content: '•';
    color: var(--color-gray-400);
}

.empty-state-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary-hover);
    color: white;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.empty-state-action:hover {
    background: var(--color-primary-dark);
}

.empty-state-action:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ==========================================================
   _guides.css — Guide page layout, table of contents, related guides
   Used by: public/guides/*.php
   Dependencies: _variables.css
   ========================================================== */

/* ========================================
   GUIDE PAGES - LAYOUT & COMPONENTS
   ======================================== */

/* ==========================================
   GUIDE PAGE COLOR SYSTEM
   Homepage-aligned palette + Tailwind neutrals
   ==========================================

   ALLOWED COLORS:
   - Body text: Tailwind text-gray-900, text-gray-800 (neutrals)
   - Links: var(--color-guide-link) with underline, hover to var(--color-guide-link-hover)
   - Date ranges: Tailwind text-amber-700 (neutral amber)
   - Card backgrounds: Tailwind bg-slate-50 (neutral slate)
   - Decorative borders: Tailwind border-yellow-400 (homepage accent)

   ❌ NEVER USE:
   - --color-secondary (#10b981 green)
   - bg-blue-*, bg-green-*, text-blue-*, text-green-* (any blue/green utilities)
   - Yellow text on light backgrounds (fails WCAG contrast)
   ========================================== */

/* Guide Layout - Wider Content Area (fixes ~40% width issue) */
.guide-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1400px;  /* Wider than default container */
    margin: 0 auto;
    padding: 3rem 1rem;
}

@media (min-width: 1024px) {
    .guide-layout {
        grid-template-columns: 280px 1fr;  /* Fixed sidebar, fluid content */
        gap: 3rem;
        padding: 3rem 2rem;
    }
}

@media (min-width: 1280px) {
    .guide-layout {
        grid-template-columns: 320px 1fr;
        gap: 4rem;
        padding: 3rem 3rem;
    }
}

.guide-article {
    min-width: 0;  /* Prevent grid blowout */
}

.guide-sidebar {
    min-width: 0;
    /* No position/height here — let the grid item stretch to full row height
       so the sticky inner element (.guide-toc) has room to scroll */
}

@media (max-width: 1023px) {
    .guide-sidebar {
        order: 2;
        position: static;
    }
    .guide-article {
        order: 1;
    }
}

/* Table of Contents - sticky on the inner element so the grid item can stretch full height */
.guide-toc {
    position: sticky;
    top: 76px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
}

.guide-toc::-webkit-scrollbar {
    width: 6px;
}

.guide-toc::-webkit-scrollbar-track {
    background: var(--color-gray-100);
    border-radius: 3px;
}

.guide-toc::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: 3px;
}

.guide-toc::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-400);
}

.guide-toc-link {
    display: block;
    color: var(--color-guide-link);
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-underline-offset: 2px;
    font-size: 0.875rem;
    padding: 0.375rem 0;
    transition: color 0.2s ease;
}

.guide-toc-link:hover {
    color: var(--color-guide-link-hover);
}

/* Mobile: Horizontal scroll TOC */
@media (max-width: 1023px) {
    .guide-toc {
        position: static;
        overflow-x: auto;
        overflow-y: visible;
        max-height: none;
        padding: 1rem;
    }

    .guide-toc nav {
        display: flex;
        gap: 1rem;
        flex-wrap: nowrap;
    }

    .guide-toc-link {
        white-space: nowrap;
    }
}

/* Checklist Items (fixes invisible text on Packing List) */
.checklist-item {
    padding-left: 2rem;
    position: relative;
    color: var(--color-gray-700);  /* Explicit text color - CRITICAL */
    line-height: 1.6;
    margin-bottom: 0.5rem;
    display: block;  /* Ensure proper rendering */
}

.checklist-item:before {
    content: '☐';
    position: absolute;
    left: 0;
    font-size: 1.25rem;
    color: var(--color-guide-link);
    line-height: 1.6;
}

/* Related Guides - Prevent Word Breaking */
.related-guides-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .related-guides-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.related-guide-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
    background: var(--color-gray-50);
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
    min-height: 5rem;  /* Consistent height */
    text-decoration: none;
}

.related-guide-card:hover {
    background: var(--color-gray-100);
}

.related-guide-title {
    color: var(--color-guide-link);
    font-weight: 600;
    overflow-wrap: break-word;  /* Break at word boundaries - CRITICAL */
    word-wrap: break-word;      /* Legacy support */
    hyphens: auto;              /* Enable hyphenation */
    white-space: normal;        /* Allow wrapping */
    flex: 1;
    display: flex;
    align-items: center;
}

@media (min-width: 768px) {
    .related-guide-card {
        min-height: 6rem;
    }
}

/* Related Guides - Future Image Support (ready but not active) */
.related-guide-card.has-thumbnail {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;
    padding: 0.75rem;
}

.related-guide-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 0.375rem;
    object-fit: cover;
    background: var(--color-gray-200);
}

.related-guide-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
/* ==========================================================
   _collections.css — Collection explorer, cards, toolbar, search, chips
   Used by: collection/explorer.php, best-beaches.php, beaches-near-*.php
   Dependencies: _variables.css
   ========================================================== */

/* ========================================
   COLLECTION EXPLORER PAGES
   Tropical Daytime light system
   ======================================== */

body.collection-dark {
    background: linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
    color: var(--color-text-primary);
}

.collection-page {
    background: transparent;
    padding-top: 4.75rem;
    padding-bottom: 3rem;
}

.collection-page__inner {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 1rem;
}

.collection-page__flow {
    display: flex;
    flex-direction: column;
}

.collection-page__capture {
    margin-top: 1rem;
    order: 1;
}

.collection-page__results {
    order: 2;
}

.collection-hero {
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0 0 1.25rem 1.25rem;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.collection-hero::before {
    content: "";
    position: absolute;
    inset: auto auto -100px -100px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(14, 156, 163, 0.12) 0%, transparent 72%);
    pointer-events: none;
}

.collection-hero__inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.collection-hero__title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
}

.collection-hero__subtitle {
    margin: 0.85rem auto 0;
    max-width: 670px;
    color: var(--color-text-secondary);
    font-size: 1.16rem;
}

.collection-hero__meta {
    margin-top: 0.85rem;
    color: var(--color-text-muted);
    font-size: 0.94rem;
}

.collection-toolbar {
    padding: 0.95rem;
    margin-top: -1.35rem;
    position: relative;
    z-index: 2;
}

.collection-toolbar__search-row {
    display: block;
}

.collection-toolbar__control-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    margin-top: 0.65rem;
}

.collection-search {
    display: flex;
    align-items: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    min-height: 48px;
}

.collection-search__icon {
    padding-left: 0.95rem;
    color: var(--color-text-muted);
}

.collection-search__input {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--color-text-primary);
    padding: 0.75rem 0.95rem 0.75rem 0.7rem;
    font-size: 0.98rem;
}

.collection-search__input::placeholder {
    color: var(--color-text-muted);
}

.collection-search__input:focus {
    outline: none;
}

.collection-search:focus-within {
    border-color: var(--color-focus-ring);
    box-shadow: 0 0 0 2px var(--color-focus-ring-lighter);
}

.collection-toolbar__btn {
    min-height: 48px;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 0 0.8rem;
}

.collection-toolbar__btn:hover {
    border-color: var(--color-primary-muted);
    background: var(--color-surface-hover);
}

.collection-toolbar__sort {
    min-height: 48px;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0 0.8rem;
}

.collection-toolbar__chips {
    margin-top: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.collection-toolbar__chips-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.collection-toolbar__chips-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.collection-toolbar__count {
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    padding: 0.15rem 0.48rem;
    font-size: 0.73rem;
    color: var(--color-text-secondary);
}

.collection-toolbar__clear {
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 44px;
    padding: 0 0.2rem;
    cursor: pointer;
}

.collection-toolbar__clear:disabled {
    opacity: 0.42;
}

.collection-toolbar__chip-rail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.collection-toolbar__label {
    color: var(--color-text-muted);
    font-size: 0.92rem;
    margin-right: 0.15rem;
}

.collection-chip {
    min-height: 44px;
    padding: 0.45rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg-light-secondary);
    color: var(--color-text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.collection-chip:hover {
    border-color: var(--color-primary-muted);
    background: var(--color-surface-hover);
}

.collection-chip.is-active {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
}

.collection-chip__emoji {
    line-height: 1;
}

.collection-results {
    margin-top: 1rem;
}

.collection-results__header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.collection-results__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.collection-results__count {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 1.05rem;
}

.collection-results__count strong {
    color: var(--color-text-primary);
}

.collection-results__filters {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.84rem;
}

.collection-view-switch {
    display: inline-flex;
    gap: 0.3rem;
    background: var(--color-bg-light-tertiary);
    border: 1px solid var(--color-border);
    padding: 0.2rem;
    border-radius: 0.65rem;
}

.collection-view-switch__btn {
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.collection-view-switch__btn.is-active {
    background: var(--color-surface);
    color: var(--color-text-primary);
}

.collection-results__notice {
    margin-bottom: 0.85rem;
    background: var(--color-primary-light);
    border: 1px solid var(--color-primary-muted);
    color: var(--color-primary-dark);
    border-radius: 0.75rem;
    padding: 0.65rem 0.8rem;
    font-size: 0.9rem;
}

.collection-results__list {
    display: grid;
    gap: 0.85rem;
}

.collection-card {
    overflow: hidden;
    border-radius: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.collection-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary-muted);
    box-shadow: var(--shadow-popup);
}

.collection-card--cards,
.collection-card--list {
    display: grid;
    grid-template-columns: minmax(260px, 32%) 1fr;
}

.collection-card--grid {
    display: block;
}

.collection-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.collection-card--cards .collection-card__media,
.collection-card--list .collection-card__media {
    align-self: start;
}

.collection-card__media-link {
    display: block;
    width: 100%;
    height: 100%;
}

.collection-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.collection-card__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    border-radius: 9999px;
    background: var(--color-accent);
    color: var(--color-gray-900);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.3rem 0.55rem;
}

.collection-card__favorite {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: 9999px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    font-size: 1.05rem;
}

.collection-card__content {
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    min-width: 0;
}

.collection-card__top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
}

.collection-card__top-row > :first-child {
    min-width: 0;
}

.collection-card__title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.collection-card__title-link,
.collection-card__title-link:visited {
    color: var(--color-text-primary);
    text-decoration: none;
}

.collection-card__title-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.collection-card__location {
    margin: 0.3rem 0 0;
    color: var(--color-text-muted);
    font-size: 1rem;
}

.collection-card__rating {
    text-align: right;
    min-width: 110px;
}

.collection-card__stars {
    color: var(--color-accent);
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    line-height: 1;
}

.collection-card__score {
    color: var(--color-text-primary);
    font-weight: 700;
}

.collection-card__reviews {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.collection-card__excerpt {
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.collection-card__chips,
.collection-card__traits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.collection-mini-chip {
    border-radius: 9999px;
    background: var(--color-primary-light);
    border: 1px solid var(--color-primary-muted);
    color: var(--color-primary-dark);
    padding: 0.25rem 0.65rem;
    font-size: 0.76rem;
    font-weight: 600;
}

.collection-card__traits span {
    color: var(--color-text-muted);
    font-size: 0.84rem;
    padding-right: 0.55rem;
    border-right: 1px solid var(--color-border);
}

.collection-card__traits span:last-child {
    border-right: 0;
    padding-right: 0;
}

.collection-card__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    margin-top: auto;
}

.collection-card__primary,
.collection-card__secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-decoration: none;
    font-size: 0.875rem;
    min-width: 0;
    min-height: 44px;
    padding: 0.65rem 1.25rem;
    border-radius: 0.5rem;
    transition: background-color 0.15s ease;
}

.collection-card__primary {
    font-weight: 700;
    background: var(--color-primary);
    color: #fff;
}

.collection-card__primary:hover {
    background: var(--color-primary-hover);
}

.collection-card__secondary {
    font-weight: 600;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border: 1.5px solid var(--color-border);
}

.collection-card__secondary:hover {
    background: var(--color-surface-muted, #f5f5f4);
}

.collection-card__primary svg,
.collection-card__secondary svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.collection-card--list .collection-card__excerpt,
.collection-card--list .collection-card__chips {
    display: none;
}

.collection-results__list--grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}


.collection-results__list--grid .collection-card__title {
    font-size: 1.25rem;
}

.collection-results__list--grid .collection-card__actions {
    grid-template-columns: 1fr;
}

.collection-empty {
    padding: 1.4rem;
    text-align: center;
}

.collection-empty h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-text-primary);
}

.collection-empty p {
    margin: 0.5rem 0 0;
    color: var(--color-text-secondary);
}

.collection-empty__btn {
    margin-top: 0.85rem;
    border: 0;
}

#collection-explorer-root.is-loading {
    opacity: 0.8;
}

.collection-content-nav {
    border-bottom-color: var(--color-border) !important;
    background: var(--color-surface) !important;
}

.collection-content-nav a {
    color: var(--color-primary) !important;
}

.collection-content-nav span {
    color: var(--color-text-muted) !important;
}

.collection-content-nav .max-w-7xl > div {
    align-items: center;
}

.collection-content-nav .max-w-7xl > div > a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    border-radius: 9999px;
    border: 1px solid var(--color-border);
    padding: 0 0.75rem;
    text-decoration: none;
}

    color: var(--color-gray-900);
}

@media (max-width: 1024px) {
    .collection-card--cards,
    .collection-card--list {
        grid-template-columns: minmax(220px, 33%) 1fr;
    }
}

@media (max-width: 768px) {
    .collection-page {
        padding-top: 4rem;
    }

    .collection-hero {
        border-radius: 0;
        margin: 0 -1rem 0.8rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .collection-toolbar {
        margin-top: 0;
    }

    .collection-toolbar__control-row {
        grid-template-columns: 1fr 1fr;
    }

    .collection-toolbar__chips-header {
        margin-top: 0.25rem;
    }

    .collection-toolbar__chip-rail {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .collection-toolbar__chip-rail .collection-chip {
        flex: 0 0 auto;
        scroll-snap-align: start;
        white-space: nowrap;
    }

    .collection-chip .collection-chip__emoji {
        display: none;
    }

    .collection-chip.is-active .collection-chip__emoji {
        display: inline;
    }

    .collection-page__results {
        order: 1;
    }

    .collection-page__capture {
        order: 2;
        margin-top: 0.85rem;
    }

    .collection-results__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .collection-results__filters {
        font-size: 0.8rem;
    }

    .collection-card--cards,
    .collection-card--list {
        grid-template-columns: 1fr;
    }

    .collection-card--list .collection-card__excerpt {
        display: block;
    }

    .collection-card__top-row {
        flex-direction: column;
    }

    .collection-card__rating {
        text-align: left;
        min-width: 0;
    }

    .collection-card__actions {
        grid-template-columns: 1fr;
    }

    .collection-content-nav .max-w-7xl > div {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        padding-bottom: 0.3rem;
    }

    .collection-content-nav .max-w-7xl > div > span:not(:first-child) {
        display: none;
    }

    .collection-content-nav .max-w-7xl > div > a {
        white-space: nowrap;
        scroll-snap-align: start;
        min-height: 44px;
    }




}

@media (max-width: 480px) {
    .collection-card__top-row {
        flex-direction: column;
    }

    .collection-card__rating {
        text-align: left;
    }

    .collection-card__actions {
        grid-template-columns: 1fr;
    }

    .collection-card__title {
        font-size: 1.35rem;
        line-height: 1.15;
    }

    .collection-card__location {
        font-size: 0.92rem;
    }

    .collection-card__chips,
    .collection-card__traits {
        gap: 0.35rem;
    }
}
/* ==========================================================
   _beach.css — Beach detail page: hero gradient, quick facts, highlights
   Used by: beach.php, components/beach/*.php
   Dependencies: _variables.css
   ========================================================== */

/* ========================================
   BEACH DETAIL PAGE
   ======================================== */

.checkin-option input:checked + .checkin-option-box {
    background-color: var(--color-bg-light-secondary);
    border-color: var(--color-secondary);
    color: var(--color-secondary-dark);
}

.checkin-option-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border: 2px solid var(--color-gray-200);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
    min-height: 3.5rem;
}

.checkin-option-box:hover {
    border-color: var(--color-gray-400);
    background-color: var(--color-gray-50);
}

/* ========================================
   BEACH PAGE REDESIGN - ISLAFINDER STYLE
   ======================================== */

/* Hero section gradient for beach page */
.hero-gradient-beach {
    background: linear-gradient(to top, rgba(12, 61, 66, 0.92) 0%, rgba(12, 61, 66, 0.55) 40%, transparent 100%);
}

/* Highlight card with yellow glow - use attribute selector for specificity */
.highlight-card[class] {
    border-color: var(--color-accent);
    box-shadow: 0 0 20px rgba(14, 156, 163, 0.15), 0 0 40px rgba(14, 156, 163, 0.1);
}

/* Yellow bullet for visitor tips */
.yellow-bullet {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-accent);
    flex-shrink: 0;
}

/* Quick fact card styling */
.quick-fact-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-fact-card:hover {
    border-color: var(--color-primary);
}

.quick-fact-card .icon-box {
    background: var(--color-accent);
    padding: 0.625rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-fact-card .icon-box svg,
.quick-fact-card .icon-box i {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--color-gray-900);
}

/* Beach detail dark theme cards */
.beach-detail-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
}
/* ==========================================================
   _forms.css — Compare bar, range sliders, login animations, Tom Select
   Used by: footer.php (compare), filters.php (range), auth pages
   Dependencies: _variables.css
   ========================================================== */

/* ========================================
   COMPARISON BAR
   ======================================== */

#compare-bar {
    background: var(--color-card-bg);
    border-color: var(--color-border);
}

/* Compare button active state - layered specificity */
.compare-btn.active,
.compare-btn[aria-pressed="true"],
button.compare-btn.active,
button.compare-btn[aria-pressed="true"] {
    background-color: var(--color-primary-hover);
    color: white;
}

/* Mobile comparison bar */
/* Required HTML classes: .compare-bar-inner, .compare-bar-header, .compare-bar-count, .compare-bar-actions */
@media (max-width: 640px) {
    #compare-bar .compare-bar-inner {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    #compare-bar .compare-bar-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    #compare-bar .compare-bar-count {
        width: 100%;
        justify-content: center;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--color-border-light);
    }

    #compare-beaches {
        width: 100%;
        justify-content: center;
        gap: 0.375rem;
        padding: 0.5rem 0;
    }

    #compare-beaches > div {
        padding: 0.25rem 0.5rem;
    }

    #compare-beaches img {
        width: 1.5rem;
        height: 1.5rem;
    }

    #compare-beaches .compare-beach-name {
        max-width: 4rem;
        font-size: 0.75rem;
    }

    #compare-bar .compare-bar-actions {
        width: 100%;
        justify-content: center;
        padding-top: 0.5rem;
    }

    #compare-bar #compare-go-btn {
        flex: 1;
        max-width: 200px;
    }
}

/* ========================================
   RANGE SLIDER
   ======================================== */

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--color-gray-200);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--color-primary-hover);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(37, 99, 235, 0.2);
}

input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(37, 99, 235, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--color-primary-hover);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========================================
   LOGIN PAGE
   ======================================== */

/* Social proof avatars animation */
.login-avatars > div {
    animation: login-avatar-pop 0.3s ease-out backwards;
}

.login-avatars > div:nth-child(1) { animation-delay: 0.1s; }
.login-avatars > div:nth-child(2) { animation-delay: 0.2s; }
.login-avatars > div:nth-child(3) { animation-delay: 0.3s; }
.login-avatars > div:nth-child(4) { animation-delay: 0.4s; }

@keyframes login-avatar-pop {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Login form input focus state */
.login-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(253, 224, 71, 0.2);
}

/* Google button hover effect */
.login-google-btn {
    transition: all 0.2s ease;
}

.login-google-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Feature cards on mobile - stagger animation */
.login-feature-card {
    animation: login-card-fade 0.4s ease-out backwards;
}

.login-feature-card:nth-child(1) { animation-delay: 0.1s; }
.login-feature-card:nth-child(2) { animation-delay: 0.2s; }
.login-feature-card:nth-child(3) { animation-delay: 0.3s; }
.login-feature-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes login-card-fade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Chat System — Floating Bubble + Panel
   ========================================= */

/* --- Floating Action Button --- */
.chat-fab-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: var(--z-chat, 70);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    pointer-events: none;
}

.chat-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 4px 20px rgba(29, 78, 216, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    pointer-events: auto;
}
.chat-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(29, 78, 216, 0.6), 0 3px 12px rgba(0, 0, 0, 0.3);
}
.chat-fab:active {
    transform: scale(0.95);
}
.chat-fab svg {
    width: 24px;
    height: 24px;
    color: #ffffff !important;
    stroke: #ffffff !important;
    fill: none !important;
}
.chat-fab svg * {
    stroke: #ffffff !important;
    fill: none !important;
}

/* --- Badge --- */
.chat-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9999px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    animation: chat-badge-pulse 2s infinite;
}
@keyframes chat-badge-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* --- Panel --- */
.chat-panel {
    width: 380px;
    height: 560px;
    border-radius: 16px;
    background: var(--color-ocean-800);
    border: 1px solid var(--color-ocean-700);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.25s, transform 0.25s;
}
.chat-panel.closed {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
    pointer-events: none;
}
.chat-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* --- Panel Header --- */
.chat-panel-header {
    background: var(--color-ocean-900);
    border-bottom: 1px solid var(--color-ocean-700);
    padding: 0.75rem 1rem;
    flex-shrink: 0;
}

/* --- Messages Scroll Area --- */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }

/* --- Compose Bar --- */
.chat-compose {
    border-top: 1px solid var(--color-ocean-700);
    background: var(--color-ocean-900);
    padding: 0.625rem 0.75rem;
    flex-shrink: 0;
}
.chat-compose textarea {
    background: var(--color-ocean-800);
    border: 1px solid var(--color-ocean-700);
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    color: #fff;
    resize: none;
    width: 100%;
    outline: none;
}
.chat-compose textarea::placeholder { color: rgba(255, 255, 255, 0.4); }
.chat-compose textarea:focus { box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5); }
.chat-compose-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}
.chat-compose-btn:hover { background: #3b82f6; }

/* --- Message Bubbles --- */
.chat-bubble-mine {
    background: #1d4ed8;
    border-radius: 18px 18px 4px 18px;
}
.chat-bubble-other {
    background: var(--color-ocean-700);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 18px 18px 18px 4px;
}

/* --- Avatars --- */
.chat-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 11px;
    flex-shrink: 0;
    color: #fff;
}

/* --- Inbox Items --- */
.chat-convo-item {
    transition: background 0.15s;
    cursor: pointer;
    border: none;
    text-align: left;
    background: none;
    width: 100%;
}
.chat-convo-item:hover { background: rgba(255, 255, 255, 0.05); }

.chat-unread-dot {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    flex-shrink: 0;
}

/* --- Sign-in CTA (guests) --- */
.chat-signin-cta {
    border-top: 1px solid var(--color-ocean-700);
    background: var(--color-ocean-900);
    padding: 0.75rem;
    text-align: center;
    flex-shrink: 0;
}
.chat-signin-cta a {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
}
.chat-signin-cta a:hover { background: #3b82f6; }

/* --- Report Button --- */
.chat-report-btn {
    opacity: 0;
    transition: opacity 0.15s;
}
.chat-message-row:hover .chat-report-btn,
.chat-message-row:focus-within .chat-report-btn,
.chat-report-btn:focus { opacity: 1; }

/* --- Fade-in Animation --- */
.chat-fade-in {
    animation: chat-fade-in 0.3s ease;
}
@keyframes chat-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ==========================================================
   _accessibility.css — Focus states, skip links, reduced motion, contrast
   Used by: all pages (global accessibility)
   Dependencies: _variables.css
   ========================================================== */

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Enhanced focus states for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Focus ring for buttons and links */
.focus-ring:focus-visible {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Skip link - visible only on focus */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--color-primary-hover);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    z-index: var(--z-skip-link);
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.skip-link:focus {
    top: 1rem;
    outline: none;
}

/* Screen reader utilities: Use Tailwind's built-in sr-only and not-sr-only classes */
/* For mobile-only sr: use max-sm:sr-only in HTML */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .beach-card {
        border: 2px solid currentColor;
    }

    button, a {
        border: 1px solid currentColor;
    }

    .tag-btn, .filter-chip {
        border: 1px solid currentColor;
    }
}

/* Visible focus for checkbox and radio */
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Navigation focus trap indicator */
.nav-link:focus-visible {
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 0.375rem;
}

/* Card focus state */
.beach-card:focus-within {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Modal/dialog focus trap */
[role="dialog"]:focus {
    outline: none;
}

/* Button disabled state - accessible styling */
button:disabled,
button[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Live region for screen readers */
.live-region {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Color contrast improvements - WCAG AA compliance */
/* Use .text-contrast-safe class in HTML where better contrast is needed */
.text-contrast-safe {
    color: var(--color-gray-600);
}

/* Placeholder text - meet WCAG guidelines */
input::placeholder,
textarea::placeholder {
    color: var(--color-gray-500);
    opacity: 1;
}

/* Link colors with sufficient contrast in prose-style content */
.prose a:not([class]),
.guide-article a:not([class]),
.collection-legacy-content .beach-description a:not([class]) {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.prose a:not([class]):hover,
.guide-article a:not([class]):hover,
.collection-legacy-content .beach-description a:not([class]):hover {
    color: var(--color-primary-darker);
}

/* Semantic accessibility helpers */
.a11y-on-light-blue {
    color: var(--color-primary-darker);
}

.a11y-on-light-amber {
    color: #92400e;
}

.a11y-error-text {
    color: var(--color-error-dark);
}

.a11y-success-text {
    color: var(--color-success-dark);
}
/* ==========================================================
   _dark-mode.css — All [data-theme="dark"] overrides, consolidated
   Used by: all pages when dark mode is active
   Dependencies: _variables.css (color tokens)
   Note: Guide page overrides remap light-mode Tailwind classes
   ========================================================== */

/* ========================================
   DARK MODE OVERRIDES
   All [data-theme="dark"] styles consolidated here
   ======================================== */

/* --- Cards --- */
[data-theme="dark"] .beach-card {
    background-color: var(--color-card-bg);
    border-color: var(--color-border);
}

/* --- Badges --- */
[data-theme="dark"] .beach-badge-gold {
    background: linear-gradient(135deg, #422006 0%, #713f12 100%);
    color: #fbbf24;
}

[data-theme="dark"] .beach-badge-purple {
    background: linear-gradient(135deg, #3b0764 0%, #581c87 100%);
    color: #c4b5fd;
}

[data-theme="dark"] .beach-badge-blue {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    color: var(--color-primary-muted);
}

/* --- Compare bar --- */
[data-theme="dark"] #compare-bar {
    background: var(--color-card-bg);
    border-color: var(--color-border);
}

/* --- Empty states --- */
[data-theme="dark"] .empty-state {
    background: var(--color-bg-tertiary);
    border-color: var(--color-border);
}

[data-theme="dark"] .empty-state-title {
    color: var(--color-text-primary);
}

[data-theme="dark"] .empty-state-message,
[data-theme="dark"] .empty-state-context,
[data-theme="dark"] .empty-state-suggestions li {
    color: var(--color-text-secondary);
}

[data-theme="dark"] .empty-state-suggestions li::before {
    color: var(--color-text-muted);
}

/* --- Filter chips --- */
[data-theme="dark"] .filter-chip {
    background: var(--color-accent-light);
    color: var(--color-primary-muted);
}

[data-theme="dark"] .filter-chip:hover {
    background: var(--color-primary-darker);
}

[data-theme="dark"] .filter-chip .remove-btn {
    background: rgba(147, 197, 253, 0.1);
    color: var(--color-primary-muted);
}

[data-theme="dark"] .filter-chip .remove-btn:hover {
    background: rgba(147, 197, 253, 0.2);
}

[data-theme="dark"] .filter-chip.clear-all {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

[data-theme="dark"] .filter-chip.clear-all:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* --- Map popups --- */
[data-theme="dark"] .beach-popup {
    background: var(--color-card-bg);
}

[data-theme="dark"] .popup-title {
    color: var(--color-text-primary);
}

[data-theme="dark"] .popup-rating,
[data-theme="dark"] .popup-municipality {
    color: var(--color-text-secondary);
}

[data-theme="dark"] .popup-tag {
    background: var(--color-accent-light);
    color: var(--color-primary-muted);
}

[data-theme="dark"] .popup-btn-secondary {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
}

[data-theme="dark"] .popup-btn-secondary:hover {
    background: var(--color-border);
}

[data-theme="dark"] .beach-popup-container .maplibregl-popup-content {
    background: var(--color-card-bg);
}

[data-theme="dark"] .maplibregl-popup-tip {
    border-top-color: var(--color-card-bg);
}

/* --- Loading states --- */
[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
}

[data-theme="dark"] .skeleton-card {
    background: var(--color-card-bg);
}

/* --- Form controls --- */
[data-theme="dark"] input[type="range"] {
    background: var(--color-border);
}

/* --- Modals --- */
[data-theme="dark"] .share-modal-content {
    background: var(--color-card-bg);
}

[data-theme="dark"] .lightbox-overlay {
    background-color: rgba(0, 0, 0, 0.98);
}

[data-theme="dark"] .ts-control {
    background: var(--color-card-bg);
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

[data-theme="dark"] .ts-dropdown {
    background: var(--color-card-bg);
    border-color: var(--color-border);
}

[data-theme="dark"] .ts-dropdown .option {
    color: var(--color-text-primary);
}

[data-theme="dark"] .ts-dropdown .option.active {
    background: var(--color-accent-light);
    color: var(--color-primary-muted);
}

[data-theme="dark"] .ts-dropdown .option:hover {
    background: var(--color-bg-tertiary);
}

/* --- Guide pages --- */

[data-theme="dark"] .guide-toc {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
}

[data-theme="dark"] .guide-toc-link {
    color: var(--color-accent);
}

[data-theme="dark"] .guide-toc-link:hover {
    color: var(--color-accent-hover);
}

[data-theme="dark"] .guide-article {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
}

/* Guide page utility remaps - scoped to guide content only */
[data-theme="dark"] .guide-layout .bg-slate-50,
[data-theme="dark"] .guide-article .bg-slate-50 {
    background: var(--color-card-bg) !important;
    border: 1px solid var(--color-border-light);
}

/* Amber text stays visible in dark mode */
[data-theme="dark"] .guide-layout .text-amber-700,
[data-theme="dark"] .guide-article .text-amber-700 {
    color: #fbbf24 !important; /* amber-400 - brighter for dark backgrounds */
}

/* --- Typography + surface contrast (guide content uses light-mode Tailwind) --- */
[data-theme="dark"] .guide-layout {
    color: var(--color-text-secondary);
}

/* --- Text color remaps (guide content uses light-mode Tailwind classes) --- */
[data-theme="dark"] .guide-layout .text-gray-900,
[data-theme="dark"] .guide-layout .text-gray-800,
[data-theme="dark"] .guide-layout .text-green-900,
[data-theme="dark"] .guide-layout .text-green-800,
[data-theme="dark"] .guide-layout .text-blue-900,
[data-theme="dark"] .guide-layout .text-yellow-900,
[data-theme="dark"] .guide-layout .text-yellow-800 {
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .guide-layout .text-gray-700,
[data-theme="dark"] .guide-layout .text-gray-600 {
    color: var(--color-text-secondary) !important;
}

[data-theme="dark"] .guide-layout .text-gray-500,
[data-theme="dark"] .guide-layout .text-gray-400 {
    color: var(--color-text-muted) !important;
}

[data-theme="dark"] .guide-layout .text-green-600 {
    color: var(--color-secondary-light) !important;
}

/* --- Background remaps --- */
[data-theme="dark"] .guide-layout .bg-white,
[data-theme="dark"] .guide-layout .bg-gray-50,
[data-theme="dark"] .guide-layout .bg-green-50,
[data-theme="dark"] .guide-layout .bg-blue-50,
[data-theme="dark"] .guide-layout .bg-yellow-50,
[data-theme="dark"] .guide-layout .bg-amber-50 {
    background: var(--color-card-bg) !important;
}

[data-theme="dark"] .guide-layout .bg-gradient-to-r {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.9) 100%) !important;
    border: 1px solid var(--color-border);
}

[data-theme="dark"] .guide-layout .a11y-on-light-amber,
[data-theme="dark"] .guide-layout .a11y-on-light-blue {
    color: var(--color-text-primary);
}

/* Keep yellow CTA buttons legible in dark mode */
[data-theme="dark"] .guide-layout .bg-yellow-400 .text-gray-900 {
    color: var(--color-gray-900) !important;
}

[data-theme="dark"] .related-guide-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
}

[data-theme="dark"] .related-guide-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .checklist-item {
    color: var(--color-text-primary);
}

/* --- Prose --- */
[data-theme="dark"] .prose-brand p {
    color: var(--color-text-secondary);
}

/* Complete prose-brand dark mode support */
[data-theme="dark"] .prose-brand strong {
    color: var(--color-white);
}

[data-theme="dark"] .prose-brand h2,
[data-theme="dark"] .prose-brand h3 {
    color: var(--color-white);
}

[data-theme="dark"] .prose-brand ul,
[data-theme="dark"] .prose-brand ol {
    color: var(--color-text-secondary);
}

[data-theme="dark"] .prose-brand a {
    color: var(--color-accent);
}

[data-theme="dark"] .prose-brand a:hover {
    color: var(--color-accent-light);
}

/* ==========================================================
   _responsive.css — Mobile/tablet breakpoints, beach detail layout
   Used by: all pages (responsive adaptations)
   Dependencies: _variables.css
   Breakpoints: 400px (narrow), 640px (mobile), 768px (tablet), 1024px (desktop)
   ========================================================== */

/* ========================================
   SEARCHABLE SELECT (Tom Select compatible)
   ======================================== */

.ts-wrapper {
    width: 100%;
}

.ts-control {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-gray-300);
    border-radius: 0.5rem;
    background: var(--color-surface);
}

.ts-control:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ts-dropdown {
    border: 1px solid var(--color-gray-200);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    margin-top: 0.25rem;
}

.ts-dropdown .option {
    padding: 0.625rem 0.75rem;
}

.ts-dropdown .option.active {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
}

/* ========================================
   BEACH DETAIL PAGE LAYOUT (Option A + D)
   ======================================== */

/* Base layout - flex column for all screen sizes */
.beach-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Desktop: CSS Grid with 2 columns */
@media (min-width: 1024px) {
    .beach-layout {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 2rem;
        align-items: start;
    }

    /* Main column items */
    .bl-quick-info,
    .bl-tags,
    .bl-quick-facts,
    .bl-description,
    .bl-highlights,
    .bl-tips,
    .bl-gallery,
    .bl-user-photos,
    .bl-reviews,
    .bl-similar {
        grid-column: 1;
    }

    /* Sidebar items */
    .bl-weather,
    .bl-conditions,
    .bl-crowd,
    .bl-amenities,
    .bl-practical,
    .bl-map {
        grid-column: 2;
    }

    /* Hide sticky bar on desktop */
    .beach-sticky-bar {
        display: none;
    }
}

/* Mobile: Reorder sections using flexbox order */
@media (max-width: 1023px) {
    .beach-layout {
        padding-bottom: 5rem; /* Space for sticky bar */
    }

    /* Optimal mobile content order */
    .bl-quick-info  { order: 1; }
    .bl-weather     { order: 2; }
    .bl-conditions  { order: 3; }
    .bl-crowd       { order: 4; }
    .bl-tags        { order: 5; }
    .bl-quick-facts { order: 6; }
    .bl-amenities   { order: 7; }
    .bl-description { order: 8; }
    .bl-highlights  { order: 9; }
    .bl-tips        { order: 10; }
    .bl-practical   { order: 11; }
    .bl-gallery     { order: 12; }
    .bl-user-photos { order: 13; }
    .bl-reviews     { order: 14; }
    .bl-similar     { order: 15; }
    .bl-map         { order: 16; }

    /* Hide empty sections */
    .bl-tags:empty,
    .bl-description:empty,
    .bl-highlights:empty,
    .bl-tips:empty,
    .bl-gallery:empty,
    .bl-conditions:empty,
    .bl-amenities:empty {
        display: none;
    }
}

/* ========================================
   STICKY QUICK ACTIONS BAR (Option D)
   ======================================== */

.beach-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: rgba(19, 32, 36, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.625rem 1rem;
    padding-bottom: max(0.625rem, env(safe-area-inset-bottom));
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 0.5rem;
}

.beach-sticky-bar .sticky-directions {
    color: #ffffff !important;
}
.beach-sticky-bar .sticky-directions svg,
.beach-sticky-bar .sticky-directions i,
.beach-sticky-bar .sticky-directions svg * {
    color: #ffffff !important;
    stroke: #ffffff !important;
    fill: none !important;
}

.beach-sticky-bar .sticky-secondary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    background: transparent !important;
    border: none;
    color: #ffffff !important;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.5rem 0.75rem;
    min-width: 56px;
    min-height: 48px;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.beach-sticky-bar .sticky-secondary svg,
.beach-sticky-bar .sticky-secondary i,
.beach-sticky-bar .sticky-secondary svg * {
    width: 1.125rem;
    height: 1.125rem;
    color: #ffffff !important;
    stroke: #ffffff !important;
    fill: none !important;
}

.beach-sticky-bar .sticky-secondary span {
    color: #ffffff !important;
}

.beach-sticky-bar .sticky-secondary:hover,
.beach-sticky-bar .sticky-secondary:focus-visible {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    outline: none;
}

.beach-sticky-bar .sticky-secondary:focus-visible {
    box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.6);
}

.beach-sticky-bar .sticky-secondary[aria-pressed="true"],
.beach-sticky-bar .sticky-secondary[aria-pressed="true"] span {
    color: #fde047 !important;
}
.beach-sticky-bar .sticky-secondary[aria-pressed="true"] svg,
.beach-sticky-bar .sticky-secondary[aria-pressed="true"] i,
.beach-sticky-bar .sticky-secondary[aria-pressed="true"] svg * {
    color: #fde047 !important;
    stroke: #fde047 !important;
}

.sticky-weather,
.sticky-crowd {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.sticky-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.sticky-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.sticky-value {
    font-weight: 600;
    color: white;
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-label {
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Crowd level color variations */
.sticky-crowd-green .sticky-value { color: #10b981; }
.sticky-crowd-yellow .sticky-value { color: #f59e0b; }
.sticky-crowd-orange .sticky-value { color: #f97316; }
.sticky-crowd-red .sticky-value { color: #ef4444; }

.sticky-directions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--color-accent);
    color: var(--color-bg-secondary);
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.8125rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.sticky-directions:hover {
    background: #fde047;
}

.sticky-directions svg,
.sticky-directions i {
    width: 1rem;
    height: 1rem;
}

/* Very narrow screens - simplify sticky bar */
/* Narrow screens (< 400px): compact sticky bar, stacked cards, single-column facts */
@media (max-width: 400px) {
    .sticky-weather,
    .sticky-crowd {
        gap: 0.375rem;
    }

    .sticky-icon {
        font-size: 1rem;
    }

    .sticky-value {
        font-size: 0.75rem;
    }

    .sticky-label {
        display: none;
    }

    .sticky-directions {
        padding: 0.5rem 0.75rem;
    }

    .sticky-directions span {
        display: none;
    }
}

/* ========================================
   HERO SECTION MOBILE
   ======================================== */

@media (max-width: 640px) {
    /* Hero category cards - smaller on mobile */
    .hero-category-card {
        min-height: 85px;
        padding: 0.875rem;
    }

    /* Search autocomplete on mobile */
    #search-autocomplete {
        position: fixed;
        left: 1rem;
        right: 1rem;
        top: auto;
        bottom: auto;
        margin-top: 0.5rem;
        max-height: 50vh;
        overflow-y: auto;
    }

    /* Hide extra trust bar items */
    .trust-bar-extra {
        display: none;
    }
}

/* ========================================
   PROFILE PAGE MOBILE
   ======================================== */

/* Required HTML classes: .profile-header-content, .profile-stats, .profile-stat,
   .review-item, .review-item-content, .review-item-image, .checkin-item, .checkin-item-image */
@media (max-width: 640px) {
    /* Profile header mobile */
    .profile-header .profile-header-content {
        text-align: center;
    }

    /* Stats grid on mobile */
    .profile-stats {
        gap: 1rem;
    }

    .profile-stats .profile-stat {
        min-width: 4rem;
    }

    /* Profile tabs - horizontal scroll */
    nav[role="tablist"] {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    nav[role="tablist"]::-webkit-scrollbar {
        display: none;
    }

    nav[role="tablist"] a {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }

    /* Reviews list on mobile */
    .review-item .review-item-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .review-item .review-item-image {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }

    /* Check-ins list mobile */
    .checkin-item .checkin-item-content {
        gap: 0.75rem;
    }

    .checkin-item .checkin-item-image {
        width: 3rem;
        height: 3rem;
    }
}

/* ========================================
   BEACH DETAIL PAGE MOBILE
   ======================================== */

/* Required HTML classes: .beach-hero, .beach-hero-overlay, .beach-sidebar, .beach-main */
@media (max-width: 640px) {
    /* Hero height on mobile */
    .beach-hero {
        height: 14rem;
    }

    /* Hero overlay text */
    .beach-hero .beach-hero-overlay {
        padding: 1rem;
    }

    .beach-hero h1 {
        font-size: 1.5rem;
    }

    /* Action buttons on beach detail */
    .beach-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .beach-actions button,
    .beach-actions a {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
        justify-content: center;
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }

    /* Conditions grid */
    .conditions-grid {
        grid-template-columns: 1fr;
    }

    /* Gallery grid on mobile */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.375rem;
    }

    /* Reviews section */
    .review-card {
        padding: 1rem;
    }

    .review-card .review-card-content {
        gap: 0.75rem;
    }

    /* Sidebar content on mobile - stack full width */
    .beach-sidebar {
        order: 2;
    }

    .beach-main {
        order: 1;
    }
}

/* ========================================
   GENERAL MOBILE TYPOGRAPHY
   ======================================== */

@media (max-width: 640px) {
    /* Reduce heading sizes on mobile */
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    /* Ensure body text is readable */
    body {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Reduce padding on containers - use .container-padding class */
    .container-padding {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ========================================
   NAVBAR SCROLL STATE
   ======================================== */

#main-nav.scrolled {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

/* ========================================
   HERO FILTER PILLS - ICON ALIGNMENT
   ======================================== */

/* Ensure SVG icons in filter pills are vertically centered */
.inline-flex svg,
.inline-flex i {
    display: block;
    vertical-align: middle;
}

/* ========================================
   MOBILE NAVIGATION FIXES
   ======================================== */

/* Required HTML classes: .nav-inner, .mobile-menu-content */
@media (max-width: 640px) {
    /* Ensure nav items don't overflow */
    #main-nav .nav-inner {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Mobile menu spacing */
    #mobile-menu .mobile-menu-content {
        padding: 1rem;
    }

    #mobile-menu a {
        padding: 0.75rem 0.5rem;
        font-size: 1rem;
    }
}

/* ========================================
   PWA INSTALL BANNER MOBILE
   ======================================== */

@media (max-width: 640px) {
    #pwa-install-banner {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        padding: 0.875rem;
    }

    #pwa-install-banner img {
        width: 2.5rem;
        height: 2.5rem;
    }

    #pwa-install-banner h3 {
        font-size: 0.9375rem;
    }

    #pwa-install-banner p {
        font-size: 0.8125rem;
    }

    #pwa-install-banner .pwa-banner-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    #pwa-install-banner button {
        width: 100%;
    }
}

/* ========================================
   QUICK FACTS CARDS MOBILE
   ======================================== */

/* Required HTML classes: .quick-facts-grid, .quick-fact-card, .quick-fact-content,
   .quick-fact-value, .quick-fact-subtext */

/* Desktop: truncate text to keep cards compact */
@media (min-width: 641px) {
    .quick-fact-value,
    .quick-fact-subtext {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Tablet/larger mobile: 2 columns with wrapped text */
@media (min-width: 400px) and (max-width: 640px) {
    .quick-facts-grid {
        gap: 0.5rem;
    }

    .quick-fact-card {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .quick-fact-value,
    .quick-fact-subtext {
        white-space: normal;
        word-wrap: break-word;
    }

    .quick-fact-value {
        font-size: 0.875rem;
        line-height: 1.3;
    }

    .quick-fact-subtext {
        font-size: 0.75rem;
        line-height: 1.3;
    }
}

/* Small mobile: single column, full width cards */
@media (max-width: 400px) {
    .quick-facts-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .quick-fact-card {
        padding: 0.875rem;
        gap: 0.75rem;
    }

    .quick-fact-value,
    .quick-fact-subtext {
        white-space: normal;
        word-wrap: break-word;
    }

    .quick-fact-value {
        font-size: 0.9375rem;
        line-height: 1.4;
    }

    .quick-fact-subtext {
        font-size: 0.8125rem;
        line-height: 1.4;
    }

    /* Slightly smaller icon box on mobile */
    .quick-fact-card .icon-box {
        padding: 0.5rem;
    }

    .quick-fact-card .icon-box svg,
    .quick-fact-card .icon-box i {
        width: 1.125rem;
        height: 1.125rem;
    }
}

/* ========================================
   COMPARE PAGE MOBILE
   ======================================== */

/* Required HTML classes: .compare-grid, .compare-actions */
@media (max-width: 640px) {
    /* Add beach name labels on mobile stacked view */
    .compare-grid > div {
        position: relative;
    }

    /* Ensure proper spacing between stacked items */
    .compare-grid.divide-y > div:first-child {
        padding-top: 1rem;
    }

    /* Actions section - stack buttons vertically */
    .compare-actions > div {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .compare-actions a,
    .compare-actions button {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   BEACH DRAWER MOBILE
   ======================================== */

/* Required HTML classes: .drawer-badges, .drawer-safety-grid, .drawer-info-grid */
@media (max-width: 640px) {
    /* Badges row - smaller padding, better wrapping */
    .drawer-badges {
        gap: 0.375rem;
    }

    .drawer-badges > div,
    .drawer-badges > span {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    /* Safety grid - single column on very small screens */
    .drawer-safety-grid {
        grid-template-columns: 1fr;
    }

    /* Info grid inherits sm:grid-cols-2 from Tailwind */
}

/* Extra small screens (< 400px) */
@media (max-width: 400px) {
    .drawer-badges > div,
    .drawer-badges > span {
        padding: 0.1875rem 0.375rem;
        font-size: 0.6875rem;
    }

    /* Truncate long badge text */
    .drawer-badges span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ========================================
   BEACH CARD MOBILE
   ======================================== */

/* Required HTML classes: .card-actions */
@media (max-width: 400px) {
    /* Stack card action buttons on very narrow screens */
    .card-actions {
        flex-direction: column;
    }

    .card-actions > button,
    .card-actions > a {
        width: 100%;
        justify-content: center;
    }

    /* Make the Details button full width, icons in a row below */
    .card-actions > button:first-child,
    .card-actions > a:first-child {
        order: -1;
    }

    /* Group icon buttons in a row */
    .card-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .card-actions > button:not(:first-child),
    .card-actions > a:not(:first-child) {
        width: auto;
    }
}

/* Alternative: wrap icon buttons on medium-small screens */
@media (min-width: 401px) and (max-width: 480px) {
    .card-actions {
        flex-wrap: wrap;
    }

    /* Details button takes full width */
    .card-actions > button:first-child,
    .card-actions > a:first-child {
        flex: 1 1 100%;
        order: 1;
    }

    /* Icon buttons share a row */
    .card-actions > button:not(:first-child),
    .card-actions > a:not(:first-child) {
        flex: 1 1 auto;
        order: 2;
    }
}

/* ========================================
   WEATHER WIDGET MOBILE
   ======================================== */

/* Required HTML classes: .weather-conditions-grid */
@media (max-width: 400px) {
    .weather-conditions-grid {
        gap: 0.375rem;
    }

    .weather-conditions-grid > div {
        padding: 0.5rem;
    }

    .weather-conditions-grid .text-2xl {
        font-size: 1.25rem;
    }

    .weather-conditions-grid .text-sm {
        font-size: 0.75rem;
    }

    .weather-conditions-grid .text-xs {
        font-size: 0.625rem;
    }
}

/* ========================================
   MOBILE SELECT DROPDOWN FIX
   ======================================== */

/* Fix for mobile select dropdowns - ensure text is visible in native pickers */
@media (max-width: 768px) {
    /* Mobile selects in filter drawer need dark text for native iOS/Android pickers */
    #mobile-municipality-filter,
    #mobile-sort-filter,
    select.mobile-select {
        /* Native mobile pickers ignore most CSS - use system defaults */
        color: white;
        background-color: rgba(255, 255, 255, 0.05);
    }

    /* Option text - black for native pickers, white for non-native */
    #mobile-municipality-filter option,
    #mobile-sort-filter option,
    select.mobile-select option {
        color: #1a1a1a;
        background-color: white;
    }

    /* Ensure the select arrow is visible */
    #filter-drawer select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        background-size: 1rem;
        padding-right: 2.5rem;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
}

/* ========================================
   GUIDE PAGES MOBILE
   ======================================== */

@media (max-width: 640px) {
    /* Guide layout - full width */
    .guide-layout {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }

    /* Guide article - reduced padding */
    .guide-article {
        padding: 1.5rem !important;
    }

    /* Related guides - stack on mobile */
    .related-guides-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Checklist items - tighter spacing */
    .checklist-item {
        font-size: 0.9375rem;
        padding-left: 1.75rem;
        margin-bottom: 0.375rem;
    }

    .checklist-item:before {
        font-size: 1.125rem;
    }
}

/* ========================================
   CHAT PANEL MOBILE
   ======================================== */

/* Full-width panel on small screens */
@media (max-width: 440px) {
    .chat-panel {
        width: calc(100vw - 24px);
        height: calc(100dvh - 100px);
    }
}

/* Welcome popup - scrollable on mobile so close/dismiss buttons stay reachable */
@media (max-width: 640px) {
    .welcome-popup-overlay {
        align-items: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* Clear the beach sticky bar on mobile */
@media (max-width: 1023px) {
    body:has(.beach-sticky-bar) .chat-fab-container,
    .page-has-sticky-bar .chat-fab-container {
        bottom: 5.5rem !important;
    }
}

/* ==========================================================
   _print.css — Print media styles
   Used by: all pages (@media print)
   ========================================================== */

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    nav, footer, .filters-container, button, .drawer-overlay, .share-modal, .toast-container {
        display: none !important;
    }

    .beach-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--color-gray-200);
    }
}
