/* mtl.beer styles — Metro-inspired, Google Maps clean */
/* SECTION:VARIABLES */
:root {
    --blue:       #0065BD;
    --blue-dark:  #004F94;
    --blue-light: #E8F1FB;
    --white:      #FFFFFF;
    --surface:    #FFFFFF;
    --bg:         #F8F9FA;
    --text:       #202124;
    --text-muted: #5F6368;
    --border:     #E8EAED;
    --shadow-sm:  0 1px 4px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.08);
    --shadow-lg:  0 8px 24px rgba(0,0,0,0.15), 0 4px 8px rgba(0,0,0,0.08);
    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  20px;
    --radius-pill:100px;
    --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --nav-h:      64px;
    --search-h:   56px;
    --chips-h:    44px;
    --open-green: #188038;
    --closed-red: #D93025;
    --amber:      #F29900;
    --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}
/* SECTION:RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    height: 100%; width: 100%;
    font-family: var(--font);
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

/* SECTION:LAYOUT */
#map {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
/* Leaflet attribution */
.leaflet-control-attribution { font-size: 10px !important; }
/* SECTION:SEARCH */
.mobile-search-bar {
    position: fixed;
    top: 12px;
    left: 12px; right: 12px;
    z-index: 400;
    filter: drop-shadow(var(--shadow-md));
}
.search-bar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border-radius: var(--radius-pill);
    padding: 0 14px;
    height: var(--search-h);
}
.lang-toggle-btn {
    font-size: 11px;
    font-weight: 700;
    color: var(--blue);
    background: var(--blue-light);
    border-radius: var(--radius-pill);
    padding: 4px 8px;
    flex-shrink: 0;
    transition: background var(--transition), color var(--transition);
}
.lang-toggle-btn:hover { background: var(--blue); color: var(--white); }
.search-icon { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.search-input {
    flex: 1;
    border: none;
    outline: none;
    font: 500 15px/1 var(--font);
    color: var(--text);
    background: transparent;
    min-width: 0;
}
.search-input::placeholder { color: var(--text-muted); }
.search-clear {
    font-size: 14px;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 50%;
    transition: background var(--transition);
}
.search-clear:hover { background: var(--border); }
.search-results {
    list-style: none;
    background: var(--surface);
    border-radius: var(--radius-md);
    margin-top: 6px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transition: background var(--transition);
}
.search-result-item:hover { background: var(--bg); }
.search-result-item .result-icon { font-size: 18px; }
.search-result-item .result-name { font-weight: 600; color: var(--text); }
.search-result-item .result-sub { font-size: 12px; color: var(--text-muted); }

/* SECTION:CHIPS */
.filter-chips-bar {
    position: fixed;
    top: calc(12px + var(--search-h) + 8px);
    left: 0; right: 0;
    z-index: 399;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    height: var(--chips-h);
}
.filter-chips-bar::-webkit-scrollbar { display: none; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font: 500 13px/1 var(--font);
    color: var(--text);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    flex-shrink: 0;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
    border: 1.5px solid transparent;
}
.chip:hover { box-shadow: var(--shadow-md); }
.chip.active {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue-dark);
}
.chip-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.open-dot { background: var(--open-green); }
.chip.active .open-dot { background: rgba(255,255,255,0.9); }
.chip-separator { width: 1px; height: 20px; background: var(--border); flex-shrink: 0; }
#neighbourhood-chips { display: contents; }
/* SECTION:MAP */
/* SECTION:PANELS */
/* SECTION:NAV */
/* SECTION:CARDS */
/* SECTION:DARK */
/* SECTION:DESKTOP */

/* SECTION:MAP — custom markers */
.beer-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 44px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    cursor: pointer;
    transition: transform 0.15s ease;
}
.beer-marker:hover { transform: scale(1.15); }
.beer-marker svg { width: 36px; height: 44px; }
.beer-marker.open .pin-body { fill: var(--blue); }
.beer-marker.closed .pin-body { fill: #9AA0A6; }

/* Locate button */
.locate-btn {
    position: fixed;
    bottom: calc(var(--nav-h) + 16px);
    right: 16px;
    z-index: 350;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), box-shadow var(--transition);
    color: var(--blue);
}
.locate-btn:hover { background: var(--blue-light); box-shadow: var(--shadow-lg); }
.locate-btn svg { width: 22px; height: 22px; }

