/* ==========================================================
   CITY SIDEBAR NAV
   ========================================================== */

/* ── Positionierung ───────────────────────────────────────── */

.city-sidebar-nav {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 8000;
    display: flex;
    flex-direction: column;
}

/* ── Items-Container ──────────────────────────────────────── */

.city-sidebar__items {
    display: flex;
    flex-direction: column;
}

/* ── Einzelner Punkt ──────────────────────────────────────── */

.city-sidebar__item {
    position: relative;
    width: 52px;
    height: 52px;
    background: rgba(119, 2, 10, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    text-decoration: none;
    transition: background 0.2s;
}

.city-sidebar__item:last-child {
    border-bottom: none;
}

.city-sidebar__item:hover,
.city-sidebar__item.activewidget {
    background: #77020a;
}

/* Icon */
.city-sidebar__icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.city-sidebar__icon svg {
    width: 100%;
    height: 100%;
}

.city-sidebar__item.activewidget .city-sidebar__icon svg * {
    fill: #fff;
}

/* ── Tooltip (Desktop) ────────────────────────────────────── */

.city-sidebar__label {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: #1a1a1a;
    color: #fff;
    padding: 5px 11px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s, transform 0.18s;
    line-height: 1.4;
}

/* Pfeil rechts am Tooltip */
.city-sidebar__label::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #1a1a1a;
}

.city-sidebar__item:hover .city-sidebar__label,
.city-sidebar__item:focus .city-sidebar__label,
.city-sidebar__item:focus-within .city-sidebar__label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ── Toggle-Button (nur mobil sichtbar) ───────────────────── */

.city-sidebar__toggle {
    display: none;
}

/* ── Mobile ───────────────────────────────────────────────── */

@media (max-width: 992px) {

    /* Sidebar-Wrapper zurücksetzen – Position übernimmt Toggle */
    .city-sidebar-nav {
        position: static;
        transform: none;
    }

    /* Toggle-Button: runder FAB unten rechts */
    .city-sidebar__toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 24px;
        right: 16px;
        width: 50px;
        height: 50px;
        background: #77020a;
        border: none;
        border-radius: 50%;
        color: #fff;
        cursor: pointer;
        z-index: 8001;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
        transition: background 0.2s, transform 0.2s;
    }

    .city-sidebar__toggle:hover {
        background: #5a0108;
    }

    .city-sidebar__toggle svg {
        width: 20px;
        height: 20px;
        position: absolute;
        transition: opacity 0.18s, transform 0.18s;
    }

    /* Icons tauschen beim Öffnen */
    .city-sidebar__toggle-close       { opacity: 0; transform: rotate(-45deg); }
    .city-sidebar__toggle-open        { opacity: 1; transform: rotate(0deg);   }

    .city-sidebar-nav.is-open .city-sidebar__toggle-close { opacity: 1; transform: rotate(0deg);    }
    .city-sidebar-nav.is-open .city-sidebar__toggle-open  { opacity: 0; transform: rotate(45deg);   }

    /* Items-Panel: fixiert über dem Toggle-Button — standardmäßig versteckt */
    .city-sidebar__items {
        position: fixed;
        bottom: 86px;
        right: 16px;
        flex-direction: column;
        gap: 8px;
        visibility: hidden;
        pointer-events: none;
    }

    .city-sidebar-nav.is-open .city-sidebar__items {
        visibility: visible;
        pointer-events: auto;
    }

    /* Einzelner Punkt — rund */
    .city-sidebar__item {
        width: 48px;
        height: 48px;
        min-width: unset;
        padding: 0;
        gap: 0;
        justify-content: center;
        border-bottom: none;
        border-radius: 50%;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
        opacity: 0;
        transform: translateY(8px);
        transition: opacity 0.22s, transform 0.22s, background 0.2s;
        pointer-events: none;
    }

    /* Staggered Einblenden von unten nach oben */
    .city-sidebar-nav.is-open .city-sidebar__item:nth-child(4) { opacity: 1; transform: none; transition-delay: 0s;    pointer-events: auto; }
    .city-sidebar-nav.is-open .city-sidebar__item:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.06s; pointer-events: auto; }
    .city-sidebar-nav.is-open .city-sidebar__item:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.12s; pointer-events: auto; }
    .city-sidebar-nav.is-open .city-sidebar__item:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.18s; pointer-events: auto; }

    /* Icon-Größe */
    .city-sidebar__icon {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }
}

/* ── Sonstige bestehende Klassen ──────────────────────────── */

.fade-elem {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
}

@media (max-height: 820px) {
    .sideformwrapper {
        overflow-y: scroll;
        height: 100% !important;
        bottom: 0 !important;
    }
}
