/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Roboto:wght@400;500&display=swap');

/* --- Zmienne Kolorów dla GastroŁyk --- */
:root {
    --gastro-primary: #34495E; /* Głęboki Grafitowo-Niebieski */
    --gastro-accent: #E74C3C; /* Soczysty Koral */
    --gastro-bg-light: #ECF0F1; /* Bardzo jasne tło */
    --gastro-bg-panel: #FFFFFF; /* Tło paneli (np. popupy, karty) */
    --gastro-text-dark: #2C3E50; /* Ciemny tekst */
    --gastro-text-medium: #95A5A6; /* Średni szary tekst */
    --gastro-text-light: #ECF0F1; /* Bardzo jasny tekst (na ciemnym tle) */
    --gastro-success: #2ECC71;
    --gastro-danger: #E74C3C;
    --gastro-font-heading: 'Montserrat', sans-serif;
    --gastro-font-body: 'Roboto', sans-serif;
    --gastro-border-radius: 8px;
}

/* --- Globalne style body i reset --- */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Kontrolujemy overflow na poziomie .page */
}

#map {
    position: absolute; /* Użyjemy absolute, żeby mapa wypełniła całą przestrzeń rodzica */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Domyślne height: 500px w Map.razor powinno zostać USUNIĘTE! */
}

body {
    font-family: var(--gastro-font-body);
    color: var(--gastro-text-dark);
    background-color: var(--gastro-bg-light);
    height: 100vh;
    overflow: hidden; /* Zapobiega globalnemu scrollowaniu */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--gastro-font-heading);
    font-weight: 600;
    color: var(--gastro-text-dark);
}

/* --- Globalne style dla przycisków --- */
.btn {
    border-radius: var(--gastro-border-radius);
    font-weight: 500;
    font-family: var(--gastro-font-heading);
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: var(--gastro-primary);
    border-color: var(--gastro-primary);
    color: white;
}

.btn-warning {
    background-color: var(--gastro-accent);
    border-color: var(--gastro-accent);
    color: white;
}

.btn-outline-light {
    color: white;
    border-color: rgba(255,255,255,0.5);
}

    .btn-outline-light:hover {
        background-color: rgba(255,255,255,0.1);
        color: white;
        border-color: white;
    }


.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.form-control:focus,
 .form-select:focus {
     border-color: var(--gastro-primary);
     box-shadow: 0 0 0 0.25rem rgba(52, 73, 94, 0.25);
    
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxwYXRoIGQ9Im0yOC41NDEgMjEuNzA5YTIuNzk4IDIuNzk4IDAgMCAxLTMuNjg0IDQuMDU5bC0xOS4zNzEtMTIuNTcyYTIuNzk4IDIuNzk4IDAgMCAxIDEuNDgyLTYuMTI3bDE5LjM3MSAxMi41NzJ6TTI4LjU0MSAyMS43MDliYTIuNzk4IDIuNzk4IDAgMCAxLTUuNDk5LTIuMTMzbDE5LjM3MS0xMi41NzJhMi43OTggMi43OTggMCAwIDEgMy4xNDIgNS40MTlMMjguNTQxIDIxLjcwOXpNMjcuNzE1IDI5LjcwNGExLjcxNyAxLjcxNyAwIDAgMS0yLjQyOSAwbC0xMi41NzItMTkuMzcxYTEuNzE3IDEuNzE3IDAgMCAxIDIuNDI5LTIuNDI5bDEyLjU3MiAxOS4zNzF6TTI4LjU0MSAyMS43MDlBMS43MTcgMS43MTcgMCAwIDEgMjUuMjM4IDI0LjlpLTIuNDI5LTIuNDI5YTEuNzE3IDEuNzE3IDAgMCAxIDIuNDI5LTIuNDI5bDIuNDI5IDIuNDI5aC0yLjQyOXoiIGlkPSJkZWZzMCIgLz48L2RlZnM+PGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSIgZmlsbD0iI0Q5NjgyMiIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMjguNTQxIDIxLjcwOUwzMS42NTIgMTAuOTU0IDE0Ljk4NiA1LjE1M2wyLjM4MyA5LjI1NHYtLjAyNGwyLjM4MyA5LjI1NEwyOC41NDEgMjEuNzA5eiIgZmlsbD0iI0M0NzkzMyIgLz48cGF0aCBkPSJNMjcuNzE1IDI5LjcwNEwzMS42NTIgMTAuOTU0IDE0Ljk4NiA1LjE1M2wtMi4zODMgOS4yNTRWMTAuOTVMMjUuMjM4IDI0LjkiIGZpbGw9IiNDQTQ1MjUiIC8+PHBhdGggZmlsbD0iI0JGNDcyMyIgZD0iTTE0Ljk4NiA1LjE1M2wxMi41NzIgMTkuNTUxbC0yLjM4My05LjI1NHYtLjAyNEwxNC45ODYgNS4xNTN6IiAvPjxwYXRoIGQ9Ik0xNC45ODYgNS4xNTNMMjUuMjM4IDI0LjlsLTIuMzg0LTYuMTI3TDE0Ljk4NiA1LjE1M3oiIGZpbGw9IiNCQTQyMkYiIC8+PHBhdGggZmlsbD0iI0ExMzgyMyIgZD0iTTEyLjYwMyAxNC4zOUwxNC45ODYgNS4xNTNsMi4zODQgOS4yNTQsMy43NjIgMTAuOTU0TDIuOTU4IDIxLjcwOUwyOC41NDEgMjEuNzA5bC0yLjM4NC05LjI1NHYtLjAyNEwxMi42MDMgMTQuMzl6IiAvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
    animation: pulse 1.5s infinite ease-in-out;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
 
    }

        .loading-progress circle:last-child {
            stroke: var(--gastro-primary);
            stroke-dasharray: calc(3.14159 * 2 * 40%);
            stroke-dashoffset: 0;
            animation: loading-progress 1s linear infinite;
        }

