/* ═══════════════════════════════════════════════════════════
   FLOATING WHATSAPP WIDGET
   ═══════════════════════════════════════════════════════════ */

.wa-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37,211,102,.4);
    cursor: pointer;
    z-index: 998;
    border: none;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.wa-fab:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 28px rgba(37,211,102,.5);
}
.wa-fab svg {
    width: 30px;
    height: 30px;
    fill: var(--white);
}
.wa-fab__ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: waPulse 2.4s ease-out infinite;
    pointer-events: none;
}
@keyframes waPulse {
    0%   { transform: scale(.9); opacity: .8; }
    70%  { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* Back-to-top offset so it doesn't collide with WhatsApp fab */
.back-to-top {
    right: 92px !important;
}

/* ── Popup panel ─────────────────────────────────────────── */
.wa-panel {
    position: fixed;
    right: 22px;
    bottom: 94px;
    width: 320px;
    max-width: calc(100vw - 44px);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px) scale(.95);
    pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.wa-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.wa-panel__header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light, #137a56) 100%);
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--white);
}
.wa-panel__header img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--white);
    object-fit: contain;
    padding: 3px;
}
.wa-panel__header-text strong {
    display: block;
    font-family: var(--font-display);
    font-size: .9rem;
}
.wa-panel__header-text span {
    font-size: .7rem;
    opacity: .85;
}
.wa-panel__close {
    margin-left: auto;
    background: rgba(255,255,255,.15);
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wa-panel__body {
    background: #e5ddd5;
    background-image: linear-gradient(rgba(255,255,255,.4), rgba(255,255,255,.4)),
        repeating-linear-gradient(45deg, rgba(0,0,0,.02) 0, rgba(0,0,0,.02) 1px, transparent 1px, transparent 12px);
    padding: 1rem;
    min-height: 120px;
}
.wa-panel__bubble {
    background: var(--white);
    border-radius: 0 10px 10px 10px;
    padding: .6rem .8rem;
    font-size: .8rem;
    color: #2a2a2a;
    max-width: 88%;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
    line-height: 1.45;
}
.wa-panel__time {
    font-size: .65rem;
    color: #999;
    margin-top: .3rem;
    display: block;
}
.wa-panel__lines {
    padding: .5rem .9rem;
    background: var(--white);
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}
.wa-panel__line-btn {
    text-align: left;
    background: #f4f4f4;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: .45rem .6rem;
    font-size: .72rem;
    color: #333;
    cursor: pointer;
    transition: background .2s;
}
.wa-panel__line-btn:hover { background: #ececec; }
.wa-panel__footer {
    display: flex;
    gap: .5rem;
    padding: .7rem;
    background: var(--white);
    border-top: 1px solid #eee;
}
.wa-panel__input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: .5rem .9rem;
    font-size: .78rem;
    resize: none;
    max-height: 70px;
    font-family: var(--font-body);
}
.wa-panel__input:focus {
    outline: none;
    border-color: #25D366;
}
.wa-panel__send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #25D366;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.wa-panel__send svg {
    width: 17px;
    height: 17px;
    fill: var(--white);
}

@media (max-width: 480px) {
    .wa-fab { right: 16px; bottom: 16px; width: 54px; height: 54px; }
    .wa-panel { right: 16px; bottom: 82px; }
    .back-to-top { right: 80px !important; }
}
