/* =========================================================
   SDBau – Website-Erweiterungen (beide Layouts)
   1) Auffälliger Webshop-Link in der Topbar (fbt-shop.eu)
   2) "Nach oben"-Button beim Herunterscrollen
   Barrierefreiheit (WCAG 2.2.2 / BFSG): Das Blinken endet nach
   < 5 Sekunden automatisch und entfällt bei "prefers-reduced-motion".
   ========================================================= */

/* ---------- 1) Webshop-Link in der Topbar ---------- */
.header-top-wrapper {
    flex-wrap: wrap;
    gap: 8px 24px;
}

.header-top-shop {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: 999px;
    background: #facc15;
    color: #0f172a !important;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.7);
    /* 3 x 1,4 s = 4,2 s -> unter 5 Sekunden (WCAG 2.2.2) */
    animation: sdbShopBlink 1.4s ease-in-out 3;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

    .header-top-shop i {
        opacity: 1 !important;
        color: #0f172a;
    }

    .header-top-shop:hover,
    .header-top-shop:focus-visible {
        background: #fde047;
        transform: translateY(-1px);
        /* Bei Hover/Fokus erneut kurz aufblinken lassen */
        animation: sdbShopBlink 1.4s ease-in-out 1;
    }

    .header-top-shop:focus-visible {
        outline: 3px solid #fff;
        outline-offset: 2px;
    }

@keyframes sdbShopBlink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.7);
    }

    50% {
        opacity: 0.35;
        box-shadow: 0 0 0 8px rgba(250, 204, 21, 0);
    }
}

@media (max-width: 768px) {
    .header-top-shop {
        font-size: 0.8rem;
        padding: 4px 12px;
    }
}

/* ---------- 2) "Nach oben"-Button ---------- */
.scroll-top-btn {
    position: fixed;
    left: 22px;
    bottom: 22px;
    z-index: 998;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    color: #fff;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, box-shadow 0.2s ease;
}

    .scroll-top-btn.is-visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .scroll-top-btn:hover {
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
        transform: translateY(-2px);
    }

    .scroll-top-btn:focus-visible {
        outline: 3px solid #0f172a;
        outline-offset: 3px;
    }

@media (max-width: 768px) {
    .scroll-top-btn {
        left: 15px;
        bottom: 15px;
        width: 44px;
        height: 44px;
    }
}

@media print {
    .scroll-top-btn {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header-top-shop,
    .header-top-shop:hover,
    .header-top-shop:focus-visible {
        animation: none;
        transition: none;
    }

    .scroll-top-btn {
        transition: none;
    }
}