.loading-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 1.5rem;
    stroke: var(--gastro-primary);
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes loading-progress {
    0% {
        stroke-dashoffset: calc(3.14159 * 2 * 40%);
    }

    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* --- GASTROLYK SPECIFIC OVERRIDES --- */

 /* Ostateczna poprawka dla linków w NavMenu - wyższa specyficzność */
 .sidebar .nav-item a.nav-link {
     color: var(--gastro-text-light) !important;
    
}


 .sidebar .nav-item a.nav-link:hover {
     color: white !important;
    
}


 .sidebar .nav-item a.nav-link.active {
   color: white !important;
    
}


/* Ostateczna poprawka dla linków w BottomNav - wyższa specyficzność */
 .bottom-nav a.nav-item {
     color: rgba(255, 255, 255, 0.7) !important;
     text-decoration: none !important;
    
}


 .bottom-nav a.nav-item.active {
     color: white !important;
    
}


.loading-progress-text::before {
    content: "Ładowanie..."; /* Używamy kodu CSS dla litery "Ł" */
}

/* --- FORM STYLES --- */
 .styled-link {
     color: var(--gastro-primary);
     text-decoration: none;
     font-weight: 500;
    
}

/* PWA/wwwroot/css/app.css - dodaj na końcu pliku */

   
    /* Lepszy styl dla klastrów na mapie - Wersja 2.2 (Ujednolicona paleta niebieska) */
#map .marker-cluster-small {
    background-color: rgba(52, 73, 94, 0.6); /* Kolor --gastro-primary z przezroczystością */
}

    #map .marker-cluster-small div {
        background-color: rgba(52, 73, 94, 0.9);
    }

#map .marker-cluster-medium {
    background-color: rgba(44, 62, 80, 0.6); /* Ciemniejszy odcień --gastro-primary */
}

    #map .marker-cluster-medium div {
        background-color: rgba(44, 62, 80, 0.9);
    }

#map .marker-cluster-large {
    background-color: rgba(30, 40, 50, 0.6); /* Jeszcze ciemniejszy odcień */
}

    #map .marker-cluster-large div {
        background-color: rgba(30, 40, 50, 0.9);
    }

/* Wspólne style dla wszystkich klastrów (bez zmian) */
#map .marker-cluster {
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    color: white;
    font-weight: bold;
    text-align: center;
}

    #map .marker-cluster div {
        width: 30px;
        height: 30px;
        margin-left: 5px;
        margin-top: 5px;
        border-radius: 50%;
        font-size: 12px;
        line-height: 30px;
    }

