/**
 * Gray Audio — opmaak van de zwevende contactbalk (sticky footer CTA).
 *
 * Stond als inline <style> in inc/footer/templates/sticky-footer.php; nu een los
 * bestand zodat de browser het kan cachen. Geladen via helpers/assets.php.
 */

.ga-sfb {
    --sfb-navy: #18191b;
    --sfb-yellow: #008cb4;
    --sfb-yellow-hi: #00749a;
    --sfb-wa: #25d366;
    --sfb-line: rgba(255, 255, 255, 0.12);
    --sfb-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --sfb-gap: 24px;
    --sfb-btn: 40px;

    position: fixed;
    right: var(--sfb-gap);
    bottom: calc(var(--sfb-gap) + env(safe-area-inset-bottom, 0px));
    z-index: 9990;
    font-family: "DM Sans", sans-serif;
    color: #ffffff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(24px) scale(0.96);
    transform-origin: bottom right;
    transition: transform 0.5s var(--sfb-ease), opacity 0.35s ease, visibility 0s linear 0.5s;
}

.ga-sfb *,
.ga-sfb *::before,
.ga-sfb *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Voorbij de hero: pil schuift in beeld. */
.ga-sfb.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: transform 0.5s var(--sfb-ease), opacity 0.35s ease, visibility 0s;
}

.ga-sfb__bar {
    display: flex;
    align-items: center;
    padding: 6px;
    background: rgba(24, 25, 27, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--sfb-line);
    border-radius: 999px;
    box-shadow: 0 16px 48px rgba(14, 14, 15, 0.28), 0 2px 8px rgba(14, 14, 15, 0.18);
}

/* Inklapbare inhoud: schuift naar rechts in de toggle-knop. */
.ga-sfb__items {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 560px;
    overflow: hidden;
    padding-right: 6px;
    transition: max-width 0.5s var(--sfb-ease), opacity 0.3s ease, padding 0.5s var(--sfb-ease);
}

.ga-sfb.is-collapsed .ga-sfb__items {
    max-width: 0;
    padding-right: 0;
    opacity: 0;
    visibility: hidden;
    transition: max-width 0.5s var(--sfb-ease), opacity 0.2s ease, padding 0.5s var(--sfb-ease), visibility 0s linear 0.5s;
}

.ga-sfb__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0 12px 0 10px;
    margin-right: 4px;
    border-right: 1px solid var(--sfb-line);
}

.ga-sfb__logo img {
    height: 24px;
    width: auto;
    display: block;
}

.ga-sfb__btn,
.ga-sfb__toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: var(--sfb-btn);
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 999px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.ga-sfb__btn:focus-visible,
.ga-sfb__toggle:focus-visible {
    outline: 2px solid var(--sfb-yellow);
    outline-offset: 2px;
}

.ga-sfb__btn--icon {
    width: var(--sfb-btn);
    background: rgba(255, 255, 255, 0.06);
}

.ga-sfb__btn--icon:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.ga-sfb__btn svg,
.ga-sfb__toggle svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.ga-sfb__btn--phone svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.ga-sfb__btn--wa svg {
    fill: var(--sfb-wa);
}

.ga-sfb__btn--primary {
    gap: 8px;
    padding: 0 18px;
    margin-left: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: var(--sfb-yellow);
}

.ga-sfb__btn--primary:hover {
    color: #fff;
    background: var(--sfb-yellow-hi);
}

.ga-sfb__btn--primary svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Visueel verborgen label (blijft voor screenreaders). */
.ga-sfb__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── Toggle: sluit-icoon open, contact-icoon ingeklapt ── */
.ga-sfb__toggle {
    width: var(--sfb-btn);
    border: 0;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
}

.ga-sfb__toggle:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.ga-sfb__toggle svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ga-sfb__toggle .ga-sfb__icon-open {
    display: none;
}

.ga-sfb.is-collapsed .ga-sfb__toggle {
    width: 48px;
    height: 48px;
    color: #fff;
    background: var(--sfb-yellow);
}

.ga-sfb.is-collapsed .ga-sfb__toggle:hover {
    background: var(--sfb-yellow-hi);
    transform: scale(1.05);
}

.ga-sfb.is-collapsed .ga-sfb__toggle svg {
    width: 20px;
    height: 20px;
}

.ga-sfb.is-collapsed .ga-sfb__icon-close {
    display: none;
}

.ga-sfb.is-collapsed .ga-sfb__icon-open {
    display: block;
}

.ga-sfb.is-collapsed .ga-sfb__bar {
    padding: 4px;
}

/* Ruimte onder de footer, zodat de pil niets afdekt aan het einde. */
.ga-sfb-spacer {
    height: var(--ga-sfb-space, 0px);
    background: #000000; /* gelijk aan .ga-footer__bottom */
    transition: height 0.4s ease;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 767px) {
    .ga-sfb {
        --sfb-gap: 12px;
    }

    .ga-sfb__btn--primary {
        padding: 0 14px;
        font-size: 11px;
    }

    .ga-sfb__btn--primary svg {
        display: none;
    }
}

@media (max-width: 420px) {
    .ga-sfb__logo {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ga-sfb,
    .ga-sfb.is-visible,
    .ga-sfb__items,
    .ga-sfb.is-collapsed .ga-sfb__items,
    .ga-sfb-spacer {
        transition: none;
    }

    .ga-sfb {
        transform: none;
    }
}

@media print {
    .ga-sfb,
    .ga-sfb-spacer {
        display: none;
    }
}
