﻿
/* ===== NÚT CHAT FLOAT ===== */
.chat-toggle-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0,0,0,0.25);
    z-index: 9999;
    user-select: none;
    transition: all 0.25s ease;
}

    /* Hover kiểu nổi */
    .chat-toggle-btn:hover {
        transform: scale(1.08);
        box-shadow: 0 14px 36px rgba(0,0,0,0.35);
    }

    /* Hiệu ứng pulse nhẹ (Messenger style) */
    .chat-toggle-btn::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: rgba(11, 107, 54, 0.4);
        animation: pulse 2s infinite;
        z-index: -1;
    }

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    70% {
        transform: scale(1.6);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* ===== POPUP CHAT ===== */
.chat-popup {
    position: fixed;
    right: 24px;
    bottom: 96px;
    width: min(350px, calc(100vw - 24px)); /* 🔥 chuẩn nhất */

    height: 560px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0,0,0,0.3);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
}

.chat-popup.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}


/* ===== HEADER ===== */
.chat-header {
    flex-shrink: 0;
    height: 54px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}


/* Nút đóng */
.chat-close-btn {
    border: none;
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    transition: all 0.2s;
}

.chat-close-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* ===== DEEP CHAT ===== */
deep-chat {
    flex: 1;
    min-height: 0; /* cực kỳ quan trọng */
}

/* ===== MOBILE ===== */
@@media (max-width: 576px) {

    .chat-popup {
        position: fixed;
        top: 0;
        left: 0;
        right: 0 !important;
        bottom: 0;
        width: 100% !important;
        height: 100% !important;
        border-radius: 0; /* bỏ bo góc cho full screen */
        margin: 0;
        padding: 0;
        z-index: 9999;
    }

    .chat-toggle-btn {
        right: 16px;
        bottom: 16px;
    }
}