/* Nowe, responsywne style dla panelu podglądu v2 */
.place-preview-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 50vh;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.place-preview-panel.visible {
    transform: translateY(0);
}

.place-preview-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

    .place-preview-panel .panel-header h5 {
        margin: 0;
        font-size: 1.1rem;
    }

.place-preview-panel .panel-content {
    padding: 15px;
    overflow-y: auto;
    flex-grow: 1; /* Pozwala zawartości rosnąć */
}

.place-preview-panel .panel-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #f8f9fa;
    flex-shrink: 0; /* Stopka się nie kurczy */
}

/* Style dla dużych ekranów (komputer) - wysuwany z lewej */
@media (min-width: 768px) {
    .place-preview-panel {
        top: 0;
        left: 0;
        width: 380px;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border-right: 1px solid #ddd;
        transform: translateX(-100%);
    }

        .place-preview-panel.visible {
            transform: translateX(0);
        }
}

.place-preview-panel .panel-section {
    margin-bottom: 1.25rem;
}

    .place-preview-panel .panel-section h6 {
        font-weight: bold;
        color: #6c757d;
        border-bottom: 1px solid #eee;
        padding-bottom: 5px;
        margin-bottom: 10px;
    }

/* Style dla panelu filtrów i jego tła */
.filter-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    transform: translateX(100%); /* Domyślnie schowany po prawej */
    transition: transform 0.3s ease-in-out;
    z-index: 1040; /* Ważne, żeby był na wierzchu */
    display: flex;
    flex-direction: column;
}

    .filter-panel.visible {
        transform: translateX(0); /* Wsuwa się, gdy ma klasę .visible */
    }

.filter-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 1039; /* Tuż pod panelem */
    pointer-events: none; /* Domyślnie nieklikalne */
}

    .filter-panel-overlay.visible {
        opacity: 1;
        pointer-events: auto; /* Staje się klikalne, aby zamknąć panel */
    }

.filter-panel .filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

    .filter-panel .filter-panel-header h4 {
        margin: 0;
    }

.filter-panel .filter-panel-content {
    padding: 15px;
    overflow-y: auto;
    flex-grow: 1;
}


/* --- NOWE, KOMPLEKSOWE STYLE DLA DYMKÓW NA MAPIE --- */

/* --- NOWE, KOMPLEKSOWE STYLE DLA DYMKÓW NA MAPIE v2 --- */

.price-badge-marker {
    position: relative; /* Kontener dla dymka i kropki */
    width: 0;
    height: 0;
}

    .price-badge-marker .location-dot {
        /* To jest nasza kropka - precyzyjny wskaźnik */
        width: 12px;
        height: 12px;
        border-radius: 50%;
        border: 2px solid white;
        box-shadow: 0 1px 4px rgba(0,0,0,0.5);
        /* Pozycjonowanie kropki względem punktu na mapie */
        position: absolute;
        left: -6px; /* Przesunięcie o połowę szerokości w lewo */
        top: -6px; /* Przesunięcie o połowę wysokości w górę */
    }

    .price-badge-marker .price-badge {
        /* To jest nasz dymek z informacjami */
        position: absolute;
        bottom: 12px; /* Unosimy go nad kropkę */
        left: 50%;
        transform: translateX(-50%); /* centrujemy go horyzontalnie */
        display: flex;
        align-items: flex-start;
        background-color: var(--gastro-bg-panel) !important;
        border: 1px solid #a9a9a9;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
        padding: 8px;
        min-width: 200px;
        white-space: nowrap;
    }

        /* "Ogonek" dymka wskazujący na kropkę */
        .price-badge-marker .price-badge::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
            border-top: 10px solid white;
            filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
        }

        .price-badge-marker .price-badge.closing-soon::after {
            border-top-color: #fffbe6;
        }

        .price-badge-marker .price-badge.closing-very-soon::after {
            border-top-color: #fff5f5;
        }

    /* Style wewnętrznych elementów dymka (pozostają głównie bez zmian) */
    .price-badge-marker .badge-icon {
        width: 32px;
        height: 32px;
        margin-right: 8px;
        flex-shrink: 0;
    }

    .price-badge-marker .badge-content {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

    .price-badge-marker .badge-products {
        width: 100%;
    }

    .price-badge-marker .badge-product-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 14px;
        line-height: 1.3;
        margin-bottom: 4px;
    }

    .price-badge-marker .badge-product-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    }

        .price-badge-marker .badge-product-item:last-child {
            border-bottom: none;
        }

    .price-badge-marker .product-name {
        color: #374151; /* Gray-700 */
        font-weight: 450;
        font-size: 12.5px;
        letter-spacing: -0.01em;
        flex: 1;
    }

    .price-badge-marker .product-price {
        color: #111827; /* Gray-900 */
        font-weight: 600;
        font-size: 13px;
        font-variant-numeric: tabular-nums;
        margin-left: 12px;
    }

  

    .price-badge-marker .badge-rating {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding-top: 6px;
        margin-top: 4px;
        border-top: 1px solid #eee;
        width: 100%;
        font-size: 13px;
        color: #6c757d;
    }

    .price-badge-marker .badge-star {
        color: #ffc107;
        font-size: 16px;
        margin-right: 3px;
    }

    .price-badge-marker .rating-value {
        font-weight: bold;
        color: #495057;
        margin-right: 5px;
    }
