/* 
   MAMA MAPS - MAGAZINE X MATERIAL THEME v3.0 
   Targeting: AIRawDataSchema Rendering
   Vibe: Editorial, Borderless, High-Contrast, Material Elevation
*/

:root {
    /* --- PALETTE: EDITORIAL INK & PAPER --- */
    --river-deep: #141413;       /* Pitch/Ink Black for high contrast */
    --river-mid: #686662;        /* Subdued Slate for readability */
    --river-light: #EBE9E4;      /* Material "Surface Variant" for fills */

    --pebble-stone: #F5F4F0;     /* App Background (Soft Magazine Paper) */
    --pebble-surface: #FFFFFF;   /* Foreground Cards (Pure White) */
    
    /* Removed all pebble-border and pebble-shadow concepts */
    /* Relying purely on tonal shifts and elevation */

    --otter-fur: #33312E;        /* Deep Active States */
    --otter-belly: #E8E2D5;      /* Warm Highlights */

    /* --- PALETTE: SEMANTIC SIGNALS (Muted Material) --- */
    --accent-safe: #2E7D54;      
    --accent-warning: #C17524;   
    --accent-alert: #D34343;
    --accent-info: #3E739D;
    --accent-heart: #F03E3E;

    /* --- CATEGORY COLORS (MAP PINS) - MAGAZINE THEME --- */
    /* Vibe: Bold, high-contrast, glossy editorial ink */
    --category-play: #F5A623;     /* Vibrant Amber */
    --category-eat: #E11D48;      /* Crimson Red */
    --category-urgent: #00A896;   /* Electric Teal */
    --category-learn: #4F46E5;    /* Striking Violet-Blue */
    --category-explore: #059669;  /* Deep Emerald */
    --category-shopping: #9333EA; /* Electric Purple */
    --category-default: #141413;  /* Ink Black (Matches theme default) */

    /* --- UI UTILS (Material Glass) --- */
    --glass: rgba(255, 255, 255, 0.9);
    --glass-blur: blur(20px) saturate(150%);

    /* --- SHAPE LANGUAGE (Material 3 Standardized) --- */
    --radius-pebble: 32px;       
    --radius-lg: 24px;
    --radius-inner: 20px;        
    --radius-md: 16px;
    --radius-input: 16px;
    --radius-pill: 999px;        /* Perfect pills, zero borders */
    --radius-sm: 8px;

    /* --- ELEVATION (Material Design Shadows) --- */
    --elevation-1: 0 1px 3px rgba(20, 20, 19, 0.05), 0 1px 2px rgba(20, 20, 19, 0.03);
    --elevation-2: 0 4px 12px rgba(20, 20, 19, 0.06), 0 2px 4px rgba(20, 20, 19, 0.04);
    --elevation-3: 0 12px 32px rgba(20, 20, 19, 0.08), 0 4px 12px rgba(20, 20, 19, 0.04);
    --elevation-4: 0 24px 48px rgba(20, 20, 19, 0.12), 0 8px 24px rgba(20, 20, 19, 0.06);

    /* --- TYPOGRAPHY (Editorial / Magazine) --- */
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'JetBrains Mono', ui-monospace, monospace;

    /* --- ANIMATION (Material Standard Easing) --- */
    --transition-smooth: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    --anim-slide: 0.4s cubic-bezier(0.2, 0, 0, 1);
    --anim-press: 0.2s cubic-bezier(0.2, 0, 0, 1);

    /* HTMX Page Transition Animations */
    --anim-page-exit: 0.3s cubic-bezier(0.4, 0, 1, 1);
    --anim-page-enter: 0.4s cubic-bezier(0.2, 0, 0, 1);
}

/* --- RESET & BASE --- */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--pebble-stone);
    color: var(--river-deep);
    font-family: var(--font-sans);
    margin: 0;
    line-height: 1.6;
    font-size: 16px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* --- TYPOGRAPHY SYSTEM (Magazine Impact) --- */
h1, h2, h3, h4, h5 {
    margin: 0 0 0.5rem 0;
    font-weight: 900; /* Ultra bold for editorial feel */
    letter-spacing: -0.04em; 
    color: var(--river-deep);
}

