/* ── Cotonnade · Floating WhatsApp Button ──────────────────────────────── */

/* Base button — CSS custom properties are injected inline by the Blade partial */
.ctn-wa-float {
    position: fixed;
    z-index: 9998; /* below page loader (999999), above everything else */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: visible;
    text-decoration: none;
    cursor: pointer;

    /* dynamic values (set via inline <style> in the partial) */
    width:            var(--wa-size, 56px);
    height:           var(--wa-size, 56px);
    bottom:           var(--wa-bottom, 20px);
    background-color: var(--wa-color, #25d366);

    box-shadow: 2px 2px 8px rgba(0, 0, 0, .35);
    transition: transform .25s ease, box-shadow .25s ease;

    /* entrance animation — slight delay so it doesn't compete with the page loader */
    animation: wa-bounce-in .5s ease both;
    animation-delay: .6s;
}

.ctn-wa-float--right { right: 20px; }
.ctn-wa-float--left  { left:  20px; }

/* ── Hover ── */
.ctn-wa-float:hover,
.ctn-wa-float:focus-visible {
    transform: scale(1.1);
    box-shadow: 4px 4px 16px rgba(0, 0, 0, .4);
    text-decoration: none;
    outline: none;
}

/* ── SVG icon ── */
.ctn-wa-float__icon {
    display: block;
    width: 55%;
    height: 55%;
    fill: #fff;
    flex-shrink: 0;
    pointer-events: none;
}

/* ── Tooltip label ── */
.ctn-wa-float__label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
    font-family: system-ui, -apple-system, sans-serif;
    letter-spacing: .01em;
}
.ctn-wa-float--right .ctn-wa-float__label { right: calc(var(--wa-size, 56px) + 12px); }
.ctn-wa-float--left  .ctn-wa-float__label { left:  calc(var(--wa-size, 56px) + 12px); }
.ctn-wa-float:hover  .ctn-wa-float__label,
.ctn-wa-float:focus-visible .ctn-wa-float__label { opacity: 1; }

/* ── Entrance animation ── */
@keyframes wa-bounce-in {
    0%   { transform: scale(0);   opacity: 0; }
    70%  { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1);   opacity: 1; }
}

/* ── Pulse ring ── */
.ctn-wa-float::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--wa-color, #25d366);
    animation: wa-pulse 2.5s ease-out infinite;
    animation-delay: 1.2s;
    opacity: 0;
    z-index: -1;
    pointer-events: none;
}
@keyframes wa-pulse {
    0%   { transform: scale(1);    opacity: .55; }
    80%  { transform: scale(1.8);  opacity: 0;   }
    100% { transform: scale(1.8);  opacity: 0;   }
}

/* ── Mobile-only visibility ── */
@media (min-width: 769px) {
    .ctn-wa-float--mobile-only { display: none !important; }
}

/* ── Reduce motion ── */
@media (prefers-reduced-motion: reduce) {
    .ctn-wa-float,
    .ctn-wa-float::before { animation: none; }
}