.page {
    /* Zakładając, że to jest kontener, w którym jest Map.razor */
    position: relative;
    height: 100%; /* Ważne, by rozciągnąć go na całą wysokość widoku */
    display: flex;
    flex-direction: column;
}

.map-controls {
    position: fixed; /* Pozycja stała */
    top: 10px;
    left: 10px; /* Przypięcie do lewej krawędzi */
    right: 10px; /* Przypięcie do prawej krawędzi */

    z-index: 1050;
    display: flex;
    justify-content: space-between; /* To rozrzuci Dzwonek i Filtry na boki */
    align-items: center;
    background-color: rgba(200, 200, 200, 0.9); /* Szare tło */
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

    /* Dodatkowy styl dla kontenerów wewnątrz .map-controls (zakładam, że filtry i dzwonek są w osobnych kontenerach) */
    .map-controls > div {
        display: flex;
        align-items: center;
        gap: 10px;
    }

.search-bar-container {
    position: relative;
    flex-grow: 1;
}

.suggestion-box {
    position: absolute;
    width: 100%;
    margin-top: 2px;
    max-height: 300px;
    overflow-y: auto;
}

.locate-btn {
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.bi-crosshair {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-crosshair' viewBox='0 0 16 16'%3e%3cpath d='M8.5.5a.5.5 0 0 0-1 0v.518A7 7 0 0 0 1.018 7.5H.5a.5.5 0 0 0 0 1h.518A7 7 0 0 0 7.5 14.982v.518a.5.5 0 0 0 1 0v-.518A7 7 0 0 0 14.982 8.5h.518a.5.5 0 0 0 0-1h-.518A7 7 0 0 0 8.5 1.018V.5Zm-6.48 7A6 6 0 0 1 7.5 2.02v5.48a.5.5 0 0 0 1 0V2.02a6 6 0 0 1 5.48 5.48h-5.48a.5.5 0 0 0 0 1h5.48A6 6 0 0 1 8.5 13.98v-5.48a.5.5 0 0 0-1 0v5.48A6 6 0 0 1 2.02 8.5h5.48a.5.5 0 0 0 0-1H2.02Z'/%3e%3c/svg%3e");
    width: 1.2em;
    height: 1.2em;
}

/* --- Style dla markera lokalizacji użytkownika --- */
.user-location-marker .pulsating-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #0d6efd;
    border: 3px solid #fff;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

/* --- Style dla markera wyniku wyszukiwania --- */
.search-result-marker .pulsating-dot-search {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #198754; /* Kolor zielony (success) */
    border: 3px solid #fff;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
    animation: pulse-search 1.5s infinite;
}

@keyframes pulse-search {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 12px rgba(25, 135, 84, 0);
    }

    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
    }
}