h1 { font-size: 36px; line-height: 1.1; }
h2 { font-size: 24px; line-height: 1.2; }
h3 { font-size: 18px; line-height: 1.3; font-weight: 800; }

p {
    margin-bottom: 1rem;
    color: var(--river-mid);
    font-size: 15px;
}

small { font-size: 13px; }

a { text-decoration: none; color: inherit; }

/* Editorial tracking for metadata */
.mono-label, .category-tag {
    font-family: var(--font-sans); /* Swapped to sans for clean editorial look */
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
    color: var(--river-mid);
}

.category-tag {
    margin-bottom: 12px;
    display: block;
    color: var(--river-deep);
}

/* --- LAYOUT CONTAINERS --- */
.viewport-container, .viewport {
    width: 100%;
    background: var(--pebble-stone);
    min-height: 100vh;
    position: relative;
    padding-bottom: 120px;
    margin: 0 auto;
    overflow-x: clip;
}

.viewport-container {
    max-width: 480px;
    background: #FFFFFF; /* Pure white spine for desktop viewing */
    box-shadow: var(--elevation-4);
}

/* --- COMPONENT: HERO IMAGE --- */
.hero-wrapper, .hero {
    position: relative;
    height: 360px; /* Taller hero for magazine layout */
    background-color: var(--river-light);
    overflow: hidden;
    /* Removed bottom border radius for a flush editorial bleed */
    border-radius: 0; 
}

.hero-wrapper {
    margin-bottom: 24px;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0, 0, 1);
}

.hero-wrapper:hover .hero-img {
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
}

.hero-nav {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 200;
    background: transparent;
    transition: background 0.25s ease, backdrop-filter 0.25s ease;
    box-sizing: border-box;
}

/* --- COMPONENT: MATERIAL CARDS --- */
.pebble-card, .section-card {
    background: var(--pebble-surface);
    border-radius: var(--radius-inner);
    padding: 24px;
    margin: 0 16px 24px 16px;
    border: none; /* Strict no border */
    box-shadow: var(--elevation-2);
    transition: var(--transition-smooth);
}

.pebble-card:active {
    transform: scale(0.98);
    box-shadow: var(--elevation-1);
}

.place-section-title {
    font-size: 20px;
    font-weight: 900;
    margin: 0 0 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: -0.03em;
}

/* EDITORIAL "GOOD TO KNOW" LIST */
.editorial-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.editorial-list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.editorial-list svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    stroke: var(--river-deep);
    stroke-width: 2;
    margin-top: 2px;
}

.editorial-list strong {
    display: block;
    font-size: 15px;
    font-weight: 900;
    color: var(--river-deep);
    margin-bottom: 4px;
}

.editorial-list span {
    font-size: 14px;
    font-weight: 500;
    color: var(--river-mid);
    line-height: 1.5;
    display: block;
}

/* EDITORIAL SEASONS TAGS */
.season-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.season-pill {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--river-light);
    color: var(--river-mid);
    transition: var(--transition-smooth);
}

.season-pill.active {
    background: var(--river-deep);
    color: var(--pebble-surface);
    box-shadow: var(--elevation-1);
}

/* --- COMPONENT: SENTIMENT QUOTE CARD --- */
.sentiment-quote-card {
    background: var(--river-deep);
    color: white;
    border-radius: var(--radius-inner);
    position: relative;
    /* Ensure it gets the standard padding and margin of a .pebble-card */
    padding: 32px 24px;
    margin: 0 16px 24px 16px;
    box-shadow: var(--elevation-3);
}

.sentiment-quote-card .quote-icon {
    width: 48px;
    height: 48px;
    fill: var(--otter-belly);
    opacity: 0.2;
    position: absolute;
    top: 24px;
    left: 24px;
}

.sentiment-quote-card blockquote {
    position: relative;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.5;
    margin: 0 0 24px 0;
    z-index: 2;
    padding-top: 16px;
}

.sentiment-quote-card .recommended-for {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255,255,255,0.8);
}

.sentiment-quote-card .recommended-for strong {
    color: var(--otter-belly);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 4px;
}

