/* WhatsApp Widget - Modern & Minimal */
.whatsapp-widget {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: calc(100vw - 40px);
}

/* Trigger Button - Pill Shape with Text */
.whatsapp-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    border: none;
    outline: none;
    color: white;
    font-weight: 600;
    font-size: 15px;
}

.whatsapp-trigger:hover {
    transform: translateX(5px);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
}

/* WhatsApp Icon */
.whatsapp-trigger-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    position: relative;
}

.whatsapp-trigger-icon svg {
    width: 100%;
    height: 100%;
    fill: white;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Text */
.whatsapp-trigger-text {
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Notification Badge */
.whatsapp-trigger-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: pulse-badge 1.5s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.5);
}

/* Pulse Ring */
.whatsapp-trigger-pulse {
    position: absolute;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    border-radius: 50px;
    border: 2px solid rgba(37, 211, 102, 0.5);
    top: -5px;
    left: -5px;
    animation: pulse-ring 2s infinite;
    pointer-events: none;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.15);
        opacity: 0;
    }
}

/* Popup Panel - Direct child of body */
.whatsapp-popup {
    position: fixed;
    left: 180px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    width: 320px;
    max-width: 320px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    z-index: 9998;
}

.whatsapp-popup.active {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

/* Header */
.whatsapp-popup-header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    padding: 20px;
    color: white;
}

.whatsapp-popup-header h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
}

.whatsapp-popup-header p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

/* Close Button */
.whatsapp-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
    z-index: 1;
}

.whatsapp-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Contact List */
.whatsapp-contacts {
    padding: 15px;
}

.whatsapp-contact {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    margin-bottom: 8px;
    background: #f8f9fa;
}

.whatsapp-contact:last-child {
    margin-bottom: 0;
}

.whatsapp-contact:hover {
    background: #e8f5e9;
    transform: translateX(5px);
}

.whatsapp-contact-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.whatsapp-contact-avatar svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.whatsapp-contact-info {
    flex: 1;
}

.whatsapp-contact-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.whatsapp-contact-number {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.whatsapp-contact-arrow {
    color: #25D366;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.2s;
}

.whatsapp-contact:hover .whatsapp-contact-arrow {
    opacity: 1;
}

/* Footer */
.whatsapp-popup-footer {
    padding: 15px;
    background: #f8f9fa;
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .whatsapp-widget {
        left: 15px;
        right: auto;
        bottom: 15px;
        top: auto;
        transform: none;
        max-width: calc(100vw - 30px);
    }
    
    .whatsapp-trigger {
        padding: 12px 16px;
        font-size: 13px;
        gap: 8px;
    }
    
    .whatsapp-trigger-icon {
        width: 22px;
        height: 22px;
    }
    
    .whatsapp-trigger-text {
        font-size: 13px;
    }
    
    .whatsapp-trigger-badge {
        width: 18px;
        height: 18px;
        font-size: 10px;
        top: -4px;
        right: -4px;
    }
    
    .whatsapp-popup {
        position: fixed;
        left: 15px;
        right: 15px;
        bottom: 75px;
        top: auto;
        width: auto;
        max-width: calc(100vw - 30px);
        transform: translateY(20px) scale(0);
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
    
    .whatsapp-popup.active {
        transform: translateY(0) scale(1);
    }
}

/* Slide In Animation */
@keyframes slideIn {
    from {
        transform: translateY(-50%) translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
    }
}

.whatsapp-widget.show {
    animation: slideIn 0.5s ease-out;
}

@media (max-width: 768px) {
    @keyframes slideIn {
        from {
            transform: translateX(-100px);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }
}