/* Style dla dymków "Wkrótce zamykane" */
.price-badge.closing-soon {
    background-color: #fffbe6; /* Jasnożółte tło */
    border-color: #ffc107; /* Żółta ramka */
}

.price-badge.closing-very-soon {
    background-color: #fff5f5; /* Jasnoczerwone tło */
    border-color: #dc3545; /* Czerwona ramka */
}

/* Style dla tekstu ostrzeżenia w dymku */
.badge-status-warning {
    font-size: 10px;
    font-weight: bold;
    color: #856404; /* Ciemnożółty */
    margin-top: 4px;
    text-align: center;
}

.badge-status-danger {
    font-size: 10px;
    font-weight: bold;
    color: #721c24; /* Ciemnoczerwony */
    margin-top: 4px;
    text-align: center;
}

.delivery-icon {
    width: 32px;
    height: 32px;
    vertical-align: middle;
}

.form-check-label .filter-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: text-bottom;
}

/* --- NOWE STYLE DLA UJEDNOLICONYCH ZNACZNIKÓW --- */

/* Kropka lokalizacyjna - baza dla wszystkich znaczników */
.location-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Prosty znacznik (tylko kropka) */
.simple-marker .location-dot {
    position: absolute;
    left: -6px;
    top: -6px;
}

/* Znacznik ładowania (kręcące się kółko wokół kropki) */
.loading-marker .location-dot::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Znacznik kategorii (ikona nad kropką) */
.category-marker {
    position: relative;
}

    .category-marker .category-icon-wrapper {
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 32px;
        height: 32px;
        background-color: white;
        border-radius: 50%;
        box-shadow: 0 2px 5px rgba(0,0,0,0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid;
    }

    .category-marker .category-icon {
        width: 22px;
        height: 22px;
    }

    .category-marker .location-dot {
        position: absolute;
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%);
    }

/* Znacznik z dymkiem (dymek nad kropką) */
.price-badge-marker .price-badge {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    border: 1px solid #a9a9a9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    padding: 8px;
    min-width: 200px;
    white-space: nowrap;
}

    .price-badge-marker .price-badge::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-top: 10px solid white;
    }

.price-badge-marker .badge-content {
    /* style dla zawartości dymka */
}

.price-badge-marker .badge-product-item {
    display: flex;
    justify-content: space-between;
}

.price-badge-marker .product-name {
    font-size: 13px;
    margin-right: 15px;
}

.price-badge-marker .product-price {
    font-weight: bold;
    font-size: 13px;
}

.price-badge-marker .location-dot {
    position: absolute;
    left: -6px;
    top: -6px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- OSTATECZNE STYLE DYMKÓW (v6) --- */

.gastro-popup-marker {
    position: relative;
    width: 24px;
    height: 24px;
}

    .gastro-popup-marker .location-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        border: 2px solid white;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
        position: absolute;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%);
        z-index: 10;
    }

    .gastro-popup-marker .gastro-popup {
        position: absolute;
        bottom: 18px;
        left: 50%;
        transform: translateX(-50%);
        width: 240px;
        background-color: var(--gastro-bg-panel);
        border: 1px solid #e0e0e0;
        border-radius: var(--gastro-border-radius);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        font-family: var(--gastro-font-body);
        cursor: pointer;
    }

        .gastro-popup-marker .gastro-popup::after,
        .gastro-popup-marker .gastro-popup::before {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
        }

        .gastro-popup-marker .gastro-popup::after {
            border-top: 10px solid white;
            z-index: 1;
        }

        .gastro-popup-marker .gastro-popup::before {
            border-top: 11px solid #e0e0e0;
            margin-top: -1px;
        }

.gastro-popup .popup-header {
    background-color: var(--gastro-bg-panel);
    padding: 8px 12px;
    border-bottom: 1px solid var(--gastro-bg-light);
}

.gastro-popup .popup-title {
    display: flex;
    align-items: center;
}

.gastro-popup .popup-category-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    flex-shrink: 0;
}