/* --- COMPONENT: BORDERLESS BADGES & CHIPS --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border: none;
}

.badge-sentiment, .sentiment-badge {
    background: var(--river-deep);
    color: white;
    gap: 6px;
}

.sentiment-badge {
    position: absolute;
    bottom: 24px;
    right: 24px;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    box-shadow: var(--elevation-3);
    letter-spacing: -0.02em;
    text-transform: none;
}

/* Tonal backgrounds instead of borders */
.badge-success { background: #E4F1E8; color: var(--accent-safe); }
.badge-warning { background: #FDF0E1; color: var(--accent-warning); }

.chip, .context-chip {
    display: inline-flex;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    background: var(--river-light);
    color: var(--river-deep);
    border: none; /* Strict no border */
    transition: var(--transition-smooth);
    user-select: none;
}

.context-chip {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.chip.active, .context-chip.highlight {
    background: var(--river-deep);
    color: white;
    box-shadow: var(--elevation-2);
}

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* --- COMPONENT: ACTION BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: var(--anim-press);
    border: none;
    font-family: var(--font-sans);
    user-select: none;
}

.btn-primary {
    background: var(--river-deep);
    color: white;
    box-shadow: var(--elevation-2);
}

.btn-primary:active {
    transform: scale(0.96);
    box-shadow: var(--elevation-1);
    background: #000000;
}

.sticky-footer .btn-primary {
    flex: 1;
    padding: 18px 20px;
    font-size: 17px;
    box-shadow: var(--elevation-3);
}

.sticky-footer .btn-navigate-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--pebble-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--elevation-2);
    color: var(--river-deep);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sticky-footer .btn-navigate-icon:active {
    transform: scale(0.94);
    box-shadow: var(--elevation-1);
}

.sticky-footer .footer-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-icon-circle, .nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--pebble-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: var(--river-deep);
    cursor: pointer;
    box-shadow: var(--elevation-2);
    transition: var(--anim-press);
    text-decoration: none;
    flex-shrink: 0;
}

.nav-btn:active, .btn-icon-circle:active {
    transform: scale(0.92);
    box-shadow: var(--elevation-1);
}

.action-bar {
    display: flex;
    gap: 16px;
    padding: 0 16px 24px 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.action-bar::-webkit-scrollbar { display: none; }

.action-btn {
    flex: 1;
    padding: 20px 12px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--pebble-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 800;
    color: var(--river-deep);
    min-width: 96px;
    text-decoration: none;
    box-shadow: var(--elevation-1);
    transition: var(--anim-press);
}

.action-btn:active {
    transform: scale(0.96);
    background: var(--river-light);
    box-shadow: none;
}

.action-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--river-deep);
    stroke-width: 2;
}

/* --- SCHEMA SPECIFIC: SUITABILITY GRAPH --- */
.suitability-track, .bar-track {
    display: flex;
    flex-grow: 1;
    height: 8px;
    background: var(--river-light);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.suitability-track { margin-top: 8px; }

.suitability-fill, .bar-fill {
    height: 100%;
    background: var(--river-deep);
    border-radius: var(--radius-pill);
    transition: width 1s cubic-bezier(0.2, 0, 0, 1);
}

.age-graph {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.age-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.age-label {
    width: 65px;
    font-size: 13px;
    font-weight: 800;
    color: var(--river-deep);
}

/* --- SCHEMA SPECIFIC: SURVIVAL KIT GRID --- */
.survival-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.survival-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--river-light); /* Tonal fill, no border */
    border-radius: var(--radius-md);
    border: none;
    font-size: 14px;
    font-weight: 700;
    color: var(--river-deep);
}

.check-circle, .check-icon {
    width: 24px;
    height: 24px;
    background: var(--pebble-surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-safe);
    flex-shrink: 0;
    box-shadow: var(--elevation-1);
}

.check-circle svg, .check-icon svg { width: 14px; height: 14px; stroke-width: 3; }

.cross-icon {
    color: var(--river-mid);
    background: transparent;
    box-shadow: none;
    border: 2px solid rgba(20,20,19,0.1);
}

