/**
 * Estilos para Modal de Filtrado WhatsApp
 */

/* ============================================================
   MODAL BASE
   ============================================================ */
.whatsapp-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.whatsapp-modal.hidden {
    display: none;
}

.whatsapp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.whatsapp-modal-content {
    position: relative;
    z-index: 10;
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   ANIMACIONES
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================================
   BOTÓN CERRAR
   ============================================================ */
.whatsapp-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s;
    z-index: 11;
}

.whatsapp-modal-close:hover {
    color: #333;
}

/* ============================================================
   PASOS DEL MODAL
   ============================================================ */
.whatsapp-step {
    padding: 40px 30px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.whatsapp-step.hidden {
    display: none;
}

.whatsapp-step h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.whatsapp-subtitle {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

/* ============================================================
   BOTÓN VOLVER
   ============================================================ */
.whatsapp-back {
    background: none;
    border: none;
    color: #0066CC;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.whatsapp-back:hover {
    color: #004C99;
}

/* ============================================================
   STEP 1: SELECCIÓN DE ROL
   ============================================================ */
.whatsapp-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.whatsapp-option {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.whatsapp-option:hover {
    border-color: #0066CC;
    background: #f9f9ff;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.1);
}

.whatsapp-option i {
    font-size: 1.8rem;
    color: #0066CC;
    min-width: 30px;
    margin-top: 3px;
}

.whatsapp-option .option-title {
    display: block;
    font-weight: 600;
    color: #1a1a2e;
    font-size: 1rem;
    margin-bottom: 4px;
}

.whatsapp-option .option-desc {
    display: block;
    font-size: 0.85rem;
    color: #666;
}

/* ============================================================
   FORMULARIOS
   ============================================================ */
.whatsapp-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

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

.form-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.form-error.hidden {
    display: none;
}

/* ============================================================
   BOTÓN SUBMIT
   ============================================================ */
.whatsapp-submit {
    padding: 14px 24px;
    background: linear-gradient(135deg, #0066CC 0%, #004C99 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.whatsapp-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.3);
}

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

/* ============================================================
   STEP 4: PACIENTE BLOQUEADO
   ============================================================ */
.whatsapp-patient-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 0;
}

.whatsapp-patient-info i {
    font-size: 3.5rem;
    color: #0066CC;
    margin-bottom: 20px;
}

.whatsapp-patient-info h2 {
    font-size: 1.6rem;
    margin-bottom: 25px;
}

.info-content {
    text-align: left;
    margin-bottom: 30px;
}

.info-content p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.patient-steps {
    list-style: none;
    padding: 0;
    margin: 20px 0 25px;
    background: #f9f9ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #0066CC;
}

.patient-steps li {
    margin-bottom: 12px;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.6;
}

.patient-steps li:last-child {
    margin-bottom: 0;
}

.info-note {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    color: #856404;
    font-size: 0.9rem;
}

.whatsapp-close-btn {
    padding: 12px 30px;
    background: #e8e8e8;
    color: #333;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.whatsapp-close-btn:hover {
    background: #d5d5d5;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 576px) {
    .whatsapp-modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 15px;
    }

    .whatsapp-step {
        padding: 30px 20px;
        min-height: auto;
    }

    .whatsapp-step h2 {
        font-size: 1.4rem;
    }

    .whatsapp-option {
        padding: 15px;
        gap: 12px;
    }

    .whatsapp-option i {
        font-size: 1.5rem;
    }

    .whatsapp-option .option-title {
        font-size: 0.95rem;
    }

    .whatsapp-option .option-desc {
        font-size: 0.8rem;
    }

    .whatsapp-modal-close {
        top: 10px;
        right: 10px;
        font-size: 1.5rem;
    }

    .whatsapp-patient-info i {
        font-size: 2.5rem;
    }

    .whatsapp-patient-info h2 {
        font-size: 1.3rem;
    }
}
