:root {
    --primary-color: #FF8C00;
    --accent-color: #0087BD; /* Visit Harghita brand blue for Open Farm (#0087BD) */
    --event-color: #9C27B0; /* Purple for events */
    --route-color: #2D5A27; /* Routes green (#2D5A27) */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --text-main: #333;
    --text-muted: #666;
    --radius-lg: 20px;
    --radius-md: 12px;
    --font-main: 'Inter', sans-serif;
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    font-family: var(--font-main);
    color: var(--text-main);
    touch-action: none; 
    background: #000 !important; /* A sötét háttér elnyeli az esetleges 1-2 sub-pixelnyi böngésző-lecsúszást */
}

/* Pseudo-fullscreen fallback */
.pseudo-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
}

#map {
    position: absolute;
    top: 0;
    bottom: -45px; /* Növeltük 45px-re, hogy telefonon biztosan túlnyúljon a kijelző alján */
    width: 100%;
    height: calc(100% + 45px);
    background: #63605e; /* Match county map background color */
    overscroll-behavior: none;
    touch-action: manipulation; /* Allows zoom and pan, but discourages special gestures */
}

/* Splash Screen Loader Overlay */
#splash-screen {
    position: fixed;
    top: -1px;
    left: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    background: #63605e; /* Rich matching gray-brown */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: auto;
    will-change: opacity, visibility; /* GPU acceleration to prevent stutter */
}

#splash-screen.splash-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: splashGrow 8s forwards cubic-bezier(0.1, 0.8, 0.3, 1);
}

.splash-logo {
    max-width: 220px;
    width: 50vw;
    height: auto;
    object-fit: contain;
}

@keyframes splashGrow {
    0% {
        transform: scale(0.96);
        opacity: 0.85;
    }
    100% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* Alkalmazzuk a szemkímélő tompítást KIZÁRÓLAG a térkép canvas-re.
   Ez nem hoz létre stacking context-et az overlayeknek, így az üveghatás (blur) tökéletesen működik! */
#map .mapboxgl-canvas {
    filter: brightness(0.85) contrast(1.2);
}

/* A Mapbox és az OpenStreetMap logók/szerzői jogi feliratok prémium, 
   visszafogott stílusú megjelenítése a jogi megfelelőség érdekében. 
   Mivel a #map konténer -45px-el túlnyúlik a képernyő alján, a vezérlőket 
   49px-el toljuk feljebb, hogy pontosan 4px-el a látható képernyő alja felett jelenjenek meg. */
.mapboxgl-ctrl-logo,
.maplibregl-ctrl-logo {
    position: absolute !important;
    bottom: 41px !important;
    left: 0px !important;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    transform: scale(0.85);
    transform-origin: bottom left;
    z-index: 10;
}
.mapboxgl-ctrl-logo:hover,
.maplibregl-ctrl-logo:hover {
    opacity: 0.9;
}
.custom-map-attribution {
    position: absolute !important;
    bottom: 4px !important;
    right: 8px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0.6;
    font-size: 10px !important;
    font-family: 'Outfit', sans-serif !important;
    transition: opacity 0.2s ease;
    z-index: 30;
    pointer-events: auto !important;
    text-align: right !important; /* Jobbra igazított sorok */
    line-height: 1.3 !important; /* Tisztán olvasható sorköz */
    color: rgba(255, 255, 255, 0.6) !important; /* Világos, áttetsző fehér szöveg */
}
.custom-map-attribution:hover {
    opacity: 0.95;
}
.custom-map-attribution a {
    color: rgba(255, 255, 255, 0.6) !important; /* Világos, áttetsző fehér linkek */
    text-decoration: none !important;
    display: inline !important;
    white-space: nowrap !important;
    transition: color 0.2s ease;
}
.custom-map-attribution a:hover {
    color: #ffffff !important; /* Teljesen fehér kiemelés hover-re */
    text-decoration: underline !important;
}


/* UI Overlay General */
#ui-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2000;
}

#ui-container > * {
    pointer-events: auto;
}

/* Glassmorphism Utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Left Main Control Sidebar Area */
.left-panels {
    position: absolute;
    top: 25px;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    pointer-events: none !important; /* !important needed to override #ui-container > * specificity */
    z-index: 30;
}

.left-panels > * {
    pointer-events: auto;
}

/* Expandable Search */
.search-wrapper {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 45px;
    height: 45px;
    overflow: hidden;
    pointer-events: none; /* Wrapper is transparent – only children get clicks */
}

