/* =============================================================================
   Floating WhatsApp inquiry button (functions/floating-whatsapp.php)
   Self-contained component, scoped to .sr-float-wa. Does not touch any
   existing element. Registered last in config.php so it loads site-wide.
   ========================================================================== */
.sr-float-wa {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.32), 0 2px 6px rgba(15, 23, 42, 0.16);
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    animation: sr-float-wa-in 0.5s ease both;
}

.sr-float-wa:hover,
.sr-float-wa:focus-visible {
    background: #1ebe5b;
    color: #fff;
    text-decoration: none;
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.4), 0 3px 8px rgba(15, 23, 42, 0.18);
}

.sr-float-wa__icon {
    width: 33px;
    height: 33px;
    display: block;
}

/* Decorative pulse halo; never intercepts clicks. */
.sr-float-wa::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25d366;
    opacity: 0.55;
    z-index: -1;
    animation: sr-float-wa-pulse 2.2s ease-out infinite;
}

.sr-float-wa__tip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    white-space: nowrap;
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    padding: 9px 12px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sr-float-wa:hover .sr-float-wa__tip,
.sr-float-wa:focus-visible .sr-float-wa__tip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@keyframes sr-float-wa-pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    70% {
        transform: scale(1.65);
        opacity: 0;
    }
    100% {
        transform: scale(1.65);
        opacity: 0;
    }
}

@keyframes sr-float-wa-in {
    from {
        opacity: 0;
        transform: scale(0.6);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 576px) {
    .sr-float-wa {
        right: 14px;
        bottom: 14px;
        width: 50px;
        height: 50px;
    }
    .sr-float-wa__icon {
        width: 28px;
        height: 28px;
    }
    .sr-float-wa__tip {
        display: none;
    }
}

/* While the cookie-consent notice is on screen, lift the button clear of it
   so the two never overlap. The bar loses --visible after consent (or on
   browsers without :has support the rule is simply skipped), and the button
   settles back to its default corner. Heights allow a comfortable gap for the
   site's fixed English notice (single-row desktop / two-row mobile). */
body:has(.site-notice.site-notice--visible) .sr-float-wa {
    bottom: 96px;
}

@media (max-width: 576px) {
    body:has(.site-notice.site-notice--visible) .sr-float-wa {
        bottom: 138px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sr-float-wa,
    .sr-float-wa::after {
        animation: none;
    }
    .sr-float-wa,
    .sr-float-wa__tip {
        transition: none;
    }
}