/* SECTION:PANELS */
.venue-panel {
    position: fixed;
    bottom: var(--nav-h);
    left: 0; right: 0;
    z-index: 500;
    background: var(--surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    max-height: 80vh;
    overflow-y: auto;
    transition: transform var(--transition);
    transform: translateY(0);
}
.venue-panel.hidden { transform: translateY(105%); display: block !important; pointer-events: none; }
.venue-panel-handle {
    width: 40px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 12px auto 0;
    cursor: pointer;
}
.venue-panel-content { padding: 16px 20px 24px; }

/* Venue card inside panel */
.venue-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.venue-title { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.3; flex: 1; }
.venue-close-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition);
}
.venue-close-btn:hover { background: var(--border); }
.venue-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font: 600 12px/1 var(--font);
    margin-bottom: 10px;
}
.badge-open { background: #E6F4EA; color: var(--open-green); }
.badge-closed { background: #FCE8E6; color: var(--closed-red); }
.badge-neighbourhood {
    background: var(--blue-light);
    color: var(--blue-dark);
    margin-left: 6px;
}
.venue-address { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.venue-styles { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.style-tag {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px; font-weight: 500;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}
.venue-features { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; font-size: 13px; color: var(--text-muted); }
.venue-feature { display: flex; align-items: center; gap: 4px; }
.venue-description { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin-bottom: 16px; }
.venue-hours { margin-bottom: 16px; }
.venue-hours-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.hours-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); padding: 2px 0; }
.hours-row.today { color: var(--text); font-weight: 600; }
.venue-actions { display: flex; gap: 10px; }
.btn-action {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font: 600 14px/1 var(--font);
    text-align: center;
    transition: background var(--transition), box-shadow var(--transition);
}
.btn-primary-action {
    background: var(--blue);
    color: var(--white);
}
.btn-primary-action:hover { background: var(--blue-dark); }
.btn-secondary-action {
    background: var(--blue-light);
    color: var(--blue-dark);
}
.btn-secondary-action:hover { background: var(--border); }

/* Nearby panel — venue list items */
.nearby-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.nearby-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition);
    border-radius: var(--radius-sm);
}
.nearby-item:last-child { border-bottom: none; }
.nearby-item:hover { background: var(--bg); padding-left: 8px; padding-right: 8px; }
.nearby-pin { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; background: var(--blue-light); }
.nearby-info { flex: 1; min-width: 0; }
.nearby-name { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nearby-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.nearby-dist { font-size: 13px; font-weight: 600; color: var(--blue); flex-shrink: 0; }

/* SECTION:NAV */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 600;
    height: var(--nav-h);
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -1px 8px rgba(0,0,0,0.08);
}
.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}
.nav-tab svg { width: 22px; height: 22px; }
.nav-tab.active { color: var(--blue); }
.nav-tab:hover { color: var(--blue); background: var(--blue-light); }

/* SECTION:CARDS — List panel */
.list-panel {
    position: fixed;
    bottom: var(--nav-h);
    left: 0; right: 0;
    z-index: 550;
    background: var(--surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition);
}
.list-panel.hidden { transform: translateY(105%); display: flex !important; pointer-events: none; }
.list-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.list-panel-header h2 { font-size: 17px; font-weight: 700; }
.list-close-btn {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.list-close-btn:hover { background: var(--border); }
.list-panel-items { overflow-y: auto; padding: 8px 0 16px; flex: 1; }
.list-venue-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background var(--transition);
}
.list-venue-item:hover { background: var(--bg); }
.list-venue-pin {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--blue);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.list-venue-info { flex: 1; min-width: 0; }
.list-venue-name { font-size: 15px; font-weight: 600; color: var(--text); }
.list-venue-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.list-venue-status {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    flex-shrink: 0;
}
.status-open { background: #E6F4EA; color: var(--open-green); }
.status-closed { background: #FCE8E6; color: var(--closed-red); }

/* Toast */
.toast {
    position: fixed;
    bottom: calc(var(--nav-h) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 700;
    background: #333;
    color: var(--white);
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s;
    pointer-events: none;
}
.toast.hidden { opacity: 0; }

/* Loading */
.loading {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 800;
}
.loading-spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* SECTION:DARK */
.dark-mode {
    --surface:    #1C1C1E;
    --bg:         #2C2C2E;
    --text:       #F2F2F7;
    --text-muted: #8E8E93;
    --border:     #3A3A3C;
    --blue-light: #1C2E4A;
    --shadow-sm:  0 1px 4px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.3);
    --shadow-lg:  0 8px 24px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.3);
}

/* SECTION:DESKTOP */
@media (min-width: 768px) {
    .mobile-bottom-nav { display: none; }
    .locate-btn { bottom: 24px; right: 24px; }
    #mobile-search-bar {
        top: 16px;
        left: 16px;
        right: auto;
        width: 380px;
    }
    .filter-chips-bar {
        top: auto;
        bottom: 24px;
        left: 16px;
        right: auto;
        width: 380px;
        height: auto;
        flex-wrap: wrap;
        background: var(--surface);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-md);
        padding: 10px 12px;
    }
    .venue-panel {
        top: 0; bottom: 0;
        left: 0; right: auto;
        width: 400px;
        border-radius: 0;
        max-height: 100vh;
        box-shadow: 4px 0 20px rgba(0,0,0,0.12);
    }
    .venue-panel.hidden { transform: translateX(-105%); }
    .venue-panel-handle { display: none; }
    #nearby-panel {
        top: 0; bottom: 0;
        left: 0; right: auto;
        width: 400px;
        border-radius: 0;
        max-height: 100vh;
    }
    #nearby-panel.hidden { transform: translateX(-105%); }
    .list-panel {
        top: 0; bottom: 0;
        left: 0; right: auto;
        width: 400px;
        border-radius: 0;
        max-height: 100vh;
    }
    .list-panel.hidden { transform: translateX(-105%); }
    #map { left: 0; } /* map always full width on desktop, panels overlay */
}