.search-wrapper:hover {
    overflow: visible !important; /* Allow the trigger tooltip to float outside without clipping */
}

.search-wrapper.expanded {
    width: 300px;
    overflow: visible;
}

.search-box {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    border-radius: 25px 0 0 25px;
    padding: 0 5px;
    position: relative;
    background: var(--glass-bg);
    pointer-events: auto; /* Only the actual box captures clicks */
}

.search-box.active-filter {
    background: rgba(255, 246, 235, 0.88) !important;
    border: 1px solid rgba(255, 140, 0, 0.45) !important;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.15) !important;
}

.search-count-badge {
    position: absolute;
    top: 2px;
    left: -4px; /* Float on top-left of the search box */
    background: #e58200;
    color: white;
    font-size: 11px;
    font-weight: bold;
    border-radius: 10px;
    padding: 3px 8px;
    min-width: 14px;
    text-align: center;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 10px 45px 10px 15px; /* Adjust padding for right trigger */
    width: 100%;
    font-size: 15px;
    outline: none;
    opacity: 0;
    transition: opacity 0.3s;
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
}

.search-wrapper.expanded .search-box input {
    opacity: 1;
}

.search-trigger {
    position: absolute;
    right: 0; /* Move to right for the right-side control panel */
    top: 0;
    width: 45px;
    height: 45px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    color: var(--text-main);
}

.search-close {
    position: absolute;
    right: 42px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    z-index: 3;
    transition: color 0.2s;
}

.search-close:hover {
    color: var(--primary-color);
}

.search-close.hidden {
    display: none !important;
}

/* Right Controls */
.right-controls {
    position: absolute;
    top: 25px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
    pointer-events: none !important; /* !important needed to override #ui-container > * specificity */
    z-index: 40; /* Set above .left-panels (30) so expanded search doesn't go behind the sidebar on small screens */
}

.right-controls > *:not(.search-wrapper) {
    pointer-events: auto; /* Buttons are clickable */
}

.glass-btn {
    border-radius: 25px 0 0 25px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    border-right: none;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-main);
}

.mapboxgl-ctrl-group, .maplibregl-ctrl-group {
    border-radius: 25px 0 0 25px !important;
    border-right: none !important;
    overflow: hidden;
}
.mapboxgl-ctrl-group button, .maplibregl-ctrl-group button {
    border-radius: 0 !important;
}

.glass-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.9);
}

/* Left Sidebar */
.left-sidebar {
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
}

.category-group {
    display: flex;
    flex-direction: column;
    padding: 8px;
    border-radius: 0 30px 30px 0;
    gap: 10px;
    position: relative;
}




/* Integrated Toggle Button */
.toggle-btn-integrated {
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.toggle-btn-integrated:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.cat-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Icon stays left on expand, not re-centered */
    gap: 12px;
    padding: 1px 10px 1px 1px;
    border: none;
    background: transparent;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 48px;
    min-height: 48px;
    color: white;
    box-sizing: border-box;
}

.cat-btn .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cat-btn .btn-icon img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    display: block;
}

.cat-btn .btn-text {
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.2px;
    white-space: nowrap;
    text-transform: none; /* Changed from uppercase/default */
    padding-top: 0;
    padding-right: 5px;
    margin-left: -3px; /* tuned gap between icon and label */
    align-self: center;
}

.cat-btn[data-category="butterfly"] { background: var(--primary-color); }
.cat-btn[data-category="farms"] { background: var(--accent-color); }
.cat-btn[data-category="events"] { background: var(--event-color); }
.cat-btn[data-category="routes"] { background: var(--route-color); }

/* Collapsed Sidebar State */
.left-sidebar.collapsed .cat-btn {
    padding: 1px;
    min-width: 48px;
    width: 48px;
    justify-content: center; /* Center icon when no text */
}

.left-sidebar.collapsed .btn-text {
    display: none;
    opacity: 0;
}

.left-sidebar.collapsed .toggle-btn-integrated svg {
    /* Arrow will be flipped in JS, but we can also use CSS rotation */
}

.cat-btn:not(.active) {
    background: #ccc !important;
    opacity: 0.5;
}

.map-controls {
    display: flex;
    flex-direction: column;
    padding: 6px;
    border-radius: 25px 0 0 25px;
    border-right: none;
    width: 45px;
    gap: 4px;
    align-items: center;
}

