/* ============================================================
   Inspire Capital — WhatsApp Chat Widget Styles
   Design: Navy (#00122c) + Gold (#d4af37) premium palette
   ============================================================ */

/* ── Container ─────────────────────────────────────────────── */
#wa-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    font-family: 'Inter', sans-serif;
    pointer-events: none; /* Let clicks pass through the invisible flex container */
}

/* ── FAB Button ────────────────────────────────────────────── */
.wa-fab {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366 0%, #128C7E 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.40), 0 2px 8px rgba(0,0,0,0.18);
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
                box-shadow 0.25s ease;
    outline: none;
    flex-shrink: 0;
    pointer-events: auto; /* Re-enable clicks on the button itself */
}

.wa-fab:hover {
    transform: scale(1.10);
    box-shadow: 0 10px 32px rgba(37, 211, 102, 0.50), 0 4px 12px rgba(0,0,0,0.22);
}

.wa-fab--open {
    background: linear-gradient(135deg, #0d2850 0%, #00122c 100%);
    box-shadow: 0 6px 24px rgba(0,18,44, 0.45), 0 2px 8px rgba(0,0,0,0.2);
}

.wa-fab--open:hover {
    box-shadow: 0 10px 32px rgba(0,18,44, 0.55), 0 4px 12px rgba(0,0,0,0.25);
}

.wa-fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s ease;
}

/* ── Pulse ring animation ──────────────────────────────────── */
.wa-pulse-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.6);
    animation: wa-pulse 2.4s ease-out infinite;
    pointer-events: none;
}

.wa-fab--open .wa-pulse-ring {
    animation: none;
    opacity: 0;
}

@keyframes wa-pulse {
    0%   { transform: scale(1);    opacity: 0.8; }
    70%  { transform: scale(1.45); opacity: 0; }
    100% { transform: scale(1.45); opacity: 0; }
}

/* ── Popup Card ────────────────────────────────────────────── */
#wa-popup {
    width: 320px;
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 18, 44, 0.18), 0 4px 16px rgba(0,0,0,0.10);
    border: 1px solid rgba(212, 175, 55, 0.18);

    /* Hidden state */
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.30s ease, transform 0.35s cubic-bezier(0.34,1.36,0.64,1);
    transform-origin: bottom right;
}

#wa-popup.wa-popup--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ── Popup Header ──────────────────────────────────────────── */
.wa-popup-header {
    background: linear-gradient(135deg, #00122c 0%, #0d2850 100%);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.35);
    position: relative;
}

.wa-avatar {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366 0%, #128C7E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.30);
}

.wa-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 11px;
    height: 11px;
    background: #4ade80;
    border-radius: 50%;
    border: 2px solid #00122c;
    animation: wa-blink 2s ease-in-out infinite;
}

@keyframes wa-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

.wa-agent-info {
    flex: 1;
    min-width: 0;
}

.wa-agent-name {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.wa-agent-role {
    margin: 2px 0 0;
    font-size: 11.5px;
    color: #d4af37;
    font-weight: 500;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.wa-close-btn {
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255,255,255,0.70);
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
    padding: 0;
}

.wa-close-btn:hover {
    background: rgba(255,255,255,0.22);
    color: #ffffff;
}

/* ── Chat Body ─────────────────────────────────────────────── */
.wa-popup-body {
    background: #efeae2;  /* WhatsApp-style warm background */
    padding: 18px 14px 12px;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9b89a' fill-opacity='0.12'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.wa-message-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.wa-message-bubble {
    background: #ffffff;
    border-radius: 0 14px 14px 14px;
    padding: 12px 14px 8px;
    max-width: 92%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.wa-message-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-top: 8px solid #ffffff;
    border-left: 8px solid transparent;
}

.wa-message-bubble p {
    margin: 0 0 4px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #111827;
    font-weight: 400;
}

.wa-msg-time {
    display: block;
    font-size: 10.5px;
    color: #9ca3af;
    text-align: right;
    margin-top: 2px;
}

/* ── CTA Footer ────────────────────────────────────────────── */
.wa-popup-footer {
    padding: 12px 14px 14px;
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
}

.wa-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #25d366 0%, #128C7E 100%);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.wa-cta-btn:hover {
    opacity: 0.93;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

/* ── Gold accent strip on popup bottom ─────────────────────── */
#wa-popup::after {
    content: '';
    display: block;
    height: 2px;
    background: linear-gradient(90deg, #d4af37, #e2c158, #d4af37);
    margin: 0;
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
    #wa-widget {
        bottom: 18px;
        right: 16px;
    }

    #wa-popup {
        width: calc(100vw - 48px);
        max-width: 300px;
    }
}