.survival-text {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

/* --- SCHEMA SPECIFIC: ATMOSPHERE METER --- */
.meter-wrapper, .meter-container { margin-bottom: 24px; }

.meter-bar, .meter-track {
    height: 8px;
    background: var(--river-light);
    border-radius: var(--radius-pill);
    position: relative;
    overflow: hidden;
}

.meter-fill-gradient, .meter-track-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #2E7D54, #C17524, #D34343);
    opacity: 0.9;
}

.meter-pip, .meter-indicator {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 4px;
    background: var(--pebble-surface);
    border-radius: var(--radius-pill);
    z-index: 2;
    box-shadow: var(--elevation-2);
    transition: left 0.8s cubic-bezier(0.2, 0, 0, 1);
}

.meter-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--river-mid);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
}

/* --- SCHEMA SPECIFIC: HOURS LIST --- */
.hours-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--pebble-surface);
    border-radius: var(--radius-md);
    border: none;
}

.hours-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    padding: 16px 0;
    border-bottom: 1px solid var(--river-light);
}
.hours-row:last-child { border-bottom: none; }

.hours-day {
    font-weight: 800;
    color: var(--river-deep);
}

.hours-time {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--river-mid);
}

/* --- UTILITY: SCROLL CONTAINERS --- */
.scroll-x {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.scroll-x::-webkit-scrollbar { display: none; }

/* --- HTMX GLOBAL UX & LOADING STATES --- */
.htmx-request { pointer-events: none !important; }
.htmx-request .results-container,
.htmx-request .saved-list {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

/* --- UTILITY: MISC --- */
.hidden { display: none !important; }

.content-header { padding: 32px 0 24px 0; }
.content-header > * { padding: 0 16px; }

.address-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--river-mid);
    margin-bottom: 24px;
    overflow: hidden;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--river-light);
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    color: var(--river-deep);
    border: none;
    white-space: nowrap;
}

/* Pill color variants */
.status-pill--success {
    background: #E6F4ED;
    color: #1A6B3A;
}
.status-pill--warning {
    background: #FEF3E2;
    color: #9A4E00;
}
.status-pill--info {
    background: #E5F0FA;
    color: #1A4E7A;
}
.status-pill--neutral {
    background: var(--river-light);
    color: var(--river-mid);
}