.gastro-popup .popup-title-text {
    font-family: var(--gastro-font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--gastro-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gastro-popup .popup-header-rating {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--gastro-text-medium);
    margin-top: 6px;
}

.gastro-popup .star-icon {
    color: #ffc107;
    font-size: 0.9rem;
    margin-right: 1px;
}

.gastro-popup .rating-value {
    font-weight: bold;
    color: var(--gastro-text-dark);
    margin-left: 8px;
    margin-right: 4px;
}

.gastro-popup .no-rating {
    font-style: italic;
    font-size: 0.8rem;
}


.gastro-popup .popup-content {
    padding: 8px 12px;
}

.gastro-popup .popup-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 4px 0;
    border-bottom: 1px solid var(--gastro-bg-light);
}

    .gastro-popup .popup-product-item:last-child {
        border-bottom: none;
    }


.gastro-popup .product-name {
    color: var(--gastro-text-dark);
    flex-grow: 1;
}

.gastro-popup .product-price {
    color: var(--gastro-text-dark);
    font-weight: 600;
    white-space: nowrap;
    margin-left: 1rem;
}

.gastro-popup .popup-status {
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    padding: 4px;
    margin-top: 8px;
    border-radius: 4px;
}

.gastro-popup .popup-status-warning {
    color: #664d03;
    background-color: #fff3cd;
}

.gastro-popup .popup-status-danger {
    color: #842029;
    background-color: #f8d7da;
}

.gastro-popup .popup-footer {
    padding: 8px;
    border-top: 1px solid var(--gastro-bg-light);
    background-color: #f8f9fa;
    border-bottom-left-radius: calc(var(--gastro-border-radius) - 1px);
    border-bottom-right-radius: calc(var(--gastro-border-radius) - 1px);
}

.gastro-popup .popup-details-btn {
    width: 100%;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    background-color: var(--gastro-primary);
    border-radius: 6px;
    text-align: center;
    transition: background-color 0.2s ease;
}

.gastro-popup:hover .popup-details-btn {
    background-color: #2c3e50;
}

/* Style dla znaczników na szlaku */
/* Poprawione style dla ikony przystanku */
.trail-stop-icon {
    position: relative; /* Konieczne do pozycjonowania absolutnego elementu wewnątrz */
    background-color: var(--gastro-primary);
    color: white;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    width: 30px;
    height: 30px;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    font-size: 14px;
}

    .trail-stop-icon span {
        position: absolute;
        top: 50%;
        left: 50%;
        /* Ta kombinacja transformacji idealnie centruje obrócony element */
        transform: translate(-50%, -50%);
        font-weight: bold;
        line-height: 1; /* Zapobiega problemom z wysokością linii tekstu */
    }

/* Nowe, ulepszone style dla przycisku wyjścia */
.exit-trail-button {
    background-color: var(--gastro-accent) !important; /* Używamy koloru akcentu, !important nadpisuje styl .btn-map-overlay */
    color: white !important;
    border: 1px solid rgba(0,0,0,0.2) !important;
}

    .exit-trail-button:hover {
        background-color: #c82333 !important; /* Ciemniejszy odcień akcentu */
    }





    /* AIM */

.aim-game-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

    .aim-game-overlay.visible {
        opacity: 1;
        visibility: visible;
    }

.aim-game-container {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.game-area-wrapper {
    position: relative;
    padding: 1rem;
}

.game-score, .game-timer {
    position: absolute;
    top: -0.5rem;
    font-weight: bold;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: white;
}

.game-score {
    left: 0;
    background-color: var(--gastro-primary);
}

.game-timer {
    right: 0;
    background-color: var(--gastro-accent);
}

.game-board {
    width: 300px;
    height: 300px;
    margin: 2rem auto 0;
    border: 5px solid #34495E;
    border-radius: 50%;
    position: relative;
    background-color: #ecf0f1;
    overflow: hidden; /* Ikony nie będą wychodzić poza planszę */
}

.target-zone-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 3px dashed var(--gastro-accent);
    border-radius: 50%;
    transition: transform 0.1s ease;
}

.game-board:active .target-zone-center {
    transform: translate(-50%, -50%) scale(0.9);
}

.game-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 1.5s cubic-bezier(0.5, 0, 1, 1);
    transform: translate(-50%, -50%);
}

    .game-icon.hit {
        animation: hit-animation 0.3s ease-out forwards;
    }