.map-controls button {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.map-controls button:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.05);
}

/* Right Menu Panel (replaces Bottom Panel) */
.right-menu-panel {
    display: flex;
    flex-direction: column;
    padding: 6px;
    border-radius: 25px 0 0 25px;
    border-right: none;
    width: 45px;
    gap: 12px;
    align-items: center;
    pointer-events: auto;
    overflow: visible !important;
}

.right-menu-panel .panel-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-main);
    transition: background 0.2s, transform 0.2s;
    position: relative;
    overflow: visible !important;
}

.right-menu-panel .panel-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.05);
    border-radius: 50%;
}

.right-menu-panel .panel-btn svg {
    opacity: 0.8;
}

.right-menu-panel .panel-btn.active svg {
    opacity: 1;
    fill: #e91e63;
    stroke: #e91e63;
}

.settings-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fav-badge-count {
    position: absolute;
    top: -5px;
    left: -6px;
    right: auto;
    background: #176CA1;
    color: white;
    font-size: 11px;
    font-weight: bold;
    border-radius: 10px;
    padding: 3px 8px;
    min-width: 14px;
    text-align: center;
    pointer-events: none;
    display: inline-block;
    font-family: sans-serif;
    line-height: 1;
    z-index: 10;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
}

.route-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    text-align: left;
}

.route-item:last-child {
    border-bottom: none;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.hidden {
    display: none;
}

.modal-content {
    padding: 30px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

#settings-modal h3 {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    margin-bottom: 20px;
    font-size: 22px;
}

#settings-modal label {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 16px;
    display: block;
}

.lang-selector {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 20px;
}

.lang-btn {
    flex: 1;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: white;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 15px;
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.close-modal {
    margin-top: 20px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    background: #eee;
    cursor: pointer;
}

/* Admin Login Modal */
.admin-login-card {
    text-align: center;
    max-width: 340px;
    width: 90%;
}

.admin-login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.admin-login-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.admin-login-error {
    color: #e53935;
    font-size: 13px;
    min-height: 18px;
    margin-top: 6px;
}

.admin-login-card .field {
    text-align: left;
    margin-bottom: 10px;
}

/* Admin Logout Button */
.admin-logout-btn {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(229, 57, 53, 0.9);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: background 0.2s;
}

.admin-logout-btn:hover {
    background: rgba(198, 40, 40, 0.95);
}

/* Map Popups */

.poi-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.poi-info {
    padding: 15px;
}

.poi-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 18px;
}

.poi-cat {
    font-size: 12px;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 10px;
}

.poi-actions {
    display: flex;
    gap: 10px;
}

.poi-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: opacity 0.2s;
}

.btn-details { background: var(--primary-color); color: white; }
.btn-nav { background: #333; color: white; }

/* Custom POI Popup Design */
div.mapboxgl-popup {
    z-index: 3000 !important; /* Place popups completely above UI overlay buttons (z-index: 2000) */
    width: auto !important; /* Don't let Mapbox force a width */
}

div.mapboxgl-popup-content {
    border-radius: 25px !important;
    padding: 0 !important;
    box-shadow: var(--glass-shadow) !important;
    border: 1px solid var(--glass-border) !important;
    background: var(--glass-bg) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    overflow: visible !important; /* Badge can overlap */
    width: auto !important;
}

.mapboxgl-popup-tip {
    display: none !important; /* Hide the tip for a cleaner mobile look like in the photo */
}

.poi-popup-card {
    width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-bottom: 15px;
    overflow: hidden; /* Clip image to card border-radius */
    border-radius: 25px;
}

/* Kategória-szín: a poi-popup-card elemre kerülő cat-* módosító osztály állítja be.
   Ha nincs ilyen osztály, --primary-color (narancs) az alapértelmezett.
   Ugyanezt a mintát használja a mobil .bottom-sheet is. */
.poi-popup-card.cat-butterfly { --cat-color: var(--primary-color); }
.poi-popup-card.cat-farms     { --cat-color: var(--accent-color); }
.poi-popup-card.cat-events    { --cat-color: var(--event-color); }
.poi-popup-card.cat-routes    { --cat-color: var(--route-color); }

/* Override overflow for the favorite button to still peek out */
.poi-popup-card .btn-favorite {
    overflow: visible;
}

.poi-popup-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
}

/* A korábbi kategória-ikon (poi-popup-badge) mostantól nem jelenik meg —
   a szívecske vette át a helyét, lásd .btn-favorite lejjebb. */
