/* ==========================================================
   Mapa výletu – v2.5.1
   Redesign dle pensionhelenahones.cz (Montserrat / Roboto)
   ========================================================== */
/* ---- Mapset toggle (segmented control) ---- */
.mapa-vylet-toolbar .mapa-vylet-mapset
{
    display: inline-flex;
    padding: 6px;
    background: #f6f2ec;
    border: 1px solid #d2c9b3;
    border-radius: 6px;
    gap: 0;
}

.mapa-vylet-toolbar .mapa-vylet-mapset__option
{
    appearance: none;
    box-sizing: border-box;
    border: 0;
    background: transparent;
    color: #5a6068;
    padding: 8px 14px;
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.mapa-vylet-toolbar .mapa-vylet-mapset__option:hover:not(.is-active)
{
    background: rgba(255, 255, 255, 0.7);
    color: #222428;
}

.mapa-vylet-toolbar .mapa-vylet-mapset__option.is-active
{
    background: #006E45;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 110, 69, 0.25);
}

.mapa-vylet-toolbar .mapa-vylet-mapset__option:focus-visible
{
    outline: 2px solid #006E45;
    outline-offset: 2px;
}

.mapa-vylet-toolbar .mapa-vylet-mapset__icon
{
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}


/* ---- Wrapper ---- */
.mapa-vylet-wrapper
{
    max-width: 1240px;
    margin: 0 auto 2rem;
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    color: #5a6068;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 6px 24px -12px rgba(34, 36, 40, .18), 0 2px 6px -2px rgba(34, 36, 40, .06);
    overflow: hidden;
    font-size: 15px;
    line-height: 1.6;
}

/* ---- Toolbar ---- */
.mapa-vylet-toolbar
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e3ddcd;
}

