@font-face {
    font-family: 'Europa';
    src:
        url('fonts/europa-bold-webfont.woff2') format('woff2'),
        url('fonts/europa-bold-webfont.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}
body {
    margin: 0;
    padding: 0;
    font-family: 'Europa', 'Arial', sans-serif;
    font-weight: bold;
    background-color: #fff;
    font-size: 16px;
}

.app-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2%;
}

.map-outer-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: url('obr.png');
    background-size: cover;
    background-position: bottom center;
    padding: 20px 0 150px;
    border-radius: 15px;
    position: relative;
}

#map {
    width: 100%;
    background: transparent;
    cursor: default;
    position: relative;
    overflow: visible;
}

.legend {
    position: absolute;
    bottom: 15px;
    left: 2%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px 16px;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

#filter-reset {
    grid-column: 1 / -1;
    background: none;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 3px 8px;
    font-family: 'Europa', 'Arial', sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    text-align: center;
}

#filter-reset:hover {
    background: #f5f5f5;
    border-color: #999;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

.legend-item.inactive {
    opacity: 0.3;
}
@media (max-width: 768px) {
    .legend {
        gap: 4px 10px;
        padding: 8px;
    }
    .legend-item {
        font-size: 10px;
    }
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

#info-box {
    display: none; /* Na začiatku skryté */
    position: absolute;
    z-index: 20; /* Aby bol nad mapou */
    background: white;
    padding: 20px 20px 20px 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* Ak je text dlhý, bude sa rolovať vnútri */

    /* Desktop nastavenie: Vpravo hore */
    top: 20px;
    right: 20px;
    width: 300px;
    max-height: 80vh;
    border-radius: 8px;
}

/* --- Mobilné zobrazenie (Bottom Sheet) --- */
@media (max-width: 768px) {
    #info-box {
        position: fixed; /* Fixné voči viewportu, nie wrapperu */
        top: auto; /* Zrušíme top */
        right: 0; /* Roztiahneme na celú šírku */
        left: 0;
        bottom: 0; /* Pripneme na spodok obrazovky */
        width: 100%; /* Celá šírka */
        max-height: 50vh; /* Maximálne do polovice obrazovky */
        border-radius: 15px 15px 0 0; /* Zaoblené len horné rohy */
        animation: slideUp 0.3s ease-out;
    }
}

/* Animácia vysunutia */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* --- Tlačidlo na zatvorenie (krížik) --- */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    padding: 0;
}
.close-btn:hover {
    color: #e63946;
}

#info-box a {
    color: #219ebc;
    text-decoration: none;
}

#info-box a:hover {
    text-decoration: underline;
}

h1 {
    text-align: center;
    margin: 0 0 20px;
    color: #d8ead7;
    text-transform: uppercase;
    font-size: 3rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
}

.oblacik-text {
    position: absolute;
    top: 0;
    left: 2%;
    max-width: 20%;
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 768px) {
    .oblacik-text {
        position: relative;
        /* max-width: 20px; */
        top: -10%;
        max-width: 25%;
    }
}

#map .maplibregl-canvas {
    z-index: 2;
}

#map .maplibregl-popup {
    z-index: 3;
}

/* Hover tooltip nad markerom */
.marker-tooltip .maplibregl-popup-content {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 5px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.marker-tooltip .maplibregl-popup-tip {
    display: none;
}

#zoom-reset {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: 'Europa', 'Arial', sans-serif;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#zoom-reset:hover {
    background: #fff;
}

.zoom-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.zoom-controls button {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ccc;
    font-family: 'Europa', 'Arial', sans-serif;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.zoom-controls button:first-child {
    border-radius: 6px 6px 0 0;
}

.zoom-controls button:last-child {
    border-radius: 0 0 6px 6px;
}

.zoom-controls button:hover {
    background: #fff;
}

.zoom-controls button:active {
    background: #eee;
}
