/* Floating AI Chat / WhatsApp buttons. Loaded only when at least one button is enabled. */

.gw-fab-stack {
    position: fixed;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}
.gw-fab-stack--bottom-right { right: 20px; bottom: 20px; align-items: flex-end; }
.gw-fab-stack--bottom-left  { left: 20px;  bottom: 20px; align-items: flex-start; }
/* Top positions sit below the sticky header so they never cover the navigation. */
.gw-fab-stack--top-right { right: 20px; top: calc(var(--header-h, 76px) + 16px); align-items: flex-end; }
.gw-fab-stack--top-left  { left: 20px;  top: calc(var(--header-h, 76px) + 16px); align-items: flex-start; }

.gw-fab {
    --fab-color: #ffffff;
    --fab-bg: #13305a;
    position: relative;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 56px;
    min-width: 56px;
    padding: 0 22px 0 18px;
    border: 2px solid rgba(255, 255, 255, .95);
    border-radius: 999px;
    background: var(--fab-bg);
    color: var(--fab-color);
    font: 700 15px/1 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    text-decoration: none;
    box-shadow: 0 12px 28px -8px rgba(15, 23, 42, .45);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
button.gw-fab { cursor: pointer; }

/* Animated white ring: a soft pulse that spreads out from the white border. */
.gw-fab::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    pointer-events: none;
    animation: gwFabPulse 2.4s ease-out infinite;
}
.gw-fab-stack .gw-fab:nth-child(2)::before { animation-delay: 1.2s; }
@keyframes gwFabPulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .75); }
    70%  { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.gw-fab:hover { color: var(--fab-color); transform: translateY(-3px); filter: brightness(1.06); box-shadow: 0 16px 32px -8px rgba(15, 23, 42, .5); }
.gw-fab:focus-visible { outline: 3px solid #ffffff; outline-offset: 2px; box-shadow: 0 0 0 6px var(--fab-bg); }
.gw-fab i { font-size: 24px; line-height: 1; }
.gw-fab__label { white-space: nowrap; }

/* Icon-only buttons ("Show label text" off in the admin): round, label kept for screen readers. */
.gw-fab--icon-only { width: 58px; height: 58px; min-width: 58px; padding: 0; }
.gw-fab--icon-only i { font-size: 28px; }
.gw-fab--icon-only .gw-fab__label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* Tooltip */
.gw-fab::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    padding: 7px 11px;
    border-radius: 8px;
    background: #0f172a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity .2s ease, visibility .2s ease;
}
.gw-fab-stack--bottom-right .gw-fab::after,
.gw-fab-stack--top-right .gw-fab::after { right: calc(100% + 12px); }
.gw-fab-stack--bottom-left .gw-fab::after,
.gw-fab-stack--top-left .gw-fab::after { left: calc(100% + 12px); }
.gw-fab:hover::after, .gw-fab:focus-visible::after { opacity: 1; visibility: visible; }

/* Phones: icon-only circles (the label stays available to screen readers). */
@media (max-width: 640px) {
    .gw-fab-stack--bottom-right, .gw-fab-stack--top-right { right: 14px; }
    .gw-fab-stack--bottom-left, .gw-fab-stack--top-left { left: 14px; }
    .gw-fab-stack--bottom-right, .gw-fab-stack--bottom-left { bottom: 14px; }
    .gw-fab-stack--top-right, .gw-fab-stack--top-left { top: calc(var(--header-h, 66px) + 12px); }
    .gw-fab:not(.gw-fab--no-icon) { width: 54px; height: 54px; min-width: 54px; padding: 0; }
    .gw-fab:not(.gw-fab--no-icon) .gw-fab__label {
        position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
    }
    .gw-fab--no-icon { height: 48px; padding: 0 18px; }
    .gw-fab::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .gw-fab, .gw-fab::after { transition: none; }
    .gw-fab::before { animation: none; }
    .gw-fab:hover { transform: none; }
}

@media print { .gw-fab-stack { display: none; } }
