/* ============================================================
   Herbano Ratgeber — Mobile Bottom-Bar
   2 Tabs (Themenwelt / Inhalt), nur sichtbar auf Mobile.
   Bestehende Sidebars werden via .is-mobile-open zu Bottom-Sheets.
   Magedia-WhatsApp-Bubble wird auf Ratgeber-Mobile komplett ausgeblendet.
   ============================================================ */

/* ---------- Default: Bottom-Bar + Overlay auf Desktop ausgeblendet ---------- */
.herbano-bottombar {
    display: none;
}

.herbano-bottombar__overlay {
    display: none;
}

.herbano-article__sheet-close {
    display: none;
}

/* ---------- Mobile: Sidebars als Bottom-Sheets + Bottom-Bar ---------- */
@media (max-width: 1024px) {

    /* Bestehende Sidebars als Bottom-Sheets positionieren */
    .herbano-article__sidebar {
        display: block !important;
        position: fixed;
        bottom: 60px;  /* über Bottom-Bar */
        left: 0;
        right: 0;
        max-height: 60vh;
        overflow-y: auto;
        background: var(--hb-bg);
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
        z-index: 60;
        padding: 24px 20px 32px;
        border-radius: 16px 16px 0 0;
        transform: translateY(calc(100% + 60px));
        transition: transform 280ms cubic-bezier(0, 0, 0.2, 1);
        visibility: hidden;
    }

    .herbano-article__sidebar.is-mobile-open {
        transform: translateY(0);
        visibility: visible;
    }

    /* Sticky-Verhalten von Desktop deaktivieren */
    .herbano-article__sidebar--right {
        position: fixed;
        top: auto;
        max-height: 60vh;
    }

    /* Schließen-Button oben rechts im Sheet */
    .herbano-article__sheet-close {
        display: flex;
        position: absolute;
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        border: none;
        background: var(--hb-mist);
        color: var(--hb-accent);
        border-radius: 50%;
        font-size: 22px;
        font-weight: 600;
        line-height: 1;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        z-index: 1;
        transition: background var(--hb-dur-micro) var(--hb-ease);
    }

    .herbano-article__sheet-close:hover {
        background: var(--hb-mint);
    }

    /* ---------- Overlay-Backdrop ---------- */
    .herbano-bottombar__overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 55;
    }

    /* ---------- Bottom-Bar selbst ---------- */
    .herbano-bottombar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: var(--hb-bg);
        border-top: 1px solid var(--hb-line);
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
        z-index: 70;
    }

    .herbano-bottombar__tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        background: transparent;
        border: none;
        padding: 8px 4px;
        color: var(--hb-ink-3);
        font-family: var(--hb-f-body);
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        text-decoration: none;
        transition: color var(--hb-dur-micro) var(--hb-ease);
        -webkit-tap-highlight-color: transparent;
    }

    .herbano-bottombar__tab:hover {
        color: var(--hb-accent);
    }

    .herbano-bottombar__tab.is-active {
        color: var(--hb-accent);
    }

    .herbano-bottombar__icon {
        flex-shrink: 0;
    }

    .herbano-bottombar__label {
        line-height: 1;
    }

    /* ---------- WhatsApp-Bubble auf Ratgeber-Mobile komplett verstecken ---------- */
    body.blog-page a[href*="wa.me"].fixed,
    body.blog-page a.z-max[href*="wa.me"] {
        display: none !important;
    }

    /* ---------- Body-Padding-Bottom damit Content nicht von Bottom-Bar überdeckt ---------- */
    body.blog-page {
        padding-bottom: 60px;
    }
}