@keyframes hit-animation {
    0% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* --- Lepsza Walidacja Formularzy w Blazor --- */
/* Ta reguła ukrywa domyślne, agresywne podświetlanie błędów przez przeglądarkę. */
.form-control:invalid,
.form-select:invalid {
    box-shadow: none;
}

/* A te reguły pokazują nasze niestandardowe, czerwone podświetlenie
   TYLKO WTEDY, gdy pole ma klasę .modified (dodaną przez Blazor po interakcji)
   I JEDNOCZEŚNIE ma status :invalid. */

.form-control.modified:invalid,
.form-select.modified:invalid {
    border-color: #dc3545; /* Czerwony kolor błędu z Bootstrapa */
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); /* Czerwona poświata */
}

/* Styl dla "odznaki" wydarzenia na ikonce kategorii */
.marker-event-badge {
    position: absolute;
    top: -10px; /* ZMIANA: Lekko wyżej */
    right: -10px; /* ZMIANA: Lekko w prawo */
    width: 22px; /* ZMIANA: Większy rozmiar */
    height: 22px; /* ZMIANA: Większy rozmiar */
    background-color: var(--gastro-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px; /* ZMIANA: Większa ikonka */
    line-height: 1;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    z-index: 1;
}

/* Upewniamy się, że wrapper ikony jest spozycjonowany */
.category-icon-wrapper {
    position: relative;
}


/* Resetuje domyślny niebieski kolor linku dla niestandardowych komponentów */
.card-link {
    color: inherit; /* Dziedziczy kolor tekstu z rodzica */
    text-decoration: none; /* Usuwa podkreślenie */
}

    .card-link:hover {
        color: inherit; /* Zapobiega zmianie koloru po najechaniu */
    }

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1040; /* Niżej niż modal, ale wyżej niż reszta strony */
}

.comment-item.helpful-answer > .comment-layout > .comment-main-content > .comment-frame {
    background-color: #e6f7ec;
    border-left: 3px solid #28a745;
}

.action-button.helpful-button {
    color: #28a745; /* Zielony kolor dla przycisku "Pomógł" */
}

.helpful-badge {
    font-size: 0.85rem;
    font-weight: 500;
    color: #218838; /* Ciemniejszy zielony, pasujący do ramki */
    margin-bottom: 8px;
    padding: 4px 0;
}

    .helpful-badge .fas {
        margin-right: 5px;
    }

.question-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0d6efd;
    /* Usuwamy 'margin-left', bo jest już nad nickiem */
    /* Usuwamy 'padding' i 'background-color', aby był czystszy */
}

    .question-badge .fas {
        margin-right: 3px;
        font-size: 0.7rem;
    }

.upcoming-events-widget {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 8px 12px;
    max-width: 300px;
    max-height: 150px; /* Ogranicz wysokość */
    overflow-y: auto; /* Dodaj scroll, jeśli jest za dużo */
}

    .upcoming-events-widget h5 {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 8px;
    }

    .upcoming-events-widget .list-unstyled li {
        font-size: 0.9rem;
        line-height: 1.3;
    }

/* --- Nowy Panel Wydarzeń (Modal) --- */
/* Pojedynczy klikalny element listy */
.event-item {
    /* Rozwiązanie problemu nr 1: Dodajemy więcej pionowego odstępu i wyraźniejszą linię */
    padding: 1rem 0.5rem;
    border-bottom: 1px solid #eee; /* Trochę ciemniejszy separator */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .event-item:last-child {
        border-bottom: none;
    }

    .event-item:hover {
        background-color: #f8f9fa;
    }

.event-item-title {
    font-size: 1.05rem; /* Trochę większy tekst */
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem; /* Większy odstęp pod tytułem */
}

/* Kontener na szczegóły (lokalizacja, data) */
.event-item-details {
    display: flex;
    flex-direction: column; /* Ustawiamy pionowo! */
    gap: 0.35rem; /* Mały odstęp MIĘDZY adresem a datą */
    font-size: 0.9rem;
    color: #495057;
}