.poi-popup-badge { display: none !important; }

.poi-popup-info {
    margin-top: 30px;
    text-align: center;
    width: 100%;
    padding: 0 15px;
}

.poi-popup-name {
    font-family: 'Oswald', sans-serif;
    font-size: 21px;
    font-weight: 400;
    color: #333;
    margin-bottom: 8px; /* Slightly reduced to fit address */
    line-height: 1.2;
    text-transform: none; /* Use traditional casing or as provided in data */
}

.poi-popup-address {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: #666;
    margin-bottom: 15px !important;
    line-height: 1.2;
}

/* A szívecske most a kép alján, középen ül (ahol korábban a kategória-ikon volt).
   Nincs kitöltött háttérszín — fehér alap + kategória-színű, 3px vastag keret. */
.btn-favorite {
    position: absolute;
    top: 129px; /* Ugyanaz a pozíció, ahol korábban a .poi-popup-badge overlappelt */
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 3;
    transition: all 0.2s;
    color: var(--cat-color, var(--primary-color)); /* A szív körvonala a kategória színét veszi fel */
}

.btn-favorite:hover {
    transform: translateX(-50%) scale(1.05);
}

.btn-favorite.active svg {
    fill: var(--cat-color, var(--primary-color)); /* Aktív állapotban ugyanerre a színre töltődik ki */
}

.poi-popup-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
    /* No extra padding — parent .poi-popup-info already has padding: 0 15px */
}

/* Gombok: nincs tömör (lila/zöld) kitöltés — fehér alap, kategória-színű, 2px
   keret, a szöveg/ikon is a kategória-színt veszi fel. Hoverkor telítődik. */
.poi-popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 25px;
    background: #fff;
    border: 2px solid var(--cat-color, var(--primary-color));
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: var(--cat-color, var(--primary-color));
    transition: transform 0.2s, background 0.2s, color 0.2s;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-transform: none;
    line-height: normal; /* change line-height from 1 to normal for better flex vertical alignment */
    /* Saját compositing réteg — a mögötte lévő .glass (backdrop-filter) blur
       újraszámítása nélkül fut a hover-átmenet, ez szünteti meg a villogást. */
    will-change: background-color, color;
    transform: translateZ(0);
}

.poi-popup-btn:hover {
    background: var(--cat-color, var(--primary-color));
    color: #fff;
}

.poi-popup-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.poi-popup-btn:active {
    transform: translateZ(0) scale(0.95);
}

.poi-popup-btn svg {
    width: 20px;
    height: 20px;
}

/* Admin Panel Styles */
.admin-fields {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.field input, .field select, .field textarea {
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0,0,0,0.1);
    font-family: inherit;
}

.field textarea {
    height: 80px;
    resize: none;
}