.mapa-vylet-toolbar__group
{
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tlačítka – základ (důležité: vysoká specificita kvůli globálním tématu stylům) */
.mapa-vylet-toolbar a.mapa-vylet-btn,
.mapa-vylet-toolbar a.mapa-vylet-btn:link,
.mapa-vylet-toolbar a.mapa-vylet-btn:visited
{
    appearance: none;
    box-sizing: border-box;
    border: 1px solid #d2c9b3;
    background: #ffffff;
    color: #222428;
    padding: 10px 16px;
    border-radius: 4px;
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none !important;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
}

.mapa-vylet-toolbar a.mapa-vylet-btn:hover
{
    background: #f6f2ec;
    border-color: #8a8f95;
    color: #222428;
    text-decoration: none !important;
}

.mapa-vylet-toolbar a.mapa-vylet-btn:active
{
    transform: translateY(1px);
}

.mapa-vylet-toolbar a.mapa-vylet-btn.is-disabled,
.mapa-vylet-toolbar a.mapa-vylet-btn[aria-disabled="true"]
{
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

.mapa-vylet-toolbar a.mapa-vylet-btn .mapa-vylet-btn__icon
{
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Mapset – Turistická / Satelitní */
.mapa-vylet-toolbar button.mapa-vylet-btn--mapycz,
.mapa-vylet-toolbar button.mapa-vylet-btn--mapycz:hover,
.mapa-vylet-toolbar button.mapa-vylet-btn--mapycz:focus
{
    appearance: none;
    box-sizing: border-box;
    border: 1px solid #d2c9b3;
    background: #ffffff;
    color: #222428;
    padding: 10px 16px;
    border-radius: 4px;
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.mapa-vylet-toolbar button.mapa-vylet-btn--mapycz .mapa-vylet-btn__icon
{
    color: #006E45;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.mapa-vylet-toolbar button.mapa-vylet-btn--mapycz:hover:not(:disabled)
{
    background: #f6f2ec;
    border-color: #006E45;
    color: #006E45;
}

.mapa-vylet-toolbar button.mapa-vylet-btn--mapycz:disabled
{
    opacity: 0.45;
    cursor: not-allowed;
}

/* Aktivní mapset – plný zelený */
.mapa-vylet-toolbar a.mapa-vylet-btn--mapset.is-active,
.mapa-vylet-toolbar a.mapa-vylet-btn--mapset.is-active:link,
.mapa-vylet-toolbar a.mapa-vylet-btn--mapset.is-active:visited
{
    background: #006E45;
    border-color: #006E45;
    color: #ffffff;
}

.mapa-vylet-toolbar a.mapa-vylet-btn--mapset.is-active .mapa-vylet-btn__icon
{
    color: #ffffff;
}

.mapa-vylet-toolbar a.mapa-vylet-btn--mapset.is-active:hover
{
    background: #01633F;
    border-color: #01633F;
    color: #ffffff;
}

/* Mapy.cz – sekundární bílá */
.mapa-vylet-toolbar a.mapa-vylet-btn--mapycz .mapa-vylet-btn__icon
{
    color: #006E45;
}

.mapa-vylet-toolbar a.mapa-vylet-btn--mapycz:hover
{
    background: #f6f2ec;
    border-color: #006E45;
    color: #006E45;
}

/* GPX – primární zelený (jako na screenshotu z návrhu) */
.mapa-vylet-toolbar a.mapa-vylet-btn--gpx,
.mapa-vylet-toolbar a.mapa-vylet-btn--gpx:link,
.mapa-vylet-toolbar a.mapa-vylet-btn--gpx:visited
{
    background: #006E45;
    border-color: #006E45;
    color: #ffffff;
}

.mapa-vylet-toolbar a.mapa-vylet-btn--gpx .mapa-vylet-btn__icon
{
    color: #ffffff;
}

.mapa-vylet-toolbar a.mapa-vylet-btn--gpx:hover
{
    background: #01633F;
    border-color: #01633F;
    color: #ffffff;
}

/* Mobile */
@media (max-width: 920px)
{
    .mapa-vylet-toolbar
    {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .mapa-vylet-toolbar__group
    {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ---- Dvousloupcový layout ---- */
.mapa-vylet-layout
{
    display: grid;
    grid-template-columns: 1fr 400px;
    background: #ffffff;
}

.mapa-vylet-layout__map
{
    position: relative;
    min-height: 560px;
}

#mapa-vylet-map
{
    width: 100%;
    height: 100%;
    min-height: 560px;
    z-index: 1;
    position: relative;
}

/* ---- Sidebar ---- */
.mapa-vylet-layout__sidebar
{
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e3ddcd;
    background: #ffffff;
}

/* ---- Info panel (statistiky) ---- */
.mapa-vylet-info
{
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f6f2ec;
    border-bottom: 1px solid #e3ddcd;
}

.mapa-vylet-info__item
{
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 20px;
}

.mapa-vylet-info__item:first-child
{
    border-right: 1px solid #e3ddcd;
}

.mapa-vylet-info__item .info-icon
{
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #c9842a;
    border: 1px solid #f0e3cc;
    border-radius: 50%;
    box-shadow: 0 2px 6px -2px rgba(201, 132, 42, .25);
}

.mapa-vylet-info__item .info-icon svg
{
    width: 18px;
    height: 18px;
}

.mapa-vylet-info__item .info-body
{
    display: flex;
    flex-direction: column;
}

.mapa-vylet-info__item .info-label
{
    font-family: "Roboto", sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #8a8f95;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 3px;
}

.mapa-vylet-info__item .info-value
{
    font-family: "Montserrat", sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
    color: #222428;
}

.mapa-vylet-info__item .info-value small
{
    font-family: "Montserrat", sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #5a6068;
    margin-left: 3px;
}

/* ---- Výškový profil ---- */
.mapa-vylet-elevation
{
    position: relative;
    padding: 22px 24px 18px;
    border-bottom: 1px solid #e3ddcd;
}

.mapa-vylet-elevation__heading
{
    font-family: "Montserrat", sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #222428;
    letter-spacing: -0.1px;
    margin-bottom: 14px;
}

.mapa-vylet-elevation__canvas-wrap
{
    position: relative;
    width: 100%;
    background: #f6f2ec;
    border-radius: 4px;
}

.mapa-vylet-elevation__canvas
{
    display: block;
    width: 100%;
    cursor: crosshair;
}

.mapa-vylet-elevation__tooltip
{
    position: absolute;
    background: #222428;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 4px;
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

.mapa-vylet-elevation__tooltip strong
{
    font-size: 12px;
    font-weight: 700;
}

.mapa-vylet-elevation__vline
{
    position: absolute;
    width: 1px;
    background: rgba(0, 110, 69, 0.55);
    pointer-events: none;
    z-index: 5;
}

.mapa-vylet-elevation__stats
{
    position: absolute;
    top: 22px;
    right: 24px;
    display: flex;
    gap: 20px;
    margin-top: 0;
}

.elev-stat
{
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 600;
}

.elev-stat--up
{
    color: #006E45;
}

.elev-stat--down
{
    color: #b03a2e;
}

.elev-stat__icon
{
    width: 12px;
    height: 12px;
}

/* ---- Popisky (parkoviště, cíl) ---- */
.mapa-vylet-desc
{
    padding: 22px 24px;
    border-bottom: 1px solid #e3ddcd;
}

.mapa-vylet-desc:last-child
{
    border-bottom: none;
}

.mapa-vylet-desc__head
{
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.mapa-vylet-desc__pin
{
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 50%;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.mapa-vylet-desc__pin--start
{
    background: #006E45;
}

.mapa-vylet-desc__pin--end
{
    background: #b03a2e;
}

.mapa-vylet-desc__pin svg
{
    width: 15px;
    height: 15px;
}

.mapa-vylet-desc__title
{
    font-family: "Montserrat", sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #222428;
    letter-spacing: -0.2px;
    margin: 0;
}

.mapa-vylet-desc__text
{
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    line-height: 1.65;
    color: #5a6068;
    margin: 0;
}

/* ---- Responsive ---- */
@media (max-width: 920px)
{
    .mapa-vylet-layout
    {
        grid-template-columns: 1fr;
    }

    .mapa-vylet-layout__map
    {
        min-height: 420px;
    }

    #mapa-vylet-map
    {
        min-height: 420px;
    }

    .mapa-vylet-layout__sidebar
    {
        border-left: none;
        border-top: 1px solid #e3ddcd;
    }

    .mapa-vylet-toolbar
    {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .mapa-vylet-toolbar__group
    {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ---- Markery ---- */
.mapa-vylet-marker
{
    display: flex;
    align-items: center;
    justify-content: center;
}

.mapa-vylet-marker .marker-label
{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border: 2px solid #fff;
}

.mapa-vylet-marker .marker-label > *
{
    transform: rotate(45deg);
}

.mapa-vylet-marker--start .marker-label
{
    background: #006E45;
}

.mapa-vylet-marker--end .marker-label
{
    background: #b03a2e;
}

/* ---- Leaflet overrides ---- */
.leaflet-container
{
    font-family: inherit;
}

.leaflet-control-zoom a
{
    background: #ffffff;
    color: #222428;
    border: 1px solid #e3ddcd !important;
    font-weight: 500;
}

.leaflet-control-zoom a:hover
{
    background: #f6f2ec;
    color: #006E45;
}

.leaflet-bar
{
    border-radius: 4px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.leaflet-control-attribution
{
    font-family: inherit;
    font-size: 10px;
    background: rgba(255, 255, 255, .85) !important;
}

/* Stats – mobile zmenšení */
@media (max-width: 920px)
{
    .mapa-vylet-info__item .info-value
    {
        font-size: 14px;
    }
    .mapa-vylet-info__item .info-value small
    {
        font-size: 10px;
    }
}

.mapa-vylet-desc__titles
{
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.mapa-vylet-desc__subtitle
{
    font-family: "Roboto", sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #8a8f95;
    margin-top: 3px;
}