/* Vibe variants */
.status-pill--vibe-relaxed,
.status-pill--vibe-calm { background: #EAF4F0; color: #1A5C44; }
.status-pill--vibe-lively,
.status-pill--vibe-energetic,
.status-pill--vibe-party { background: #FDE8EF; color: #8B1A3A; }
.status-pill--vibe-educational { background: #E8EBF8; color: #2A3580; }
.status-pill--vibe-adventurous { background: #FEF0E0; color: #8B4000; }
.status-pill--vibe-family_friendly { background: #E6F4ED; color: #1A6B3A; }
.status-pill--vibe-romantic { background: #FCE8F5; color: #7A1A60; }

/* Pills row container */
.pills-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.pills-row::-webkit-scrollbar { display: none; }

.dot-open, .dot-closed {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.dot-open { background: var(--accent-safe); }
.dot-closed { background: var(--accent-alert); }

/* --- NAVIGATION / STICKY FOOTER --- */
.float-nav-container, .sticky-footer {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 440px;
    z-index: 100;
}

svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- COMPONENT: DISCOVERY PAGE --- */
.discovery-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    padding-bottom: 16px;
    border: none;
}

.location-bar {
    padding: 24px 16px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--river-deep);
    cursor: pointer;
}

.location-text {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-row {
    pointer-events: auto;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-pill {
    flex: 0 0 auto;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    background: var(--pebble-surface);
    color: var(--river-deep);
    font-size: 14px;
    font-weight: 800;
    border: none;
    box-shadow: var(--elevation-1);
    transition: var(--anim-press);
    cursor: pointer;
    user-select: none;
}

.filter-pill.active {
    background: var(--river-deep);
    color: white;
    box-shadow: var(--elevation-3);
}

.filter-pill:active { transform: scale(0.96); }

.duration-chip {
    flex: 0 0 auto;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    background: var(--river-light);
    border: none;
    color: var(--river-deep);
    font-size: 13px;
    font-weight: 800;
    transition: var(--transition-smooth);
}

.duration-chip.active {
    background: var(--river-deep);
    color: white;
}

.results-container {
    padding: 24px 0;
    min-height: 80vh;
}

/* Card Specific Styles (Magazine Grid) */
.result-card {
    background: var(--pebble-surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 0 16px 24px 16px;
    box-shadow: var(--elevation-2);
    border: none;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--anim-press);
}

.result-card:active {
    transform: scale(0.98);
    box-shadow: var(--elevation-1);
}

/* VISUALS & BADGES */
.card-visual {
    position: relative;
    height: 220px; /* Taller, more editorial image */
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: var(--river-light);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    background: var(--pebble-surface);
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 800;
    color: var(--river-deep);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
    box-shadow: var(--elevation-2);
    border: none;
}

.badge-duration { top: 12px; left: 12px; }
.badge-env { bottom: 12px; left: 12px; }

.badge-rating, .card-badge-bottom-right {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: var(--river-deep);
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: var(--elevation-3);
    z-index: 2;
}

.btn-heart {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--pebble-surface);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--anim-press);
    box-shadow: var(--elevation-2);
}

.btn-heart svg {
    width: 20px;
    height: 20px;
    stroke: var(--river-deep);
    stroke-width: 2;
}

.btn-heart.active svg {
    fill: var(--accent-heart);
    stroke: var(--accent-heart);
    border: none;
}

/* CONTENT */
.card-header-row {
    margin-bottom: 8px;
    padding: 0 4px;
}

.card-title {
    font-size: 22px;
    font-weight: 900;
    color: var(--river-deep);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.02em;
}

.card-meta-row {
    padding: 0 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: var(--river-mid);
    font-weight: 600;
}

.highlight-tag {
    color: var(--river-deep);
    font-weight: 800;
}

/* SURVIVAL ICONS ROW */
.survival-icon-row {
    display: flex;
    gap: 16px;
    padding: 16px 4px 4px 4px;
    margin-top: 16px;
    border-top: 1px solid var(--river-light); /* Kept one thin structural line */
}

.survival-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--river-mid);
    font-weight: 800;
}

.survival-icon svg { width: 18px; height: 18px; }
.survival-icon.confirmed { color: var(--accent-safe); }

/* FOOTER */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 12px 4px 4px 4px;
}

.vibe-text {
    font-size: 15px;
    font-weight: 800;
    color: var(--river-deep);
}

.suitability-dots { display: flex; gap: 6px; margin-top: 8px; }

.suitability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--river-light);
}
.suitability-dot.high { background-color: var(--accent-safe); }
.suitability-dot.med { background-color: var(--accent-safe); opacity: 0.3; }

/* --- ONBOARDING & SETTINGS SHARED --- */
.onboarding-screen, .settings-screen {
    background-color: var(--pebble-stone);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.settings-screen { padding: 24px 16px 140px 16px; }

.header-nav {
    padding: 40px 24px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-indicator { display: flex; gap: 8px; }

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--river-light);
    transition: var(--transition-smooth);
}

.step-dot.active {
    background: var(--river-deep);
    width: 24px;
    border-radius: var(--radius-pill);
}

.content-scroll {
    flex: 1;
    padding: 24px 24px 120px 24px;
    overflow-y: auto;
}

.subtitle {
    color: var(--river-mid);
    margin: 0 0 40px 0;
    font-size: 18px;
    line-height: 1.5;
    font-weight: 500;
}

.settings-section {
    background: var(--pebble-surface);
    border: none;
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    margin-bottom: 24px;
    box-shadow: var(--elevation-2);
}

.settings-section h2 {
    font-size: 22px;
    font-weight: 900;
    margin: 0 0 32px 0;
    color: var(--river-deep);
    display: flex;
    align-items: center;
    gap: 12px;
}

.input-group { margin-bottom: 24px; }
.input-group:last-child { margin-bottom: 0; }

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--river-deep);
}

/* Material filled inputs, no borders */
.input-pebble {
    width: 100%;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--river-light);
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 600;
    color: var(--river-deep);
    transition: var(--transition-smooth);
}

.input-pebble:focus {
    outline: none;
    background: var(--pebble-surface);
    box-shadow: var(--elevation-3);
}

