/* Popup de WhatsApp - Overlay */
.whatsapp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.whatsapp-popup-overlay.show {
    display: flex;
    opacity: 1;
}

/* Contenedor del popup */
.whatsapp-popup {
    position: fixed;
    bottom: -100%;
    right: 20px;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 20px 20px 5px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.whatsapp-popup.show {
    bottom: 90px;
}

/* Header del popup */
.whatsapp-popup-header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 20px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.whatsapp-popup-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.whatsapp-popup-title {
    flex: 1;
}

.whatsapp-popup-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Arial', sans-serif;
}

.whatsapp-popup-title p {
    margin: 5px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
    font-family: 'Arial', sans-serif;
}

.whatsapp-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-popup-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Cuerpo del popup */
.whatsapp-popup-body {
    padding: 25px 20px;
    background: #f8f9fa;
}

.whatsapp-popup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.whatsapp-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.whatsapp-form-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    font-family: 'Arial', sans-serif;
}

.whatsapp-form-input {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Arial', sans-serif;
    transition: border-color 0.3s ease;
    background: white;
}

.whatsapp-form-input:focus {
    outline: none;
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.whatsapp-form-input::placeholder {
    color: #999;
}

/* Validación */
.whatsapp-form-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    font-family: 'Arial', sans-serif;
}

.whatsapp-form-input.error {
    border-color: #e74c3c;
}

.whatsapp-form-input.error + .whatsapp-form-error {
    display: block;
}

/* Botón enviar */
.whatsapp-submit-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Arial', sans-serif;
}

.whatsapp-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-submit-btn:active {
    transform: translateY(0);
}

.whatsapp-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Icono de WhatsApp */
.whatsapp-icon {
    font-size: 20px;
}

/* Responsive */
@media (max-width: 480px) {
    .whatsapp-popup {
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        bottom: -100%;
    }
    
    .whatsapp-popup.show {
        bottom: 80px;
    }
    
    .whatsapp-popup-header {
        padding: 15px;
    }
    
    .whatsapp-popup-logo {
        width: 80px;
        height: 80px;
    }
    
    .whatsapp-popup-title h3 {
        font-size: 16px;
    }
    
    .whatsapp-popup-title p {
        font-size: 13px;
    }
    
    .whatsapp-popup-body {
        padding: 20px 15px;
    }
}

/* Animación de entrada del overlay */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.whatsapp-popup-overlay.show {
    animation: fadeIn 0.3s ease;
}