.coords {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.admin-actions button {
    flex: 1;
    margin-top: 0 !important;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom Markers */
.custom-marker {
    background: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 2px solid white;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-marker:hover {
    transform: scale(1.2) translateY(-5px);
    z-index: 100;
}

.marker-butterfly { background: var(--primary-color); border-color: #fff; }
.marker-farms { background: var(--accent-color); border-color: #fff; }
.marker-events { background: var(--event-color); border-color: #fff; }
.marker-routes { background: var(--route-color); border-color: #fff; }

.mapboxgl-popup {
    z-index: 200;
}

/* Hover Tooltip Styling */
.poi-hover-tooltip div.mapboxgl-popup-content {
    background: rgba(19, 16, 14, 0.45) !important; /* Transparent splash color (#63605e) */
    backdrop-filter: blur(6px) !important; /* 6px glass blur */
    -webkit-backdrop-filter: blur(6px) !important;
    color: #ffffff !important;
    padding: 6px 12px !important; /* Slightly increased padding for larger text */
    border-radius: 12px !important; /* Elegant rounded corner */
    font-family: 'Oswald', sans-serif !important;
    font-weight: 300 !important; /* 300 vékony, elegáns betű */
    font-size: 14px !important; /* Increased font size */
    letter-spacing: 0.5px !important; /* Added subtle letter-spacing for premium readability */
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.80) !important; /* Premium 1px white border with high opacity */
    max-width: 280px !important;
    text-align: center !important;
    overflow: visible !important;
    margin: 0 !important;
}

.poi-hover-tooltip .mapboxgl-popup-tip {
    display: none !important; /* Hide the arrow pointer (hegy) completely as requested */
}

.hover-label {
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
    font-weight: 300 !important;
    letter-spacing: 0.5px !important;
}

/* Custom Category & Control Buttons Tooltip (PC only) */
@media (min-width: 769px) {
    /* 1. Left-aligned tooltips (slide out to the right for left sidebar) */
    .left-sidebar.collapsed .cat-btn {
        position: relative;
    }

    .left-sidebar.collapsed .cat-btn::after {
        content: attr(data-tooltip);
        position: absolute;
        left: calc(100% + 15px);
        top: 50%;
        transform: translateY(-50%) scale(0.9);
        background: rgba(19, 16, 14, 0.65);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        color: #ffffff;
        padding: 6px 12px;
        border-radius: 12px;
        font-family: 'Oswald', sans-serif;
        font-weight: 300;
        font-size: 14px;
        letter-spacing: 0.5px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.20);
        border: 1px solid rgba(255, 255, 255, 0.15);
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s ease, transform 0.2s ease;
        z-index: 999;
    }

    .left-sidebar.collapsed .cat-btn:hover::after {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }

    /* 2. Right-aligned tooltips (slide out to the left for right-side control buttons) */
    .glass-btn,
    .map-controls button,
    .right-menu-panel .panel-btn {
        position: relative;
    }

    .glass-btn::after,
    .map-controls button::after,
    .right-menu-panel .panel-btn::after,
    .search-trigger::after {
        content: attr(data-tooltip);
        position: absolute;
        right: calc(100% + 15px);
        left: auto;
        top: 50%;
        transform: translateY(-50%) scale(0.9);
        background: rgba(19, 16, 14, 0.65);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        color: #ffffff;
        padding: 6px 12px;
        border-radius: 12px;
        font-family: 'Oswald', sans-serif;
        font-weight: 300;
        font-size: 14px;
        letter-spacing: 0.5px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.20);
        border: 1px solid rgba(255, 255, 255, 0.15);
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s ease, transform 0.2s ease;
        z-index: 999;
    }

    .glass-btn:hover::after,
    .map-controls button:hover::after,
    .right-menu-panel .panel-btn:hover::after,
    .search-trigger:hover::after {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }

    /* Hide the search tooltip when the search bar is expanded/open */
    .search-wrapper.expanded .search-trigger::after {
        display: none !important;
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .left-panels { top: 20px; left: 0; overflow: visible; }
    .right-controls { top: 20px; right: 0; }
    
    .left-sidebar { width: auto; }

    /* Tighter panel container — 25px radius matches the button arc on mobile */
    .category-group {
        gap: 6px;
        padding: 5px;
        border-radius: 0 25px 25px 0;
    }

    /* Smaller icons on mobile */
    .cat-btn .btn-icon img {
        width: 40px;
        height: 40px;
    }

    /* Collapsed: icon fills button exactly, no padding offset */
    .left-sidebar.collapsed .cat-btn {
        min-width: 40px;
        min-height: 40px;
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: flex-start;
        border-radius: 50%;
    }

    /* Expanded: same left alignment as collapsed so icon doesn't jump */
    .left-sidebar:not(.collapsed) .cat-btn {
        min-width: 40px;
        min-height: 40px;
        padding: 0 10px 0 0;
        height: 40px;
        justify-content: flex-start;
        gap: 8px;
    }
    .left-sidebar:not(.collapsed) .cat-btn .btn-text {
        display: inline-block;
        font-size: 13px;
    }
    
    /* Popup responsive: don't overflow small screens */
    .poi-popup-card {
        width: min(260px, calc(100vw - 40px));
    }

    .right-menu-panel {
        width: 40px;
        padding: 5px;
        gap: 8px;
    }
    .right-menu-panel .panel-btn {
        width: 30px;
        height: 30px;
    }
    .right-menu-panel .panel-btn svg {
        width: 18px !important;
        height: 18px !important;
    }
    .lang-dropdown {
        right: 43px;
    }
    .brand-buttons-container {
        bottom: 15px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        gap: 12px !important;
    }
    .brand-btn img {
        width: 130px !important;
        height: auto !important;
    }
    .glass-btn { width: 40px; height: 40px; }
    .glass-btn svg { width: 18px !important; height: 18px !important; }
    .map-controls { width: 40px; padding: 5px; }
    .map-controls button { width: 30px; height: 30px; font-size: 16px; }
    .map-controls button svg { width: 16px !important; height: 16px !important; }
    .search-wrapper { width: 40px; height: 40px; }
    .search-trigger { width: 40px; height: 40px; }
    .search-trigger svg { width: 18px !important; height: 18px !important; }
    .search-box input { padding: 8px 40px 8px 12px; font-size: 13px; }
    .search-close { right: 38px; }
    .search-wrapper.expanded {
        width: calc(100vw - 110px) !important;
        max-width: 260px;
    }
}

/* Route Modal Custom Styles */
#routes-modal .modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    font-family: 'Oswald', sans-serif;
    max-width: 500px; /* Slightly wider for horizontal layout */
    width: 95%;
}

#routes-modal h3 {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    margin-bottom: 20px;
    font-size: 22px;
}

.route-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 5px;
}

.route-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px; /* Gap between box and button */
    padding: 0;
    background: transparent !important;
    width: 100%;
}

.route-info-box {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 30px;
    background: #f0f0f0;
    border-radius: var(--radius-md);
    transition: all 0.30s ease;
    text-align: left;
}

.route-item.active .route-info-box {
    background: #666 !important;
}

.route-item.active .route-name {
    color: #fff !important;
}

.route-name {
    font-size: 15px;
    font-weight: 400;
    color: #333;
    line-height: 1.1;
    font-family: 'Oswald', sans-serif;
}

.route-btn {
    height: 30px;
    min-width: 80px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    font-size: 15px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.route-btn:active {
    transform: scale(0.95);
}

.btn-load {
    background: var(--route-color); /* Match route icon color (blue) */
    color: #fff;
}

.btn-remove {
    background: #ef5350; /* Softer red */
    color: #fff;
}

/* Brand Panel */
.brand-panel {
    display: flex;
    align-items: center;
    position: relative;
    pointer-events: auto;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 30;
}

.brand-toggle-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 16;
    transition: transform 0.2s, background-color 0.2s;
    padding: 0;
    flex-shrink: 0;
    outline: none;
}

.brand-toggle-btn:hover {
    transform: scale(1.05);
    background-color: #f8f9fa;
}

.brand-toggle-btn img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

/* Force Oswald font in the Info Modal content */
#info-modal .modal-content,
#info-modal h3,
#info-modal strong,
#info-modal p,
#info-modal span,
#info-modal a,
#info-modal button {
    font-family: 'Oswald', sans-serif !important;
}

