/*
 * Mobile Schnellkontakt-Leiste (Anrufen / E-Mail / Anfrage stellen)
 * Markup: Resources/Private/Partials/Page/MobileActionBar.html
 * Logik:  Resources/Public/JavaScript/mobile-action-bar.js
 */
.rw-mobile-action-bar {
    display: none;
}

@media (max-width: 1379px) {
    .rw-mobile-action-bar {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 9000;
        display: grid;
        grid-template-columns: 1fr 1fr 1.35fr;
        gap: 4px;
        padding: 4px;
        background: rgba(255, 255, 255, 0.96);
        -webkit-backdrop-filter: saturate(1.4) blur(12px);
        backdrop-filter: saturate(1.4) blur(12px);
        border: 1px solid #ece7e5;
        border-radius: 16px;
        box-shadow: 0 12px 32px rgba(17, 24, 39, 0.16), 0 2px 6px rgba(17, 24, 39, 0.06);
        transform: translateY(calc(100% + 24px + env(safe-area-inset-bottom)));
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease, visibility 0s linear 0.32s;
    }

    .rw-mobile-action-bar.is-visible {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition-delay: 0s;
    }

    /* Ausblenden, solange Menü, Suche oder eine Sidebar offen ist */
    body.mobile-menu-visible .rw-mobile-action-bar.is-visible,
    body.rw-modal-open .rw-mobile-action-bar.is-visible,
    body.search-overlay-is-active .rw-mobile-action-bar.is-visible {
        transform: translateY(calc(100% + 24px + env(safe-area-inset-bottom)));
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .rw-mobile-action-bar .rw-mobile-action-bar__btn {
        appearance: none;
        -webkit-appearance: none;
        margin: 0;
        border: 0;
        border-radius: 12px;
        background: transparent;
        font: inherit;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 50px;
        padding: 6px 4px;
        color: #1d1d1f;
        opacity: 1;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        transition: background-color 0.2s ease;
    }

    .rw-mobile-action-bar .rw-mobile-action-bar__btn:hover,
    .rw-mobile-action-bar .rw-mobile-action-bar__btn:focus {
        color: #1d1d1f;
        opacity: 1;
        text-decoration: none;
    }

    .rw-mobile-action-bar .rw-mobile-action-bar__btn:active {
        background: rgba(29, 29, 31, 0.06);
    }

    .rw-mobile-action-bar .rw-mobile-action-bar__btn--primary,
    .rw-mobile-action-bar .rw-mobile-action-bar__btn--primary:hover,
    .rw-mobile-action-bar .rw-mobile-action-bar__btn--primary:focus {
        background: var(--primary-color, #e2382a);
        color: #ffffff;
    }

    .rw-mobile-action-bar .rw-mobile-action-bar__btn--primary:active {
        background: #c42e23;
    }

    .rw-mobile-action-bar .rw-mobile-action-bar__btn:focus-visible {
        outline: 2px solid var(--primary-color, #e2382a);
        outline-offset: 2px;
    }

    .rw-mobile-action-bar .rw-mobile-action-bar__btn--primary:focus-visible {
        outline-color: #1d1d1f;
    }

    .rw-mobile-action-bar__icon {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex-shrink: 0;
    }

    .rw-mobile-action-bar__label {
        font-size: 0.75rem;
        font-weight: 700;
        line-height: 1.1;
        letter-spacing: 0.01em;
        white-space: nowrap;
    }

    /* Produktseiten: Die obere Produkt-Navigation hat eigene Kontakt-Icons (Ansprechpartner, Anfrage).
       Wo die Schnellkontakt-Leiste existiert (diese Datei wird nur dann geladen), übernimmt sie den Kontakt
       allein, damit oben nur Navigation und Auswahlhilfe bleiben und es keine doppelten Kontaktwege gibt. */
    .rw-mobile-top-nav .rw-mobile-nav-ctas {
        display: none !important;
    }

    /* Chatbot-Launcher sitzt ebenfalls unten rechts: ausblenden, solange die Leiste sichtbar ist.
       Am Seitenende (Abschluss-CTA/Footer) verschwindet die Leiste und der Chatbot ist wieder da. */
    body.rw-mobile-action-bar-active [class*="elfsight-app-"] {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rw-mobile-action-bar {
        transition: none;
    }
}
