/* ===== VARIABLES ===== */
:root {
    --modal-bg: rgba(0, 0, 0, 0.8);
    --modal-content-bg: #ffffff;
    --modal-border-radius: 16px;
    --modal-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    --modal-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== MODAL OVERLAY ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-bg);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    animation: modalFadeIn 0.3s ease forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== MODAL CONTAINER ===== */
.modal-container {
    background: var(--modal-content-bg);
    border-radius: var(--modal-border-radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--modal-shadow);
    transform: translateY(30px);
    transition: transform 0.4s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
    animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MODAL HEADER ===== */
.modal-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ===== MODAL BODY ===== */
.modal-body {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(90vh - 150px);
}

/* ===== BARRA DE PROGRESO ===== */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.progress-bar:before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 600;
    transition: var(--transition);
}

.progress-step.active .step-number {
    background: var(--dark-color);
    box-shadow: 0 4px 15px rgba(26, 10, 78, 0.3);
}

.progress-step.completed .step-number {
    background: var(--success-color);
}

.step-label {
    font-size: 0.85rem;
    color: var(--gray-color);
    font-weight: 500;
}

.progress-step.active .step-label {
    color: var(--accent-color);
    font-weight: 600;
}

/* ===== FORM STEPS ===== */
.form-step {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    margin-bottom: 25px;
    text-align: center;
}

.step-header h4 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.step-header p {
    color: var(--gray-color);
    font-size: 0.95rem;
}

/* ===== FORM CONTROLS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 0.95rem;
}

.form-group .required {
    color: #ef4444;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--dark-color);
    background: white;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(40, 42, 43, 0.1);
}

.form-control.error {
    border-color: #ef4444;
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.radio-option:hover {
    border-color: var(--primary-color);
    background: rgba(40, 42, 43, 0.02);
}

.radio-option input {
    margin-right: 12px;
}

.radio-option label {
    margin-bottom: 0;
    cursor: pointer;
    flex: 1;
}

/* ===== FORM ACTIONS ===== */
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    flex: 1;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 42, 43, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== CONFIRMATION STEP ===== */
.confirmation-step {
    text-align: center;
    padding: 20px 0;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 2.5rem;
    animation: iconPulse 1s ease;
}

@keyframes iconPulse {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.confirmation-step h4 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.confirmation-step p {
    color: var(--gray-color);
    margin-bottom: 25px;
    line-height: 1.7;
}

.confirmation-details {
    background: var(--light-color);
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--gray-color);
    font-weight: 500;
}

.detail-value {
    color: var(--dark-color);
    font-weight: 600;
}

/* ===== MODAL FOOTER ===== */
.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: var(--light-color);
    text-align: center;
}

.modal-footer p {
    color: var(--gray-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-footer i {
    color: var(--accent-color);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .modal-body {
        padding: 25px 20px;
        max-height: 70vh;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .progress-bar:before {
        left: 40px;
        right: 40px;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px 15px;
    }
    
    .step-header h4 {
        font-size: 1.2rem;
    }
    
    .form-control {
        padding: 12px 14px;
    }
}