/* Reset a základní styly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Mapa přes celou obrazovku */
#map {
    height: 100vh;
    width: 100vw;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Tooltip pro KFME číslo */
.kfme-tooltip {
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid #2c5f2d;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    color: #2c5f2d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    white-space: nowrap;
}

/* Styl pro KFME mřížku */
.leaflet-interactive.kfme-grid {
    fill: none;
    stroke: #2c5f2d;
    stroke-width: 2;
    stroke-opacity: 0.6;
    pointer-events: all;
    cursor: pointer;
}

.leaflet-interactive.kfme-grid:hover {
    stroke: #4a8a4d;
    stroke-width: 3;
    stroke-opacity: 0.8;
}

/* Styl pro zvýrazněný čtverec */
.kfme-highlighted {
    fill: rgba(44, 95, 45, 0.1);
    stroke: #2c5f2d;
    stroke-width: 3;
    stroke-opacity: 1;
}

/* Loading indikátor */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-size: 16px;
    color: #333;
}

/* Ovládací panel */
.control-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 250px;
}

.control-panel h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #2c5f2d;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}
.control-panel label {
    display: flex;
    align-items: center;
    margin: 8px 0;
    cursor: pointer;
    font-size: 14px;
}

.control-panel input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.control-panel button {
    width: 100%;
    padding: 8px 12px;
    margin-top: 10px;
    background-color: #2c5f2d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.control-panel button:hover {
    background-color: #4a8a4d;
}

/* Responzivní úpravy */
@media (max-width: 768px) {
    .control-panel {
        top: auto;
        bottom: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .kfme-tooltip {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Leaflet popupy */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-content {
    margin: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.leaflet-popup-content h4 {
    margin: 0 0 8px 0;
    color: #2c5f2d;
    font-size: 16px;
}