/* Search Results Dropdown List */
.search-results-dropdown {
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
    border-radius: 25px 0px 0px 25px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 6px;
    overscroll-behavior: contain;
    pointer-events: auto !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch;
}

.search-results-dropdown.hidden {
    display: none !important; /* Ensure hidden overrides display: flex specificity */
    pointer-events: none !important;
    visibility: hidden !important;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 20px; /* Rounded corners matching dropdown style */
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

.search-result-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

.search-result-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-result-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.search-result-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-address {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Info Modal Custom Styling */
.info-modal-content {
    max-width: 450px !important;
    width: 95%;
}

.info-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    text-align: left;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 10px;
}

.info-item:last-of-type {
    border-bottom: none;
}

.info-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-badge img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.info-item strong {
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #333;
}

.info-item p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    text-align: justify;
    margin-top: 4px;
}

/* Clickable Info Cards */
.info-item-clickable {
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    border-radius: 14px;
    padding: 8px 10px;
    margin: 0 -10px;
    display: flex;
    flex-direction: column;
}

.info-item-clickable:hover {
    background: rgba(0, 0, 0, 0.08);
}

.info-item-arrow {
    margin-left: auto;
    color: #999;
    transition: transform 0.2s ease, color 0.2s ease;
}

.info-item-clickable:hover .info-item-arrow {
    transform: translateX(3px);
    color: #2D5A27;
}

.btn-primary-custom {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.2s;
    margin-top: 10px;
}