.input-pebble.is-valid {
    background: #E4F1E8 !important;
    color: var(--accent-safe);
}

.location-feedback {
    margin-top: 16px;
    background: #E4F1E8;
    border: none;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-safe);
}

.privacy-box {
    display: flex;
    gap: 16px;
    background: var(--river-light);
    border: none;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-top: 16px;
    align-items: flex-start;
}

.privacy-icon { color: var(--river-mid); flex-shrink: 0; margin-top: 2px; }

.privacy-text {
    font-size: 14px;
    color: var(--river-mid);
    line-height: 1.5;
    margin: 0;
}

.privacy-text strong { color: var(--river-deep); font-weight: 800; }

.child-card {
    background: var(--river-light);
    border: none;
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
    position: relative;
}

.settings-screen .child-card {
    background: var(--pebble-stone);
    border: none;
}

.remove-child {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent-alert);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}

/* Material Segmented Control (Tonal) */
.toggle-container {
    display: flex;
    background: var(--river-light);
    padding: 6px;
    border-radius: var(--radius-pill);
    margin-bottom: 24px;
}

.settings-screen .toggle-container { background: var(--pebble-stone); }

.toggle-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px;
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 800;
    color: var(--river-mid);
    cursor: pointer;
    transition: var(--anim-press);
}

.toggle-btn.active {
    background: var(--pebble-surface);
    color: var(--river-deep);
    box-shadow: var(--elevation-1);
}

/* Toggle switch (Material) */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: var(--river-mid);
    border-radius: var(--radius-pill);
    transition: background 0.3s ease;
    flex-shrink: 0;
    pointer-events: none;
}
.toggle-switch.on { background: var(--river-deep); }
.toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
    box-shadow: var(--elevation-1);
}
.toggle-switch.on .toggle-knob { transform: translateX(24px); }

/* Indoor filter button */
.indoor-btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--river-light);
    border: none;
    border-radius: var(--radius-pill);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 800;
    color: var(--river-mid);
    cursor: pointer;
    user-select: none;
    transition: var(--transition-smooth);
    white-space: nowrap;
}
.indoor-btn.active {
    color: var(--pebble-surface);
    background: var(--river-deep);
    box-shadow: var(--elevation-2);
}
.indoor-btn:active { transform: scale(0.96); }

.email-display-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--river-light);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-weight: 700;
    border: none;
}

.zip-status-icon {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.sticky-footer-onboarding {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(to top, var(--pebble-stone) 60%, rgba(245,244,240,0));
    z-index: 100;
    max-width: 480px;
    margin: 0 auto;
}

.btn-onboarding-primary {
    width: 100%;
    background: var(--river-deep);
    color: white;
    border: none;
    padding: 22px;
    border-radius: var(--radius-pill);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    transition: var(--anim-press);
    box-shadow: var(--elevation-3);
}

.btn-onboarding-primary:active { transform: scale(0.96); box-shadow: var(--elevation-1); }

.btn-onboarding-secondary {
    width: 100%;
    background: var(--river-light); /* Solid tonal fill instead of border */
    color: var(--river-deep);
    border: none;
    padding: 20px;
    border-radius: var(--radius-pill);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: block;
    text-align: center;
    text-decoration: none;
    margin-top: 16px;
    transition: var(--anim-press);
}
.btn-onboarding-secondary:active { transform: scale(0.96); }

/* --- LIBRARY / BOOKMARKS --- */

.library-header {
    padding: 48px 24px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.library-screen h1 { margin: 0; font-size: 32px; }

.add-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--pebble-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--river-deep);
    border: none;
    box-shadow: var(--elevation-2);
    cursor: pointer;
    transition: var(--anim-press);
}

.add-btn:active { transform: scale(0.92); }

.section-title {
    padding: 0 24px;
    font-size: 14px;
    font-weight: 900;
    color: var(--river-deep);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
}

