﻿body {
}

/* ===== PASSWORD RESET MODAL STYLES ===== */

/* Contenedor modal - debe estar por encima de todo */
#contenedorModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100002;
    pointer-events: none;
}

    /* Cuando el modal está visible, permitir interacción */
    #contenedorModal .modal.show {
        pointer-events: auto;
    }

    /* Modal y backdrop deben estar por encima del brand-side */
    #contenedorModal .modal {
        z-index: 100004 !important;
    }

    #contenedorModal .modal-backdrop {
        z-index: 100003 !important;
        background-color: rgba(0, 0, 0, 0.5) !important;
    }

/* Forzar que el backdrop se muestre correctamente */
.modal-backdrop.show {
    opacity: 0.5 !important;
}

/* Modal compacto */
.reset-password-modal,
.cambio-password-modal {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    margin: 0 auto;
}

/* Botón de cerrar */
.close-modal-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}

    .close-modal-btn:hover {
        background: rgba(255, 255, 255, 0.3);
    }

.modal-header-gradient {
    background: linear-gradient(135deg, #023F80, #0A7FE4);
    padding: 1.5rem;
    border: none;
    text-align: center;
    position: relative;
}

.reset-icon-container {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    backdrop-filter: blur(10px);
}

.reset-icon {
    font-size: 1.5rem;
    color: white;
}

.modal-title-white {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.modal-subtitle-white {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    line-height: 1.3;
}

.reset-password-body,
.cambio-password-body {
    padding: 1.5rem;
    background-color: #F8FAFC;
}

.info-box {
    background: linear-gradient(135deg, #D8EBFF, #E8F4FF);
    border: 1px solid #B8D9F5;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #023F80;
}

    .info-box strong {
        color: #001A40;
    }

.input-group-custom .input-group-append {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
}

.input-group-custom .togglePass {
    border: none;
    background: transparent;
    color: #0A7FE4;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
}

    .input-group-custom .togglePass:hover {
        color: #023F80;
        background: transparent;
    }

.form-label-custom {
    font-weight: 600;
    color: #023F80;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}

.input-group-custom {
    position: relative;
    margin-bottom: 0.4rem;
    width: 100%;
}

.input-icon-wrapper {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    pointer-events: none;
}

.input-icon {
    color: #0A7FE4;
    font-size: 1rem;
}

.form-control-elegant {
    height: 3rem;
    padding-left: 2.75rem;
    padding-right: 2.5rem;
    border: 2px solid #D8EBFF;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #fff;
    color: #373E45;
}

    .form-control-elegant:focus {
        border-color: #0A7FE4;
        box-shadow: 0 0 0 3px rgba(10, 127, 228, 0.15);
        outline: none;
    }

    .form-control-elegant::placeholder {
        color: #B6C5D5;
    }

.btn-secondary-elegant {
    height: 2.75rem;
    border: 2px solid #D8EBFF;
    background-color: #F0F5FB;
    color: #023F80;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px;
}

    .btn-secondary-elegant:hover {
        background-color: #D8EBFF;
        border-color: #0A7FE4;
        color: #023F80;
    }

.btn-primary-elegant {
    height: 2.75rem;
    background: linear-gradient(135deg, #023F80, #0A7FE4);
    border: none;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px -4px rgba(2, 63, 128, 0.4);
    padding: 10px;
}

    .btn-primary-elegant:hover {
        background: linear-gradient(135deg, #002A55, #023F80);
        box-shadow: 0 6px 25px -4px rgba(2, 63, 128, 0.5);
        transform: translateY(-1px);
    }

    .btn-primary-elegant:disabled {
        background: #B6C5D5;
        box-shadow: none;
        transform: none;
        cursor: not-allowed;
    }

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal.fade .modal-dialog {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-dialog {
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estados de error */
.form-control-elegant.is-invalid {
    border-color: #DD2457;
    box-shadow: 0 0 0 3px rgba(221, 36, 87, 0.1);
}

.invalid-feedback {
    color: #DD2457;
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

/* Responsivo */
@media (max-width: 576px) {
    .reset-password-modal,
    .cambio-password-modal {
        max-width: 95%;
        margin: 0 auto;
    }

        .reset-password-modal .modal-header-gradient,
        .cambio-password-modal .modal-header-gradient {
            padding: 1rem;
        }

        .reset-password-modal .reset-password-body,
        .cambio-password-modal .cambio-password-body {
            padding: 1rem;
        }

    .modal-title-white {
        font-size: 1.1rem;
    }

    .modal-subtitle-white {
        font-size: 0.8rem;
    }

    .reset-icon-container {
        width: 40px;
        height: 40px;
    }

    .reset-icon {
        font-size: 1.2rem;
    }
}

/* Efectos de loading */
.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