.btn-primary-custom:hover {
    background: #e07b00;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 30px;
    color: white;
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    font-size: 14px;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2);
    max-width: 90%;
    width: auto;
    background: rgba(50, 50, 50, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

.toast-notification.show {
    top: 20px;
}

/* Settings & Language Dropdown */
.settings-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lang-dropdown {
    position: absolute;
    right: 48px; /* Positioned to the left of the 45px wide panel */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    padding: 6px;
    border-radius: 20px;
    min-width: 140px;
    gap: 4px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.lang-dropdown.hidden {
    display: none !important;
}

.lang-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 14px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: var(--text-main);
    transition: background 0.2s ease, color 0.2s ease;
}

.lang-opt:hover {
    background: rgba(0, 0, 0, 0.05);
}

.lang-opt.active {
    background: var(--primary-color);
    color: white;
}

.lang-opt .flag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.lang-opt .flag svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

.lang-opt .lang-name {
    flex-grow: 1;
}

.lang-opt .chk-icon {
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    color: inherit;
}

.lang-opt.active .chk-icon {
    opacity: 1;
}

/* Info Modal Header Redesign */
.info-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.info-header-logo {
    max-height: 100px;
    width: auto;
    object-fit: contain;
    display: block;
    margin-top: -10px;
}

.info-header-subtitle {
    font-family: 'Oswald', sans-serif !important;
    font-weight: 400;
    font-size: 18px;
    color: #333;
    line-height: 1.3;
    padding: 0 10px;
	margin-top: -15px;
	margin-bottom: 15px;
}

/* Info Modal Bottom Buttons Layout */
.info-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
    width: 100%;
}

.info-footer-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 8px 16px;
    margin: 0 !important;
    background: #ffffff !important;
    color: var(--accent-color) !important;
    border-radius: 23px;
    cursor: pointer;
    font-family: 'Oswald', sans-serif !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    outline: none;
}

.info-footer-btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.info-footer-btn:active {
    transform: translateY(1px);
}

.info-footer-btn.visit-btn img {
    max-height: 32px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Adjustments for mobile viewports */
@media (max-width: 600px) {
    .info-header-logo {
		margin-top: 0px;
        max-height: 80px;
    }
    .info-header-subtitle {
        font-size: 16px;
    }
    .info-footer-btn {
        height: 44px;
        font-size: 15px !important;
    }
    .info-footer-btn.visit-btn img {
        max-height: 28px;
    }
    
    /* Responsive styling for bottom brand buttons (centered) */
    .brand-buttons-container {
        bottom: 9px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        gap: 12px !important;
    }
    .brand-btn img {
        width: 130px !important;
        height: auto !important;
    }
}

/* Bottom Left Brand Buttons Container */
.brand-buttons-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    gap: 16px;
    z-index: 30;
    pointer-events: auto;
}

.brand-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    width: auto !important;
    height: auto !important;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 0;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-btn:hover {
    transform: scale(1.08);
}

.brand-btn:active {
    transform: scale(0.95);
}

.brand-btn img {
    width: 150px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.45)) drop-shadow(0px 1px 1.2px rgba(0, 0, 0, 0.75));
}

.logo-divider {
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
}

.logo-popup-footer {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    width: 100%;
}

.logo-popup-footer .close-modal {
    max-width: 160px;
    width: 100%;
}

/* Optical alignment for Visit Harghita logo (shift 2px up) inside popup only */
.logo-popup-body img[src*="logo visit hr.png"] {
    transform: translateY(-2px);
}

