/**
 * Benglish Academy - Password Reset Modal Styles
 * Estilos profesionales que respetan el look & feel del portal
 */

/* ========================================
   Modal Base
   ======================================== */

.benglish-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.benglish-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10001;
    margin: auto;
}

/* ========================================
   Modal Header
   ======================================== */

.benglish-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e8ecf1;
    background: linear-gradient(135deg, #0C4284 0%, #1a5fa8 100%);
}

.benglish-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.benglish-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    font-size: 20px;
    color: #ffffff;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.benglish-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: scale(1.05);
}

/* ========================================
   Stepper
   ======================================== */

.benglish-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px 20px;
    background-color: #fafbfc;
    border-bottom: 1px solid #e8ecf1;
}

.benglish-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.benglish-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e8ecf1;
    color: #95a5a6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.benglish-step.active .benglish-step-circle {
    background: linear-gradient(135deg, #0C4284 0%, #1a5fa8 100%);
    color: #ffffff;
    border-color: #0C4284;
    box-shadow: 0 3px 10px rgba(12, 66, 132, 0.3);
    transform: scale(1.05);
}

.benglish-step.completed .benglish-step-circle {
    background-color: #28a745;
    color: #ffffff;
}

.benglish-step.completed .benglish-step-circle::after {
    content: '\f00c';
    font-family: 'FontAwesome';
    position: absolute;
}

.benglish-step-label {
    margin-top: 8px;
    font-size: 11px;
    color: #7f8c8d;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    max-width: 80px;
}

.benglish-step.active .benglish-step-label {
    color: #0C4284;
    font-weight: 600;
}

.benglish-step.completed .benglish-step-label {
    color: #28a745;
}

.benglish-step-line {
    flex: 1;
    height: 2px;
    background-color: #e8ecf1;
    margin: 0 10px;
    position: relative;
    top: -15px;
    max-width: 60px;
    transition: all 0.3s ease;
}

.benglish-step.completed + .benglish-step-line {
    background-color: #28a745;
}

/* ========================================
   Modal Body
   ======================================== */

.benglish-modal-body {
    padding: 24px;
}

.benglish-step-content {
    display: none;
    animation: fadeInContent 0.4s ease-out;
}

.benglish-step-content.active {
    display: block;
}

.benglish-step-description {
    color: #5a6c7d;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
}

/* ========================================
   Form Elements
   ======================================== */

.benglish-form-group {
    margin-bottom: 18px;
}

.benglish-form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    font-size: 13px;
    letter-spacing: 0.01em;
}

.benglish-form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #1f2937;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
    background-color: #ffffff;
}

.benglish-form-control:hover {
    border-color: #9ca3af;
}

.benglish-form-control:focus {
    outline: none;
    border-color: #0C4284;
    box-shadow: 0 0 0 3px rgba(12, 66, 132, 0.08);
    background-color: #ffffff;
}

.benglish-form-control::placeholder {
    color: #9ca3af;
    font-size: 13px;
}

.benglish-otp-input {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 6px;
    font-family: 'Courier New', monospace;
    padding: 12px;
}

.benglish-form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

/* Campo de contraseña con toggle */
.benglish-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.benglish-password-wrapper input {
    padding-right: 42px;
}

.benglish-password-toggle {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benglish-password-toggle:hover {
    color: #4b5563;
    background-color: #f3f4f6;
}

/* ========================================
   Indicador de Fuerza de Contraseña
   ======================================== */

.benglish-password-strength {
    margin-top: 8px;
}

.benglish-strength-bar {
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.benglish-strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.benglish-strength-text {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

/* ========================================
   Alerts
   ======================================== */

.benglish-error-message,
.benglish-info-message,
.benglish-cooldown-message,
.benglish-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    margin: 12px 0;
    font-size: 13px;
    line-height: 1.4;
}

.benglish-error-message {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.benglish-info-message {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.benglish-cooldown-message {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.benglish-message {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ========================================
   Resend Section
   ======================================== */

.benglish-resend-section {
    text-align: center;
    margin: 16px 0;
    padding: 12px;
    background-color: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.benglish-resend-text {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #6b7280;
}

.benglish-cooldown-text {
    font-size: 12px;
    color: #9ca3af;
}

.benglish-cooldown-text strong {
    color: #0C4284;
    font-weight: 600;
}

/* ========================================
   Buttons
   ======================================== */

.benglish-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 100px;
}

.benglish-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.benglish-btn-primary {
    background: linear-gradient(135deg, #0C4284 0%, #1a5fa8 100%);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(12, 66, 132, 0.2);
}

.benglish-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(12, 66, 132, 0.3);
}

.benglish-btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(12, 66, 132, 0.2);
}

.benglish-btn-secondary {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.benglish-btn-secondary:hover:not(:disabled) {
    background-color: #e5e7eb;
    border-color: #9ca3af;
    color: #1f2937;
}

.benglish-btn-link {
    background: none;
    border: none;
    color: #0C4284;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.benglish-btn-link:hover {
    background-color: #f0f3ff;
    text-decoration: underline;
}

.benglish-btn .btn-spinner {
    display: inline-flex;
    align-items: center;
}

/* ========================================
   Form Actions
   ======================================== */

.benglish-form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.benglish-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

/* ========================================
   Success Message
   ======================================== */

.benglish-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 32px;
    animation: successPulse 0.6s ease-out;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.benglish-success-title {
    font-size: 20px;
    color: #1f2937;
    margin: 0 0 10px 0;
    font-weight: 600;
    text-align: center;
}

.benglish-success-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px 0;
    text-align: center;
    line-height: 1.5;
}

.benglish-success-message p {
    font-size: 15px;
    color: #5a6c7d;
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   Link en el login
   ======================================== */

.o-bl-forgot-password-link {
    text-align: center;
    margin-top: 16px;
}

.o-bl-link-primary {
    color: #0C4284;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
}

.o-bl-link-primary:hover {
    background-color: #e7f0f8;
    text-decoration: underline;
    color: #0a3670;
}

/* ========================================
   Animations
   ======================================== */

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

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

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .benglish-modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .benglish-modal-header,
    .benglish-modal-body {
        padding: 20px;
    }
    
    .benglish-stepper {
        padding: 24px 16px 20px;
    }
    
    .benglish-step-label {
        font-size: 11px;
    }
    
    .benglish-step-line {
        max-width: 40px;
        margin: 0 8px;
    }
    
    .benglish-step-circle {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .benglish-modal-footer {
        flex-direction: column;
    }
    
    .benglish-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .benglish-modal-title {
        font-size: 18px;
    }
    
    .benglish-step-label {
        display: none;
    }
    
    .benglish-stepper {
        padding: 20px 16px;
    }
}

/* ========================================
   Scrollbar personalizado
   ======================================== */

.benglish-modal-content::-webkit-scrollbar {
    width: 8px;
}

.benglish-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.benglish-modal-content::-webkit-scrollbar-thumb {
    background: #c1c9d2;
    border-radius: 4px;
}

.benglish-modal-content::-webkit-scrollbar-thumb:hover {
    background: #a8b3be;
}