.scroll-container {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 8px 24px 40px 24px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.stack-card {
    flex: 0 0 200px;
    height: 260px; /* Taller editorial ratio */
    position: relative;
    border-radius: var(--radius-lg);
    overflow: visible;
    cursor: pointer;
    transition: var(--anim-press);
}

.stack-card:active { transform: scale(0.96); }

.stack-effect {
    position: absolute;
    inset: 0;
    background: var(--pebble-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--elevation-3);
    z-index: 2;
    overflow: hidden;
}

/* Material elevation stack */
.stack-card::before, .stack-card::after {
    content: '';
    position: absolute;
    background: var(--pebble-surface);
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--elevation-1);
    transition: var(--transition-smooth);
}

.stack-card::before {
    top: -12px; left: 12px; right: 12px; bottom: 12px;
    z-index: 1;
    opacity: 0.9;
}

.stack-card::after {
    top: -24px; left: 24px; right: 24px; bottom: 24px;
    z-index: 0;
    opacity: 0.6;
}

.stack-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stack-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(20,20,19,0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}

.stack-title {
    color: white;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.stack-count {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.smart-icon {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    background: var(--pebble-surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--river-deep);
    font-size: 18px;
    box-shadow: var(--elevation-2);
}

.filter-bar {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.saved-item {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--pebble-surface);
    border: none; /* No border */
    margin-bottom: 8px; /* Separated by space, not border */
    position: relative;
    transition: background 0.2s;
    cursor: pointer;
}

.saved-item:active { background: var(--river-light); }

.item-thumb {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-md);
    background: var(--river-light);
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: var(--elevation-1);
}

.item-img { width: 100%; height: 100%; object-fit: cover; }

.item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.item-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--river-deep);
    letter-spacing: -0.02em;
}

.item-context {
    font-size: 14px;
    font-weight: 700;
    color: var(--river-mid);
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-badge {
    font-size: 13px;
    font-weight: 900;
    color: var(--river-deep);
    background: var(--river-light);
    padding: 6px 10px;
    border-radius: 8px;
    border: none;
}

.empty-state {
    padding: 100px 24px;
    text-align: center;
    color: var(--river-mid);
    font-weight: 800;
    font-size: 18px;
}

/* --- GLOBAL BOOKMARK BUTTON (Floating Material Fab) --- */
.bookmark-btn {
    width: 48px;
    height: 48px;
    z-index: 10;
    background: var(--pebble-surface); /* Pure white fab */
    border: none;
    border-radius: 50%;
    box-shadow: var(--elevation-3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--anim-press);
    padding: 0;
    appearance: none;
    outline: none;
}

.bookmark-btn:active { transform: scale(0.9); box-shadow: var(--elevation-1); }

.bookmark-icon {
    width: 24px;
    height: 24px;
    stroke: var(--river-deep);
    stroke-width: 2.5px;
    fill: transparent;
    transition: all 0.3s ease;
}

.bookmark-btn.active {
    background: var(--pebble-surface);
}

.bookmark-btn.active .bookmark-icon {
    fill: var(--accent-heart);
    stroke: var(--accent-heart);
    animation: heartPop 0.4s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

/* --- NEARBY VIEW STYLES (Layered Native Map) --- */
.map-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: var(--pebble-stone);
    overflow: hidden;
}

#map { width: 100%; height: 100%; }

.map-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--anim-press);
}

.map-pin:hover, .map-pin:active {
    transform: scale(1.2);
    z-index: 20 !important;
}

.pin-bubble {
    width: 44px;
    height: 44px;
    background: var(--pin-color, var(--pebble-surface));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--elevation-3);
    border: 2px solid white;
    color: white;
    font-weight: 900;
}

.map-pin.selected { z-index: 30 !important; pointer-events: none !important; }
.map-pin.selected .pin-bubble {
    background: var(--pin-color, var(--river-deep));
    color: white;
    width: 52px;
    height: 52px;
    box-shadow: var(--elevation-4);
}

.user-location-marker {
    width: 24px;
    height: 24px;
    background: #0A58CA;
    border: 4px solid white;
    border-radius: 50%;
    box-shadow: var(--elevation-2);
}

.top-ui {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 24px 0;
    z-index: 50;
    background: linear-gradient(to bottom, rgba(245,244,240,0.95) 0%, rgba(245,244,240,0) 100%);
    pointer-events: none;
}

