/* ==================== WIDGET CONTAINER ==================== */
.vcw-widget {
    position: fixed;
    z-index: 9999;
    display: flex;
    gap: 15px;
    padding: 10px;
}

/* Vị trí Bottom Right (mặc định) */
.vcw-widget.vcw-bottom-right {
    bottom: 20px;
    right: 20px;
    flex-direction: column;
}

/* Vị trí Bottom Left */
.vcw-widget.vcw-bottom-left {
    bottom: 20px;
    left: 20px;
    flex-direction: column;
}

/* Vị trí Top Right */
.vcw-widget.vcw-top-right {
    top: 20px;
    right: 20px;
    flex-direction: column;
}

/* Vị trí Top Left */
.vcw-widget.vcw-top-left {
    top: 20px;
    left: 20px;
    flex-direction: column;
}

/* ==================== ICON STYLES ==================== */
.vcw-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    animation: vcw-pulse 2s ease-in-out infinite;
}

.vcw-icon svg {
    width: 28px;
    height: 28px;
    margin-bottom: 2px;
    animation: vcw-icon-zoom 2s ease-in-out infinite;
}

.vcw-icon img {
    width: 28px;
    height: 28px;
    margin-bottom: 2px;
    animation: vcw-icon-zoom 2s ease-in-out infinite;
}

/* Continuous pulse animation */
.vcw-icon {
    animation: vcw-pulse 3s ease-in-out infinite;
}

.vcw-icon svg,
.vcw-icon img {
    animation: vcw-icon-zoom 3s ease-in-out infinite;
}

/* Ripple effect continuous */
.vcw-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    animation: vcw-ripple 3s ease-in-out infinite;
}

/* Keyframes for animations */
@keyframes vcw-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    }
}

@keyframes vcw-icon-zoom {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes vcw-ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        width: 140px;
        height: 140px;
        opacity: 0;
    }
}

/* Hotline - Đỏ */
.vcw-icon.vcw-hotline {
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
}

/* Zalo - Xanh dương */
.vcw-icon.vcw-zalo {
    background: linear-gradient(135deg, #0084FF 0%, #0066CC 100%);
}

/* Messenger - Xanh lam */
.vcw-icon.vcw-messenger {
    background: linear-gradient(135deg, #00B2E3 0%, #0084FF 100%);
}

/* WhatsApp - Xanh lá */
.vcw-icon.vcw-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

/* Popup/Chat - Vàng cam */
.vcw-icon.vcw-popup {
    background: linear-gradient(135deg, #FF9500 0%, #FF7E00 100%);
    cursor: pointer;
}

.vcw-text {
    margin-top: 2px;
    display: block;
    font-size: 10px;
}

/* ==================== RESPONSIVE - MOBILE ==================== */
@media (max-width: 768px) {
    .vcw-widget {
        flex-direction: row;
        gap: 8px;
        padding: 5px;
    }

    .vcw-widget.vcw-bottom-right,
    .vcw-widget.vcw-bottom-left,
    .vcw-widget.vcw-top-right,
    .vcw-widget.vcw-top-left {
        flex-direction: row;
        bottom: auto;
        top: auto;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        bottom: 10px;
        border-radius: 50px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
        padding: 8px 12px;
    }

    .vcw-icon {
        width: 50px;
        height: 50px;
    }

    .vcw-icon svg {
        width: 24px;
        height: 24px;
    }

    .vcw-text {
        display: none;
    }
}

/* ==================== 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;
    }
}
