html, body { margin:0; padding:0; height:100%; font-family: Arial, sans-serif; }
#map { width:100%; height:100%; }

hr {
  border: none;          /* Odstraní výchozí 3D stínování */
  border-top: 1px solid #ccc; /* Vytvoří čistou tenkou linku */
  height: 0;             /* Zajistí, že samotný prvek nemá žádnou výšku */
}

/* Čistý text pod mapou */
#footerText {
    position:absolute;
    bottom:8px;
    left:50%;
    transform:translateX(-50%);
    font-size:15px;
    color:white;
    font-weight:bold;
    text-shadow: 0 0 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6);
    z-index:1200;
    pointer-events:none;
}

/* Čistý text nahoře uprostřed (stejný styl jako footer) */
#mapModeTitle {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    color: white;
    font-weight: bold;
    text-shadow: 0 0 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6);
    z-index: 1200;
    pointer-events: none;
}

/* Panel */
#controlPanel {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 1000;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    width: 220px;
    transition: all 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}
#controlPanel.minimized {
    height: 20px;
    width: 20px;
    overflow: hidden;
    padding: 6px 8px;
}

#controlPanel.minimized:hover {
    background:#f0f0f0;
}


#togglePanel {
    cursor: pointer;
    position: relative;     /* umožní posun */
    top: -6px;              /* posune nahoru o 2px */
    font-weight: bold;
    margin-bottom: 0px;
    color: #5bf;
    font-size: 16px; /* zbytek textu */
}

#togglePanel .toggle-icon {
    font-size: 26px;       /* větší tři čáry */
    position: relative;     /* umožní posun */
    top: 0px;              /* posune nahoru o 2px */
    margin-right: 4px;      /* odsazení od textu */
}

/* Základní styl pro inputy a selecty */
input {
    width: 100%;
    margin-top: 5px;
    padding: 5px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 13px;
    box-sizing: border-box;
}

/* Tlačítka v controlPanel */
#controlPanel select {
    display: block;       /* blok, aby šlo marginem centrovat */
    margin: 5px auto;     /* nahoře/dole 5px, horizontálně auto => centrované */
    padding: 5px 12px;    /* vizuálně podobné políčkům */
    border-radius: 6px;
    border: none;
    font-size: 13px;
    cursor: pointer;
    background: #b6a; 
    color: white;
    text-align: center;
    box-sizing: border-box;
}
#controlPanel button {
    display: block;       /* blok, aby šlo marginem centrovat */
    margin: 5px auto;     /* nahoře/dole 5px, horizontálně auto => centrované */
    padding: 5px 12px;    /* vizuálně podobné políčkům */
    border-radius: 6px;
    border: none;
    font-size: 13px;
    cursor: pointer;
    background: #5bf;  /* jemná modrá */
    color: white;
    text-align: center;
    box-sizing: border-box;
}
#controlPanel button:hover {
    background: #2277dd;  /* tmavší při hover */
}



/* Wrapper tlačítek uvnitř controlPanel */
#controlPanel .buttons-row {
    display: flex;
    flex-wrap: wrap;           /* zalamování, pokud se nevejdou */
    justify-content: center;   /* centrování řádků */
    gap: 4px;                  /* mezera mezi tlačítky */
    margin-top: 5px;
}

/* Samotná tlačítka uvnitř .buttons-row */
#controlPanel .buttons-row button {
    flex: 0 0 auto;            /* šířka podle textu */
    padding: 5px 12px;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    cursor: pointer;
    background: #5bf;       /* jemná modrá */
    color: white;
    text-align: center;
    box-sizing: border-box;
    margin: 0;                  /* zruší velké mezery z block/margin auto */
}

#controlPanel .buttons-row button:hover {
    background: #2277dd;       /* tmavší při hover */
}


.weatherRow {
color: #5bf;
    display:flex;
    gap:4px;
    font-size:14px;
    margin-top:2px;
    align-items:center;
}
.weatherRow label {
    display:flex;
    align-items:center;
    gap:3px;
    white-space:nowrap;
}
.weatherRow input[type="checkbox"]{
    transform: scale(0.9);
    margin:0;
}

/* Oblíbená místa */
.favItem{
    font-size:13px;
    padding:3px 0;
    cursor:pointer;
    color:#0077cc;
}
.favItem:hover{
    text-decoration:underline;
}

/* Logo – menší spodní okraj */
#logo {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1100;
    background: white;
    padding: 3px 5px;          /* 3px nahoře/dole, 5px vlevo/vpravo */
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;        /* vertikální centrování obsahu */
    justify-content: center;    /* horizontální centrování obsahu */
}
#logo:hover {
    background:#f0f0f0;
}

#logo img {
    height: 50px;
    cursor: pointer;
    border-radius: 6px;
    display: block;
}
/* Vrstvy */
#layersControl {
    position:absolute;
    top:76px;
    left:10px;
    z-index:1050;
}

