/**
 * Modal de Inscripción
 */

.modal-inscripcion {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 24, 40, 0.8);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-container {
    position: relative;
    background: white;
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

.modal-waves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--color-dark);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: var(--bg-light);
    transform: rotate(90deg);
}

.modal-content {
    padding: 5rem 2.5rem 3rem;
}

.modal-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.modal-icon {
    width: 120px;
    height: auto;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.modal-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.modal-header p {
    font-size: 1rem;
    color: var(--color-text-light);
    margin: 0;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-dark);
}

.form-group input {
    padding: 0.875rem 1rem;
    border: 2px solid #E5EFF7;
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(29, 112, 183, 0.1);
}

.modal-form.was-validated .form-group input:invalid {
    border-color: #dc3545;
}

.modal-form.was-validated .form-group input:valid {
    border-color: var(--color-primary);
}

.form-actions {
    margin-top: 1rem;
}

.form-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

.btn-loading {
    display: none;
}

.form-message {
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Mensaje de éxito moderno */
.modal-success {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
}

.modal-success.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1D70B7 0%, #9ABFDF 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.modal-success h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--color-dark);
    margin: 0;
}

.modal-success p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin: 0;
    max-width: 400px;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        padding: 4rem 1.5rem 2rem;
    }
    
    .modal-waves {
        height: 60px;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
    }
    
    .modal-icon {
        width: 100px;
    }
    
    .modal-logo {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .modal-container {
        border-radius: 16px;
        max-height: 95vh;
    }
    
    .modal-content {
        padding: 3.5rem 1rem 1.5rem;
    }
    
    .modal-waves {
        height: 50px;
    }
    
    .form-group input {
        padding: 0.75rem;
    }
}

/* Prevenir scroll del body cuando el modal está abierto */
body.modal-open {
    overflow: hidden;
}
