/* ==========================================================================
   CSS DEL POPUP (AISLADO Y PROTEGIDO)
   ========================================================================== */

/* Contenedor principal */
.popup-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.5); z-index: 9999; display: flex; 
    align-items: center; justify-content: center; 
}

.popup-content { 
    background: #fff; padding: 30px; width: 90%; max-width: 400px; 
    border-radius: 12px; position: relative; box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
}

.close-popup { position: absolute; right: 20px; top: 15px; font-size: 24px; cursor: pointer; color: #333; }

.popup-content h2 { font-size: 1.3rem; color: #000; margin-bottom: 10px; text-align: center; line-height: 1.3; }
.popup-content p { color: #666; text-align: center; font-size: 0.9rem; margin-bottom: 20px; }

/* REGLAS ESPECÍFICAS (Encapsuladas para no dañar el footer) */
.popup-content .row { display: flex; gap: 10px; margin-bottom: 10px; }
.popup-content input { padding: 12px; border: 1px solid #ccc; border-radius: 6px; width: 100%; outline: none; box-sizing: border-box; }

/* Grupo de teléfono */
.popup-content .phone-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; width: 100%; }

.popup-content .flag-select { 
    border: 1px solid #ccc; border-radius: 6px; background: #f9f9f9; 
    padding: 12px; width: 100%; box-sizing: border-box;
}

.popup-content .flag-select select { 
    border: none; background: none; outline: none; cursor: pointer; 
    font-size: 0.95rem; width: 100%; -webkit-appearance: none; appearance: none;
}

.popup-content .phone-group input[type="tel"] { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box; }

/* Checkbox */
.popup-content .checkbox-container { display: flex; align-items: flex-start; gap: 10px; width: 100%; margin: 15px 0; cursor: pointer; }
.popup-content .checkbox-container input { width: 18px !important; height: 18px; margin-top: 2px; flex-shrink: 0; }
.popup-content .checkbox-text { font-size: 0.8rem; color: #555; line-height: 1.4; }

/* Botones */
.popup-content .btn-descuento { 
    width: 100%; padding: 15px; background: #000; color: #fff; 
    border: none; border-radius: 6px; font-weight: bold; cursor: pointer; transition: background 0.3s;
}
.popup-content .btn-descuento:hover { background: #333; }
.popup-content .btn-no-gracias { width: 100%; background: none; border: none; color: #999; text-decoration: underline; cursor: pointer; margin-top: 10px; font-size: 0.9rem; }

/* Utilidades */
.hidden { display: none !important; }
.error-input { border: 1px solid #ff4d4d !important; }
.error-msg { color: #ff4d4d; font-size: 0.7rem; margin-top: -8px; margin-bottom: 8px; display: block; }
.swal2-container { z-index: 10000 !important; }