/* ═══════════════════════════════════════════════
   AXN Chat — Floating Button & Popup Styles
   ═══════════════════════════════════════════════ */

/* ── Root: show correct button per mode ─── */
.axn-mode-chat .axn-whatsapp-button { display: none !important; }
.axn-mode-chat .axn-chat-button     { display: flex; }

.axn-mode-whatsapp .axn-chat-button     { display: none !important; }
.axn-mode-whatsapp .axn-whatsapp-button { display: flex; }

/* ── Chat Button ──────────────────────────── */
.axn-chat-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--axn-btn-color, #f97316);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
    user-select: none;
    animation: axn-slide-up 0.4s ease-out;
}

.axn-chat-button:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 28px rgba(0,0,0,0.35);
}

.axn-chat-button:active {
    transform: scale(0.97);
}

.axn-chat-button svg {
    flex-shrink: 0;
}

.axn-chat-label {
    white-space: nowrap;
}

/* ── WhatsApp Button ──────────────────────── */
.axn-whatsapp-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: axn-slide-up 0.4s ease-out;
}

.axn-whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

.axn-whatsapp-button:active {
    transform: scale(0.95);
}

/* ── Popup ────────────────────────────────── */
.axn-chat-popup {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 99999;
    width: 420px;
    max-width: calc(100vw - 48px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #0a0a0f;
    border-radius: 16px;
    box-shadow: 0 8px 48px rgba(0,0,0,0.4);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: axn-popup-in 0.3s ease-out;
    border: 1px solid rgba(255,255,255,0.08);
}

.axn-chat-popup.open {
    display: flex;
}

.axn-chat-popup.closing {
    animation: axn-popup-out 0.2s ease-in forwards;
}

.axn-chat-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f97316;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-size: 15px;
    flex-shrink: 0;
}

.axn-chat-popup-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.axn-chat-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.axn-chat-close:hover {
    background: rgba(255,255,255,0.35);
}

/* ── Animations ───────────────────────────── */
@keyframes axn-slide-up {
    from { transform: translateY(80px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

@keyframes axn-popup-in {
    from { transform: translateY(20px) scale(0.95); opacity: 0; }
    to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

@keyframes axn-popup-out {
    from { transform: translateY(0)    scale(1);    opacity: 1; }
    to   { transform: translateY(20px) scale(0.95); opacity: 0; }
}

/* ── Mobile ───────────────────────────────── */
@media (max-width: 768px) {
    .axn-chat-button {
        bottom: 16px;
        right: 16px;
        padding: 10px 16px;
        font-size: 14px;
        gap: 6px;
    }

    .axn-chat-label {
        display: none;
    }

    .axn-whatsapp-button {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
    }

    .axn-chat-popup {
        bottom: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }

    .axn-chat-popup-header {
        padding-top: max(14px, env(safe-area-inset-top));
        border-radius: 0;
    }

    .axn-chat-close {
        width: 36px;
        height: 36px;
    }
}

/* ── Reduced motion ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .axn-chat-button,
    .axn-whatsapp-button,
    .axn-chat-popup {
        animation: none;
    }
}