.search-bar {
    pointer-events: auto;
    background: var(--pebble-surface);
    border-radius: var(--radius-pill);
    padding: 16px 24px;
    box-shadow: var(--elevation-3);
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 16px 16px 16px;
    border: none; /* No border */
}

.search-input {
    border: none;
    background: transparent;
    flex: 1;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 800;
    color: var(--river-deep);
}
.search-input:focus { outline: none; }

.bottom-sheet {
    position: absolute;
    bottom: 120px; /* Pushed up slightly to hover cleanly over nav */
    left: 16px;
    right: 16px;
    background: var(--pebble-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--elevation-4);
    border: none;
    z-index: 60;
    animation: slideUp 0.4s cubic-bezier(0.2, 0, 0, 1);
    display: none;
}

.bottom-sheet.open { display: block; }

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.place-title {
    font-size: 24px;
    font-weight: 900;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.place-meta {
    font-size: 15px;
    font-weight: 700;
    color: var(--river-mid);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-check {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-safe);
}

.navigate-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--river-deep);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--elevation-3);
    border: none;
    cursor: pointer;
    transition: var(--anim-press);
}

.navigate-btn:active { transform: scale(0.9); }

.sheet-amenities {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-top: 20px;
    border-top: 1px solid var(--river-light); /* Clean divider */
    scrollbar-width: none;
}

.amenity-tag {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    color: var(--river-deep);
    background: var(--river-light); /* Tonal fill, no border */
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: none;
}



/* --- NEW: Rainy Day Badge (Card, bottom-left) --- */
.badge-rainy {
    bottom: 12px;
    left: 12px;
    background: var(--river-light);
    color: var(--river-deep);
    box-shadow: var(--elevation-1);
    border: none;
}

.rainy-ok {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

/* --- NEW: Reservation Warning (Card) --- */
.survival-icon.reservation-warn {
    color: var(--accent-warning);
    font-weight: 800;
}

/* --- NEW: Reservation Banner (Detail) --- */
.reservation-banner {
    background: rgba(255, 152, 0, 0.06);
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 16px 24px 16px;
    font-size: 14px;
    color: var(--river-deep);
    line-height: 1.6;
    box-shadow: var(--elevation-1);
}

.reservation-banner svg {
    flex-shrink: 0;
    color: var(--accent-warning);
}

/* --- NEW: Season Icons (Detail) --- */
.season-row {
    display: flex;
    gap: 16px;
    align-items: center;
}

.season-icon {
    font-size: 1.4rem;
    opacity: 0.2;
    transition: opacity 0.2s;
}

.season-icon.active {
    opacity: 1;
}

/* --- NEW: Pro Tip Card (Detail) --- */
.pro-tip-card {
    background: rgba(255, 193, 7, 0.05) !important;
    border: none !important;
    box-shadow: var(--elevation-1) !important;
}

.pro-tip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--river-deep);
}

.pro-tip-header svg {
    color: #f59e0b;
    flex-shrink: 0;
}

/* --- NEW: Amenity Tags (Nearby Bottom Sheet) --- */
.amenity-rainy {
    background: rgba(100, 130, 160, 0.1) !important;
    color: #4a7c9e !important;
    font-weight: 800;
}

.amenity-reservation {
    background: rgba(255, 152, 0, 0.08) !important;
    color: #e67e00 !important;
    font-weight: 800;
}

/* --- LAYER 4: NAVBAR (Material Floating Nav) --- */
.pebble-nav {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 320px;
    height: 80px;
    background: var(--pebble-surface); /* Solid pure white */
    border-radius: var(--radius-pill);
    border: none; /* No border */
    box-shadow: var(--elevation-4); /* Heavy float shadow */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 64px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    color: var(--river-mid);
    transition: var(--transition-smooth);
}

.nav-tab.active { color: var(--river-deep); font-weight: 900; }
.nav-tab:active { background: var(--river-light); } /* Tonal press */

.nav-utility-btn {
    width: 64px;
    height: 64px;
    background: var(--river-deep);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--elevation-3);
    transform: translateY(-25%);
    border: none; /* Completely borderless */
    transition: var(--anim-press);
}

.nav-utility-btn:active { transform: translateY(-15%) scale(0.92); box-shadow: var(--elevation-1); }