/* ================================
   ESTILOS RECUPERACIÓN DE CONTRASEÑA
   ================================ */

body {
    background:
        linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
        url('../imagenes/fondoBuscadoroficial.webp') no-repeat center center fixed !important;
    background-size: cover !important;
    background-attachment: fixed !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================================
   CONTENEDOR PRINCIPAL
   ================================ */
.contenedor-recuperacion {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.tarjeta-recuperacion {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
    padding: 40px;
    border: 3px solid #000;
    animation: fadeInUp 0.6s ease-in-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   ENCABEZADO
   ================================ */
.encabezado-recuperacion {
    text-align: center;
    margin-bottom: 30px;
}

.icono-recuperacion {
    font-size: 4rem;
    color: #7a322e;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.encabezado-recuperacion h1 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 10px 0;
    font-weight: 700;
}

.encabezado-recuperacion p {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

/* ================================
   PASOS (PROGRESO)
   ================================ */
.pasos-progreso {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0 10px;
}

.paso {
    flex: 1;
    text-align: center;
    position: relative;
}

.paso-numero {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.paso.activo .paso-numero {
    background: linear-gradient(135deg, #7a322e, #5a241f);
    color: white;
    box-shadow: 0 4px 12px rgba(122, 50, 46, 0.4);
}

.paso.completado .paso-numero {
    background: #28a745;
    color: white;
}

.paso-texto {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

.paso.activo .paso-texto {
    color: #7a322e;
    font-weight: 600;
}

.paso::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #dee2e6;
    z-index: -1;
}

.paso:last-child::after {
    display: none;
}

.paso.completado::after {
    background: #28a745;
}

/* ================================
   MENSAJES DE ALERTA
   ================================ */
.mensaje-alerta {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mensaje-alerta i {
    font-size: 1.2rem;
}

.mensaje-exito {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.mensaje-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.mensaje-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.mensaje-advertencia {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* ================================
   FORMULARIO
   ================================ */
.formulario-recuperacion {
    margin-top: 25px;
}

.grupo-formulario {
    margin-bottom: 20px;
}

.grupo-formulario label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.grupo-formulario label i {
    color: #7a322e;
    font-size: 1rem;
}

.campo-entrada {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.campo-entrada:hover {
    border-color: #adb5bd;
}

.campo-entrada:focus {
    outline: none;
    border-color: #7a322e;
    box-shadow: 0 0 0 3px rgba(122, 50, 46, 0.1);
}

.campo-entrada::placeholder {
    color: #adb5bd;
}

/* Campo de código especial */
.campo-codigo {
    text-align: center;
    font-size: 1.8rem;
    letter-spacing: 8px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    padding: 15px;
}

/* ================================
   CONTENEDOR DE PASSWORD
   ================================ */
.contenedor-password {
    position: relative;
    display: flex;
    align-items: center;
}

.contenedor-password .campo-entrada {
    flex: 1;
    padding-right: 45px;
}

.btn-mostrar-password {
    position: absolute;
    right: 5px;
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-mostrar-password:hover {
    color: #7a322e;
    background: rgba(122, 50, 46, 0.1);
}

/* ================================
   CAJAS INFORMATIVAS
   ================================ */
.info-box {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-left: 4px solid #2196f3;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.info-box i {
    color: #1976d2;
    font-size: 1.2rem;
    margin-right: 10px;
}

.info-box p {
    margin: 0;
    color: #0d47a1;
    font-size: 0.9rem;
    line-height: 1.6;
}

.info-box ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
    color: #0d47a1;
}

.info-box li {
    margin: 5px 0;
    font-size: 0.85rem;
}

/* ================================
   BOTONES
   ================================ */
.boton-recuperacion {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #7a322e, #5a241f);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 12px rgba(122, 50, 46, 0.3);
}

.boton-recuperacion:hover {
    background: linear-gradient(135deg, #5a241f, #3d1814);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(122, 50, 46, 0.4);
}

.boton-recuperacion:active {
    transform: translateY(0);
}

.boton-recuperacion:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.boton-secundario {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    margin-top: 10px;
}

.boton-secundario:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

/* ================================
   ENLACES
   ================================ */
.separador {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.separador::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #dee2e6;
}

.separador span {
    background: white;
    padding: 0 15px;
    color: #6c757d;
    font-size: 0.9rem;
    position: relative;
}

.enlace-volver {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #7a322e;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.enlace-volver:hover {
    color: #5a241f;
    text-decoration: none;
    transform: translateX(-3px);
}

.enlaces-footer {
    text-align: center;
    margin-top: 20px;
}

.enlaces-footer a {
    color: #7a322e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.enlaces-footer a:hover {
    color: #5a241f;
    text-decoration: underline;
}

/* ================================
   TEXTO DE AYUDA
   ================================ */
.texto-ayuda {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
    display: block;
}

.texto-contador {
    text-align: right;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
}

/* ================================
   INDICADOR DE INTENTOS
   ================================ */
.intentos-restantes {
    text-align: center;
    padding: 10px;
    background: #fff3cd;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 0.9rem;
    color: #856404;
    font-weight: 500;
}

.intentos-restantes.critico {
    background: #f8d7da;
    color: #721c24;
}

/* ================================
   SPINNER DE CARGA
   ================================ */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 768px) {
    .contenedor-recuperacion {
        padding: 20px 10px;
    }

    .tarjeta-recuperacion {
        padding: 30px 20px;
        border-radius: 15px;
    }

    .encabezado-recuperacion h1 {
        font-size: 1.5rem;
    }

    .icono-recuperacion {
        font-size: 3.5rem;
    }

    .pasos-progreso {
        padding: 0 5px;
    }

    .paso-numero {
        width: 35px;
        height: 35px;
        font-size: 0.95rem;
    }

    .paso-texto {
        font-size: 0.7rem;
    }

    .campo-codigo {
        font-size: 1.5rem;
        letter-spacing: 6px;
    }
}

@media (max-width: 480px) {
    .tarjeta-recuperacion {
        padding: 25px 15px;
    }

    .encabezado-recuperacion h1 {
        font-size: 1.3rem;
    }

    .icono-recuperacion {
        font-size: 3rem;
    }

    .paso-texto {
        font-size: 0.65rem;
    }

    .campo-codigo {
        font-size: 1.3rem;
        letter-spacing: 4px;
    }
}