/* Fullscreen */
#fullscreenBtn {
    position: absolute;
    font-size:16px;
    bottom: 12px;
    left: 50px;
    z-index: 1100;
    background: white;
    border-radius: 4px;
    padding: 4px 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    cursor: pointer;
    font-weight: bold;
}

#fullscreenBtn:hover {
    background:#f0f0f0;
}

#layersControl {
    position:absolute;
    top:76px;
    left:10px;
    z-index:1050;
    display:flex;
    flex-direction:column;
    gap:4px;
}

/* tlačítka ikon */
#layersControl button {
    width:32px;
    height:32px;
    padding:0;
    font-size:16px;
    border-radius:6px;
    background:white;
    cursor:pointer;
    box-shadow:0 2px 6px rgba(0,0,0,0.2);
}

#layersControl button:hover {
    background:#f0f0f0;
}

#poiPanel {
    position: absolute;
    top: 185px;
    left: 10px;
    z-index: 1050;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    width: 60px;
    transition: all 0.3s ease;
    max-height: 70vh;
    overflow-y: auto;
    text-align: left !important;
}

#poiPanel * {
    text-align: left !important;
}



#poiPanel.minimized {
    height: 20px;
    width: 20px;
    overflow: hidden;
    padding: 6px 8px;
}

#poiPanel.minimized:hover {
    background:#f0f0f0;
}

#togglePoi {
    cursor:pointer;
    font-weight:bold;
    color:#5bf;
    font-size:16px;
}

#togglePoi .toggle-icon {
    font-size: 20px;  /* velikost ikony */
    margin-right: 4px; /* odsazení od textu */
    position: relative;
    top: -6px;         /* posun nahoru */
}


/* POI checkboxy ve stylu weatherRow */
.poiContent {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    text-align: left;  /* důležité */
}

.poiContent label {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px;
    font-size: 13px;
    white-space: nowrap;
    width: 100%;
    cursor: pointer;
}

.poiContent input[type="checkbox"] {
    transform: scale(0.9);
    margin: 0;
}


/* obecný styl pro všechny custom body */
.custom-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #5bf;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

/* konkrétní tvary podle icon typu */
.custom-marker.hvezda::after {
    content: "★";
}

.custom-marker.kruh::after {
    content: "●";
}

.custom-marker.srdce::after {
    content: "❤";
}

#routeInfo {
    position:absolute;
    bottom:40px;
    left:50%;
    transform:translateX(-50%);
    background:white;
    padding:6px 12px;
    border-radius:8px;
    font-weight:bold;
    box-shadow:0 2px 10px rgba(0,0,0,0.3);
    z-index:1200;
}

#searchResults{
    max-height:150px;
    overflow-y:auto;
    font-size:13px;
    margin-top:4px;
}
.searchItem{
    padding:4px;
    cursor:pointer;
    border-bottom:1px solid #eee;
}
.searchItem:hover{
    background:#f0f0f0;
}

#transport {
    display: none !important;
}

#routeInfo {
    display: none;
}

/* Ultra-minimal měřítko */
.leaflet-control-scale {
    font-size: 9px;                     /* opravdu malé číslo */
    background: rgba(255,255,255,0.3);  /* lehce průhledné */
    padding: 0px 0px;                   /* minimální padding */
    border-radius: 0px;                  /* jemné zaoblení */
    color: #444;                        /* tmavě šedé číslo */
    box-shadow: none;                    /* žádný stín */
}

.leaflet-control-scale-line {
    border-top: 1px solid #222;         /* tenká, nenápadná linka */
}


/* POPUP */


.church-popup {
    font-family: Arial, sans-serif;
    min-width: 200px;
    max-width: 220px;
}

.church-header {
    display: flex;
    align-items: flex-start; /* název nahoře vedle miniatury */
    gap: 8px;  /* mezera mezi fotkou a textem */
}

.church-thumb img {
    width: 60px;       /* malá miniatura */
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;    /* nepůjde zmenšit */
    cursor: pointer;   /* ukáže, že jde kliknout */
}

.church-title {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    line-height: 1.2;
}

.church-address {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.church-services {
    font-size: 12px;
    color: #222;
    line-height: 1.3;
    margin-top: 4px;
}

.church-link {
    margin-top: 4px;
    font-size: 12px;
    color: #5bf;
    font-weight: bold;
}



/* LIGHTBOX */
/* přidáme flex, aby šipky a křížek byly nad obrázkem */
.map-lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.map-lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    pointer-events: none; /* KLÍČOVÉ: aby kliknutí šlo na šipky a křížek */
}

/* Křížek */
.map-lightbox .close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 28px;
    color: white;
    cursor: pointer;
    z-index: 10000;
}

/* Šipky pro listování */
.map-lightbox .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 10000;
    user-select: none;
    opacity: 0.7;
}

.map-lightbox .arrow:hover {
    opacity: 1;
}

.map-lightbox .arrow-left {
    left: 20px;
}

.map-lightbox .arrow-right {
    right: 20px;
}