/* Pojedynczy element szczegółów (ikona + tekst) */
.event-detail-item {
    display: flex;
    align-items: center;
}

    .event-detail-item .bi {
        font-size: 0.9rem;
        color: #6c757d; /* text-muted */
        /* Wyrównujemy ikony i tekst: */
        width: 24px;
        text-align: center;
        flex-shrink: 0; /* Zapobiegaj kurczeniu się ikony */
        /* Odstęp między ikoną a jej tekstem */
        margin-right: 0.4rem;
    }

.events-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.3);
    z-index: 1040; /* Poniżej modala, powyżej reszty */
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.events-modal {
    position: fixed;
    z-index: 1051; /* Na samym wierzchu */
    background-color: white;
    transition: transform 0.3s ease-in-out;
}

.events-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.events-modal-title {
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 1.1rem;
}

.events-modal-content {
    padding: 1rem;
    overflow-y: auto;
}

/* === STYLIZACJA MOBILNA (Domyślna: szuflada z dołu) === */
@media (max-width: 767.98px) {
    .events-modal {
        left: 0;
        right: 0;
        bottom: 0;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        max-height: 60vh; /* Maksymalnie 60% ekranu */
        transform: translateY(100%); /* Domyślnie schowany */
    }

        .events-modal.is-open {
            transform: translateY(0);
        }

    .events-modal-content {
        max-height: calc(60vh - 70px); /* Wysokość panelu - header */
    }

    /* Pokaż tło na mobilu */
    .events-modal.is-open + .events-modal-backdrop,
    .events-modal-backdrop.is-open { /* Dodałem .is-open na backdropie na wszelki wypadek */
        opacity: 1;
        pointer-events: auto;
    }
}

/* === STYLIZACJA DESKTOP (Panel z prawej) === */
@media (min-width: 768px) {
    .events-modal {
        top: 0;
        right: 0;
        bottom: 0;
        width: 400px; /* Szerokość jak panel filtrów */
        border-left: 1px solid #dee2e6;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transform: translateX(100%); /* Domyślnie schowany */
    }

        .events-modal.is-open {
            transform: translateX(0);
        }

    .events-modal-content {
        max-height: calc(100vh - 70px); /* Cała wysokość - header */
    }

    .events-modal-backdrop {
        background-color: transparent; /* <-- PRZYWRÓCONE */
    }

        /* Musimy też dodać regułę 'is-open' dla desktopu */
        .events-modal-backdrop.is-open {
            pointer-events: auto; /* <-- DODANE */
        }
}

/* Klasa bazowa (usuwa domyślne tło Leaflet) */
.event-marker-icon {
    border: none !important;
    background: transparent !important;
}

/* Właściwy styl naszego kółka */
.event-marker-circle {
    color: white; /* Kolor ikony biletu w środku */
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px; /* Rozmiar ikony biletu */
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Klasa bazowa (usuwa domyślne tło Leaflet) */
.event-cluster-icon {
    background: transparent !important;
    border: none !important;
}

/* Właściwy styl naszego kółka klastra */
.event-cluster-marker {
    width: 40px;
    height: 40px;
    /* Używamy Twojego koloru akcentu z przezroczystością */
    background-color: rgba(231, 76, 60, 0.8);
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 0 8px rgba(0,0,0,0.4);
}

.filter-panel-wrapper.ranking-mode {
    position: fixed !important; /* Wymuszenie */
    bottom: -100vh;
    left: 0;
    width: 100%;
    height: 75vh;
    background: white;
    z-index: 99999 !important; /* Musi być wyższy niż cokolwiek innego */
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 4px solid #ff5722;
    box-shadow: 0 -15px 35px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    visibility: hidden; /* Ukryty, gdy nieaktywny */
}

    .filter-panel-wrapper.ranking-mode.is-open {
        bottom: 0 !important;
        visibility: visible;
    }

.filter-panel-wrapper-floating-btn {
    position: fixed;
    bottom: 80px; /* Nad dolnym menu */
    right: 20px;
    z-index: 1000;
    border-radius: 50px;
    padding: 10px 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.filter-panel-wrapper-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.rank-number {
    font-weight: bold;
    width: 30px;
    color: #ff5722;
}

.rank-info {
    flex-grow: 1;
}

.rank-price {
    font-weight: bold;
    color: #28a745;
    font-size: 1.1rem;
}