/* ============================================
   FLOATING WIDGETS
   WhatsApp FAB + Information Collection Consent Banner
   ============================================ */

/* ---- WhatsApp FAB ---- */
.wa-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    box-shadow: 0 8px 24px rgba(37, 211, 102, .45);
    z-index: 9000;
    transition: transform .25s ease, box-shadow .25s ease;
    animation: wa-pulse 2.4s ease-in-out infinite;
}

.wa-fab:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 32px rgba(37, 211, 102, .55);
    color: #fff !important;
}

.wa-fab-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #1a1a2e;
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    padding: .45rem .85rem;
    border-radius: .5rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.wa-fab-tooltip::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: #1a1a2e;
}

.wa-fab:hover .wa-fab-tooltip { opacity: 1; }

@keyframes wa-pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, .45), 0 0 0 0 rgba(37, 211, 102, .5);
    }
    50% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, .45), 0 0 0 14px rgba(37, 211, 102, 0);
    }
}

@media (max-width: 575.98px) {
    .wa-fab { width: 52px; height: 52px; font-size: 1.7rem; bottom: 1rem; right: 1rem; }
    .wa-fab-tooltip { display: none; }
}

/* ---- Consent Banner ---- */
.consent-banner {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 9100;
    animation: consent-rise .35s ease both;
}

@media (min-width: 768px) {
    .consent-banner {
        bottom: 1.5rem;
        left: 1.5rem;
        right: 1.5rem;
        max-width: 720px;
    }

    .consent-banner.center {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }
}

.consent-banner[hidden] { display: none; }

@keyframes consent-rise {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.consent-banner-inner {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .18), 0 4px 12px rgba(0, 0, 0, .06);
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: 1px solid var(--tt-border);
}

.consent-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--tt-primary-light);
    color: var(--tt-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.consent-content { flex: 1 1 auto; min-width: 0; }

.consent-content h5 {
    font-family: var(--tt-font);
    font-size: .95rem;
    font-weight: 700;
    margin: 0 0 .25rem;
    color: var(--tt-dark);
}

.consent-content p {
    margin: 0;
    font-size: .82rem;
    color: var(--tt-text-muted);
    line-height: 1.5;
}

.consent-actions {
    flex: 0 0 auto;
    display: flex;
    gap: .5rem;
    align-self: center;
}

.btn-consent-primary,
.btn-consent-secondary {
    border: 0;
    border-radius: 50rem;
    padding: .55rem 1.1rem;
    font-weight: 600;
    font-size: .82rem;
    cursor: pointer;
    transition: var(--tt-transition);
    white-space: nowrap;
}

.btn-consent-primary {
    background: var(--tt-primary);
    color: #fff;
}

.btn-consent-primary:hover {
    background: var(--tt-primary-dark);
    transform: translateY(-1px);
}

.btn-consent-secondary {
    background: transparent;
    color: var(--tt-text-muted);
}

.btn-consent-secondary:hover {
    background: var(--tt-light);
    color: var(--tt-dark);
}

@media (max-width: 767.98px) {
    .consent-banner-inner {
        flex-direction: column;
        padding: 1rem;
        gap: .75rem;
    }

    .consent-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* Lift FAB above banner so the banner doesn't cover it on mobile */
    body:has(.consent-banner:not([hidden])) .wa-fab {
        bottom: calc(180px + env(safe-area-inset-bottom));
    }
}
