/**
 * URS Password Change - Styles
 * Version: 1.0.0
 */

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */

.urs-pwd-container {
    max-width: 450px;
    margin: 0 auto;
    padding: 0;
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.urs-pwd-container * {
    box-sizing: border-box;
}

/* ============================================
   PASOS (STEPS)
   ============================================ */

.urs-pwd-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.urs-pwd-step.active {
    display: block;
}

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

/* ============================================
   HEADER
   ============================================ */

.urs-pwd-header {
    text-align: center;
    margin-bottom: 30px;
}

.urs-pwd-header h3 {
    color: #1a1a1a;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px;
}

.urs-pwd-header p {
    color: #666666;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.urs-pwd-header p strong {
    color: #8B0000;
}

/* ============================================
   FORMULARIO
   ============================================ */

.urs-pwd-form {
    width: 100%;
}

.urs-pwd-field {
    margin-bottom: 20px;
}

.urs-pwd-field label {
    display: block;
    color: #333333;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.urs-pwd-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.urs-pwd-input-wrapper input {
    width: 100%;
    padding: 14px 50px 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    background-color: #fafafa;
}

.urs-pwd-input-wrapper input:focus {
    outline: none;
    border-color: #8B0000;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.urs-pwd-input-wrapper input::placeholder {
    color: #aaaaaa;
}

/* Toggle Password Button */
.urs-pwd-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888888;
    transition: color 0.2s ease;
}

.urs-pwd-toggle:hover {
    color: #8B0000;
}

.urs-pwd-toggle svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   REQUISITOS DE CONTRASEÑA
   ============================================ */

.urs-pwd-requirements {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 10px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.urs-pwd-requirements .req {
    font-size: 12px;
    color: #999999;
    transition: color 0.2s ease;
}

.urs-pwd-requirements .req.valid {
    color: #28a745;
}

.urs-pwd-requirements .req.valid::first-letter {
    content: '✓';
}

/* Match Indicator */
.urs-pwd-match-indicator {
    margin-top: 8px;
}

.urs-pwd-match-indicator .match-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
}

.urs-pwd-match-indicator .match-status.match {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.urs-pwd-match-indicator .match-status.no-match {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

/* ============================================
   MENSAJES
   ============================================ */

.urs-pwd-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
    text-align: center;
}

.urs-pwd-message.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.urs-pwd-message.urs-pwd-error,
.urs-pwd-message.error {
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.urs-pwd-message.urs-pwd-success,
.urs-pwd-message.success {
    background-color: #f0fff4;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.urs-pwd-message.urs-pwd-info,
.urs-pwd-message.info {
    background-color: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #90cdf4;
}

/* ============================================
   BOTONES
   ============================================ */

.urs-pwd-btn {
    width: 100%;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.urs-pwd-btn-primary {
    background: #dc2626;
    color: #ffffff;
}

.urs-pwd-btn-primary:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.urs-pwd-btn-primary:active {
    transform: translateY(0);
}

.urs-pwd-btn-primary:disabled {
    background: #cccccc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.urs-pwd-btn-secondary {
    background-color: #f0f0f0;
    color: #666666;
    margin-top: 12px;
}

.urs-pwd-btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Button Loading State */
.urs-pwd-btn .spinner {
    width: 18px;
    height: 18px;
}

.urs-pwd-btn .btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Link Button */
.urs-pwd-link-btn {
    background: none;
    border: none;
    color: #8B0000;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-family: inherit;
}

.urs-pwd-link-btn:hover {
    color: #A52A2A;
}

.urs-pwd-link-btn:disabled {
    color: #999999;
    cursor: not-allowed;
}

/* ============================================
   CÓDIGO DE VERIFICACIÓN
   ============================================ */

.urs-pwd-code-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.urs-pwd-code-inputs .code-input {
    width: 50px;
    height: 60px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: #1a1a1a;
    background-color: #fafafa;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.urs-pwd-code-inputs .code-input:focus {
    outline: none;
    border-color: #8B0000;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.urs-pwd-code-inputs .code-input.filled {
    border-color: #8B0000;
    background-color: #fff5f5;
}

.urs-pwd-code-inputs .code-input.error {
    border-color: #dc3545;
    background-color: #fff5f5;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Resend Section */
.urs-pwd-resend {
    text-align: center;
    margin: 20px 0;
    font-size: 14px;
    color: #666666;
}

.urs-pwd-resend span {
    margin-right: 4px;
}

#urs-pwd-resend-timer {
    color: #8B0000;
    font-weight: 500;
}

/* ============================================
   ÉXITO
   ============================================ */

.urs-pwd-success {
    text-align: center;
    padding: 40px 20px;
}

.urs-pwd-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.4s ease;
}

.urs-pwd-success-icon svg {
    width: 40px;
    height: 40px;
    color: #ffffff;
}

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

.urs-pwd-success h3 {
    color: #1a1a1a;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px;
}

.urs-pwd-success p {
    color: #666666;
    font-size: 15px;
    margin: 0 0 30px;
}

.urs-pwd-success .urs-pwd-btn {
    max-width: 280px;
    margin: 0 auto;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    .urs-pwd-container {
        padding: 0 16px;
    }
    
    .urs-pwd-header h3 {
        font-size: 20px;
    }
    
    .urs-pwd-code-inputs {
        gap: 6px;
    }
    
    .urs-pwd-code-inputs .code-input {
        width: 44px;
        height: 52px;
        font-size: 20px;
    }
    
    .urs-pwd-requirements {
        flex-direction: column;
        gap: 6px;
    }
}