/* Disable body scrolling/bouncing when modal popup is open */
body.modal-open {
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
}
/* Bottom Sheet Styles */
.bottom-sheet { max-height: 55vh; overflow: hidden;
    position: fixed;
    bottom: 0; /* Dock to bottom edge */
    left: 50%;
    transform: translate(-50%, 150%);
    width: 280px; /* Constrain width to 280px as requested */
    max-width: 280px;
    background: rgba(255, 255, 255, 0.40);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px 24px 0 0; /* Round only top corners when docked */
    z-index: 2100;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), visibility 0s linear 0.6s;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.30);
    display: flex;
    flex-direction: column;
    pointer-events: none;
    visibility: hidden;
}
.bottom-sheet.active { 
    transform: translate(-50%, 0); 
    pointer-events: auto; 
    visibility: visible;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), visibility 0s linear 0s;
}
.bottom-sheet-drag-area {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 60px; /* Reduced drag area height for smaller width */
    z-index: 10; display: flex; justify-content: center;
    cursor: grab; touch-action: pan-y;
}
.bottom-sheet-drag-area:active { cursor: grabbing; }
.drag-indicator {
    width: 40px; height: 4px; background: rgba(255, 255, 255, 0.9);
    border-radius: 3px; margin-top: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.bottom-sheet-image-container { position: relative; width: 100%; height: 160px; min-height: 160px; flex-shrink: 0; }
.bottom-sheet-image { width: 100%; height: 100%; object-fit: cover; border-radius: 24px 24px 0 0; }

/* Kategória-szín: a .bottom-sheet elemre kerülő cat-* módosító osztály állítja be.
   Ha nincs ilyen osztály, --primary-color (narancs) az alapértelmezett. */
.bottom-sheet.cat-butterfly { --cat-color: var(--primary-color); }
.bottom-sheet.cat-farms     { --cat-color: var(--accent-color); }
.bottom-sheet.cat-events    { --cat-color: var(--event-color); }
.bottom-sheet.cat-routes    { --cat-color: var(--route-color); }

/* A szívecske most a kép alján, középen ül (ahol korábban a kategória-ikon volt).
   Fehér kör, keret nélkül — a szín magára a szív-ikonra kerül (körvonal + aktív
   állapotban kitöltés), ugyanúgy mint a desktop popupnál. Méret is ahhoz igazítva (42px). */
.bottom-sheet-favorite-btn {
    position: absolute;
    bottom: -21px; /* fele a 42px átmérőnek, hogy középen üljön a kép alsó élén */
    left: 50%;
    top: auto;
    right: auto;
    transform: translateX(-50%);
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 11;
    color: var(--cat-color, var(--primary-color));
    transition: transform 0.2s;
}
.bottom-sheet-favorite-btn:hover { transform: translateX(-50%) scale(1.05); }
.bottom-sheet-favorite-btn.active svg { fill: var(--cat-color, var(--primary-color)); }

/* A korábbi kategória-ikon kör mostantól nem jelenik meg — a szív vette át a helyét */
.bottom-sheet-logo-container { display: none !important; }

.bottom-sheet-content {
    padding: 25px 20px 15px 20px;
    text-align: center;
    background: transparent;
    overflow-y: auto;
    overflow-x: hidden;
}

.bottom-sheet-content::-webkit-scrollbar {
    width: 5px;
}

.bottom-sheet-content::-webkit-scrollbar-track {
    background: transparent;
}

.bottom-sheet-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.bottom-sheet-title { font-family: 'Oswald', sans-serif; font-size: 20px; font-weight: 400; color: #1a1a1a; margin-bottom: 4px; line-height: 1.2; }
.bottom-sheet-address { font-family: 'Oswald', sans-serif; font-size: 16px; font-weight: 300; color: #555; margin-bottom: 10px; }
.bottom-sheet-buttons { display: flex; gap: 15px; justify-content: center; }

/* Gombok: nincs tömör (lila/zöld) kitöltés — fehér alap, kategória-színű, 2px keret,
   a szöveg/ikon is a kategória-színt veszi fel. Hoverkor telítődik a kategória-színnel. */
.bs-btn {
    padding: 8px 15px; border-radius: 25px; background: #fff;
    border: 2px solid var(--cat-color, var(--primary-color));
    color: var(--cat-color, var(--primary-color));
    font-family: 'Oswald', sans-serif; font-size: 14px; font-weight: 400;
    cursor: pointer; flex: 1; transition: background 0.2s, color 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    /* Saját compositing réteg — a mögötte lévő .glass (backdrop-filter) blur
       újraszámítása nélkül fut a hover-átmenet, ez szünteti meg a villogást. */
    will-change: background-color, color;
    transform: translateZ(0);
}
.bs-btn:hover { background: var(--cat-color, var(--primary-color)); color: #fff; }
.bs-btn svg, .bs-btn img { color: inherit; fill: currentColor; }


/* Logo Popup Modal Content overrides */
.logo-popup-content {
    padding: 40px !important;
    border-radius: 24px !important;
    max-width: 300px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.logo-popup-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    width: 100%;
}

.popup-logo-img {
    max-width: 95%;
    width: auto;
    height: auto;
    max-height: 200px;
    object-fit: contain;
}

.popup-logo-link {
    display: flex;
    justify-content: center;
    width: 100%;
    transition: transform 0.2s, opacity 0.2s;
    text-decoration: none;
    outline: none;
}

.popup-logo-link:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.popup-logo-link:active {
    transform: scale(0.98);
}



.popup-logo-visithr { max-width: 50% !important; height: auto !important; }



/* Mobile overrides for Bottom Sheet */
@media (max-width: 600px) {
    .bottom-sheet {
        max-height: 45vh;
    }
    .bottom-sheet-image-container {
        height: 140px;
        min-height: 140px;
    }
    .bottom-sheet-title {
        font-size: 18px !important;
        line-height: 1.25 !important;
        margin-bottom: 4px;
    }
}
