/* ==================== WIDGET CONTAINER ==================== */
.vcw-widget {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
}

.vcw-widget.vcw-bottom-right {
    bottom: 20px;
    right: 20px;
    align-items: flex-end;
}

.vcw-widget.vcw-bottom-left {
    bottom: 20px;
    left: 20px;
    align-items: flex-start;
}

.vcw-widget.vcw-top-right {
    top: 20px;
    right: 20px;
    align-items: flex-end;
}

.vcw-widget.vcw-top-left {
    top: 20px;
    left: 20px;
    align-items: flex-start;
}

/* ==================== DANH SÁCH NÚT PILL ==================== */
.vcw-pill-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.vcw-widget.vcw-open .vcw-pill-list {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.vcw-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px 8px 8px;
    border-radius: 50px;
    background: linear-gradient(135deg, #d9b487 0%, #b98a54 100%);
    color: #3c2a1a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vcw-pill:hover {
    transform: translateX(-4px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    color: #3c2a1a;
}

.vcw-widget.vcw-bottom-left .vcw-pill:hover,
.vcw-widget.vcw-top-left .vcw-pill:hover {
    transform: translateX(4px);
}

.vcw-pill-icon {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vcw-pill-icon svg {
    width: 20px;
    height: 20px;
    color: #b98a54;
}

.vcw-pill--whatsapp .vcw-pill-icon svg {
    color: #25d366;
}

.vcw-pill--messenger .vcw-pill-icon svg {
    color: #0084ff;
}

.vcw-pill--zalo .vcw-pill-icon svg {
    width: 26px;
    height: 26px;
}

.vcw-pill--popup .vcw-pill-icon svg {
    color: #b98a54;
}

.vcw-pill-text {
    display: block;
}

/* ==================== NÚT TRÒN BẬT/TẮT (FAB) ==================== */
.vcw-fab-toggle {
    position: relative;
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d9b487 0%, #b98a54 100%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    color: #3c2a1a;
    padding: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    --vcw-ring: rgba(185, 138, 84, 0.5);
}

.vcw-fab-toggle:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

.vcw-fab-icon {
    position: absolute;
    width: 28px;
    height: 28px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.vcw-fab-icon--phone {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    animation: vcw-shake 2.4s ease-in-out infinite;
    transform-origin: center;
}

.vcw-fab-icon--close {
    opacity: 0;
    transform: scale(0.5) rotate(-45deg);
}

.vcw-fab-toggle:hover .vcw-fab-icon--phone {
    animation-play-state: paused;
}

.vcw-widget.vcw-open .vcw-fab-icon--phone {
    opacity: 0;
    transform: scale(0.5) rotate(45deg);
    animation: none;
}

.vcw-widget.vcw-open .vcw-fab-icon--close {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* ==================== HIỆU ỨNG VÒNG SÓNG QUANH FAB ==================== */
.vcw-waves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.vcw-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--vcw-ring);
    border-radius: 50%;
    opacity: 0;
    transform: scale(1);
    animation: vcw-ring 2.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.vcw-wave:nth-child(2) {
    animation-delay: 0.8s;
}

.vcw-wave:nth-child(3) {
    animation-delay: 1.6s;
}

@keyframes vcw-ring {
    0% {
        opacity: 0.85;
        transform: scale(1);
    }
    70% {
        opacity: 0.25;
    }
    100% {
        opacity: 0;
        transform: scale(1.85);
    }
}

@keyframes vcw-shake {
    0%, 46%, 100% {
        transform: rotate(0);
    }
    4%, 12%, 20%, 28% {
        transform: rotate(-13deg);
    }
    8%, 16%, 24%, 32% {
        transform: rotate(13deg);
    }
}

.vcw-fab-toggle:hover .vcw-wave {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .vcw-wave,
    .vcw-fab-icon--phone {
        animation: none;
    }

    .vcw-wave {
        opacity: 0;
    }
}

/* ==================== RESPONSIVE - MOBILE ==================== */
@media (max-width: 768px) {
    .vcw-widget.vcw-bottom-right,
    .vcw-widget.vcw-bottom-left {
        bottom: 14px;
    }

    .vcw-widget.vcw-top-right,
    .vcw-widget.vcw-top-left {
        top: 14px;
    }

    .vcw-widget.vcw-bottom-right,
    .vcw-widget.vcw-top-right {
        right: 14px;
    }

    .vcw-widget.vcw-bottom-left,
    .vcw-widget.vcw-top-left {
        left: 14px;
    }

    .vcw-fab-toggle {
        width: 56px;
        height: 56px;
    }

    .vcw-fab-icon {
        width: 24px;
        height: 24px;
    }

    .vcw-pill {
        padding: 7px 14px 7px 7px;
        font-size: 12.5px;
        max-width: 78vw;
        white-space: normal;
    }

    .vcw-pill-icon {
        width: 30px;
        height: 30px;
    }

    .vcw-pill-icon svg {
        width: 17px;
        height: 17px;
    }

    .vcw-pill--zalo .vcw-pill-icon svg {
        width: 22px;
        height: 22px;
    }

    @keyframes vcw-ring {
        0% {
            opacity: 0.85;
            transform: scale(1);
        }
        70% {
            opacity: 0.25;
        }
        100% {
            opacity: 0;
            transform: scale(1.4);
        }
    }
}

/* ==================== POPUP MODAL ==================== */
.vcw-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
}

.vcw-popup-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.vcw-popup-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.vcw-popup-modal.active {
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Popup Header */
.vcw-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #FF9500 0%, #FF7E00 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

.vcw-popup-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.vcw-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.vcw-popup-close:hover {
    transform: rotate(90deg);
}

/* Popup Body */
.vcw-popup-body {
    padding: 25px;
    background: white;
    max-height: 70vh;
    overflow-y: auto;
}

/* ==================== MOBILE POPUP ==================== */
@media (max-width: 768px) {
    .vcw-popup-modal {
        width: 95%;
        max-width: 100%;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        transform: none;
        border-radius: 16px 16px 0 0;
        max-height: 80vh;
    }

    .vcw-popup-modal.active {
        animation: slideUpMobile 0.3s ease;
    }

    @keyframes slideUpMobile {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    .vcw-popup-header {
        padding: 18px;
        border-radius: 16px 16px 0 0;
    }

    .vcw-popup-header h2 {
        font-size: 18px;
    }

    .vcw-popup-body {
        padding: 20px;
    }
}
