/* Mapa programu s číslovanými špendlíky (print_pin_map / print_pin_list /
   print_pin_modals v _functions.php). Používají ji stránky kosire-motol-2026.php
   a smichov-hrebenky-2026.php. Zelená = výsledky, žlutá = plány. */

/* Kotva sekce (odkaz z menu Lokality Prahy 5) nesmí zmizet pod sticky navbarem */
.pin-section {
    scroll-margin-top: 80px;
}

/* ── Mapa se špendlíky ── */
.pin-map {
    position: relative;
    border: 1px solid #e6e6e6;
}
.pin {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    padding: 0;
    border: 2px solid #ffffff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
    color: #000000;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
    transition: transform .12s ease, box-shadow .12s ease;
    z-index: 2;
}
/* Vyšší z-index i kvůli popisku – nesmí zmizet za sousedními špendlíky */
.pin:hover, .pin:focus {
    transform: translate(-50%, -50%) scale(1.25);
    box-shadow: 0 4px 12px rgba(0,0,0,.45);
    z-index: 5;
    outline: none;
}
.pin-vysledky {
    background: #8CC63F;
}
.pin-plany {
    background: var(--p5s-yellow);
}

/* ── Popisek nad špendlíkem (přepínač „Zobrazit popisky“ nad mapou) ──
   Popisky jsou vidět ve výchozím stavu; odškrtnutý přepínač přidá na <body>
   třídu pin-labels-off a schová je (takhle nemusí nic řešit samotné stránky
   a při načtení popisky neproblikávají). */
.pin-label {
    display: block;
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 150px;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    color: #212529;
    text-align: center;
    white-space: normal;
    pointer-events: none;
}
body.pin-labels-off .pin-label {
    display: none;
}
/* Popisek má barvu svého terčíku (zelená = výsledky, žlutá = plány) */
.pin-vysledky .pin-label {
    background: #8CC63F;
}
.pin-plany .pin-label {
    background: var(--p5s-yellow);
}
/* Přepínač popisků nad mapou */
.pin-labels-toggle {
    font-weight: 300;
}

/* ── Legenda ── */
.pin-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 300;
}
.pin-legend span.dot {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,.35);
    margin-right: .5rem;
    vertical-align: -4px;
}

/* ── Seznam bodů pod mapou ── */
.pin-list-heading {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    margin: 2rem 0 1rem;
    padding-left: .75rem;
    border-left: 6px solid var(--p5s-yellow);
}
.pin-list-heading-vysledky {
    border-left-color: #8CC63F;
}
.pin-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.pin-list li {
    margin-bottom: .75rem;
}
.pin-list a {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    color: #000000;
    text-decoration: none;
}
.pin-list a:hover .pin-list-text strong {
    text-decoration: underline;
}
.pin-list-num {
    flex: 0 0 auto;
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    color: #000000;
}
.pin-list-num.pin-vysledky {
    background: #8CC63F;
}
.pin-list-num.pin-plany {
    background: var(--p5s-yellow);
}
.pin-list-text {
    display: block;
    font-weight: 300;
    line-height: 1.45;
}
.pin-list-popis {
    display: block;
    color: #555555;
    font-size: .95rem;
}

/* ── Modální okno ── */
.pin-popis {
    font-weight: 700;
}

/* ── Ladicí režim (?ladit=1) ── */
.pin-debug {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 2000;
    background: #212529;
    color: var(--p5s-yellow);
    font-family: Consolas, monospace;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.pin-map.ladit {
    cursor: crosshair;
}

@media (max-width: 575px) {
    .pin {
        width: 18px;
        height: 18px;
        font-size: 9px;
        border-width: 1px;
    }
    .pin-label {
        max-width: 110px;
        font-size: 9px;
        padding: 1px 4px;
    }
}
