/* mfa-reset-unae — mismo diseño que ssoserver.unae.edu.ec (recuperación de credenciales),
   sobre Bootstrap 5. Tipografía corporativa: Rokkitt (títulos) y Lexend (texto), servidas en local. */

@font-face {
    font-family: 'Lexend';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/lexend-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Rokkitt';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/rokkitt-latin.woff2') format('woff2');
}

:root {
    --unae-primary: #511642;
    --unae-primary-hover: #7a2063;
    --unae-primary-light: #f9f3f7;
    --unae-dark: #3c3c3c;
    --unae-teal: #4d858d;
    --unae-text: #333333;
    --unae-muted: #737373;
    --unae-border: #dddddd;

    /* Azul de Microsoft Authenticator: acento para lo que trata del autenticador. */
    --mfa-blue: #0f6cbd;
    --mfa-blue-hover: #0c5795;
    --mfa-blue-light: #e8f3fa;

    --bs-body-color: var(--unae-text);
    --bs-body-bg: #ffffff;
    --bs-body-font-family: 'Lexend', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --bs-body-font-weight: 500;
    --bs-link-color-rgb: 77, 133, 141;
    --bs-link-hover-color-rgb: 81, 22, 66;
}

body {
    font-size: .9375rem;
    line-height: 1.5;
    padding-bottom: 56px;
}

b,
strong {
    font-weight: 700;
}

.icon {
    width: 1em;
    height: 1em;
    vertical-align: -.125em;
    flex-shrink: 0;
}

/* Barra superior */

.topbar {
    background: var(--unae-primary);
    height: 50px;
    display: flex;
    align-items: center;
}

.topbar img {
    height: 26px;
    width: auto;
    display: block;
}

.mock-banner {
    background: #fcf8e3;
    color: #6d5527;
    border-bottom: 1px solid #f2e3b3;
    text-align: center;
    font-size: .8125rem;
    padding: .4rem 1rem;
}

/* Página y panel */

.page {
    max-width: 36.5rem;
    padding-top: 1.5rem;
}

.brand-logo {
    text-align: center;
    margin-bottom: 1.25rem;
}

.brand-logo img {
    max-width: 220px;
    width: 100%;
    height: auto;
}

.panel-card {
    background: #fff;
    border: 1px solid var(--unae-border);
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
    padding: 15px;
}

.panel-title {
    font-family: 'Rokkitt', Georgia, serif;
    font-weight: 700;
    font-size: 1.75rem;
    line-height: 1.15;
    text-align: center;
    margin: 0 0 1.25rem;
    text-wrap: balance;
}

.intro {
    display: grid;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.intro-box {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: .6rem .8rem;
    font-size: .875rem;
    line-height: 1.45;
}

.intro-box p {
    margin: 0;
}

.intro-box .icon {
    margin-top: .2em;
}

.intro-main {
    background: var(--mfa-blue-light);
    border-color: #c6dff1;
    color: #0c4a7f;
    font-size: .9375rem;
}

.intro-note {
    background: #f4f4f4;
    border-color: #e4e4e4;
    color: #4f4f4f;
}

.intro-ok {
    background: #eaf6e6;
    border-color: #d3e9cb;
    color: #2b6a2d;
}

/* Formularios */

.form-group {
    margin-bottom: 1rem;
}

.control-label {
    font-weight: 700;
    margin-bottom: .3rem;
}

.form-control {
    border-radius: 4px;
    font-weight: 500;
}

.form-control::placeholder {
    color: #9a9a9a;
}

.form-control:focus {
    border-color: #66afe9;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
}

.help-block {
    display: block;
    margin-top: .5rem;
    font-style: italic;
    color: var(--unae-muted);
}

.captcha {
    overflow-x: auto;
}

/* Botones */

.btn {
    border-radius: 4px;
    font-weight: 500;
}

.btn-primary {
    --bs-btn-bg: var(--unae-primary);
    --bs-btn-border-color: var(--unae-primary);
    --bs-btn-hover-bg: var(--unae-primary-hover);
    --bs-btn-hover-border-color: var(--unae-primary-hover);
    --bs-btn-active-bg: var(--unae-primary-hover);
    --bs-btn-active-border-color: var(--unae-primary-hover);
    --bs-btn-disabled-bg: var(--unae-primary);
    --bs-btn-disabled-border-color: var(--unae-primary);
    --bs-btn-disabled-opacity: .65;
    --bs-btn-focus-shadow-rgb: 122, 32, 99;
}

.btn-default {
    --bs-btn-color: var(--unae-text);
    --bs-btn-bg: #ffffff;
    --bs-btn-border-color: #cccccc;
    --bs-btn-hover-color: var(--unae-text);
    --bs-btn-hover-bg: #e6e6e6;
    --bs-btn-hover-border-color: #adadad;
    --bs-btn-active-bg: #e6e6e6;
    --bs-btn-active-border-color: #adadad;
    --bs-btn-disabled-bg: #ffffff;
    --bs-btn-disabled-border-color: #cccccc;
}

.btn-link {
    --bs-btn-color: var(--unae-teal);
    --bs-btn-hover-color: var(--unae-primary);
    --bs-btn-disabled-color: var(--unae-muted);
    --bs-btn-font-weight: 500;
}

.btn.is-loading::before {
    content: "";
    display: inline-block;
    width: .9em;
    height: .9em;
    margin-right: .5em;
    vertical-align: -.1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin .75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    margin-top: 1rem;
}

/* Cajas del flujo */

.ident-box {
    background: #f9f9f9;
    border: 1px dashed #c8c8c8;
    border-radius: 4px;
    color: #8a8a8a;
    text-align: center;
    padding: .4rem .75rem;
    margin-bottom: 1rem;
}

.ident-box strong {
    color: #555;
    font-variant-numeric: tabular-nums;
}

.form-section {
    border-left: 3px solid var(--unae-primary);
    padding-left: 15px;
}

.section-label {
    font-weight: 500;
    margin-bottom: .4rem;
}

.section-text {
    margin: .75rem 0;
}

.email-box {
    background: #f5fafe;
    border: 2px dashed var(--mfa-blue);
    border-radius: 4px;
    padding: .6rem .9rem;
    font-size: 1.125rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.email-box .icon {
    color: var(--mfa-blue);
    margin-right: .4rem;
}

.email-box-sent {
    text-align: center;
    margin-bottom: 1rem;
}

.email-box-sent small {
    display: block;
    font-size: .8125rem;
    font-weight: 500;
    color: #666;
}

.info-box {
    background: #fcf8e3;
    border: 1px solid #faebcc;
    border-radius: 4px;
    color: #7a5f2c;
    font-size: .875rem;
    padding: .7rem .9rem;
    margin-top: .75rem;
}

.info-box p {
    margin-bottom: .4rem;
}

.info-box ul {
    margin: 0 0 .4rem;
    padding-left: 1.5rem;
}

.next-box {
    background: #f2f2f2;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1rem 1.1rem .5rem;
}

.next-title {
    font-weight: 700;
    margin-bottom: .6rem;
}

.next-box ol {
    list-style: none;
    counter-reset: paso;
    padding-left: 0;
}

.next-box li {
    counter-increment: paso;
    position: relative;
    padding-left: 2.2rem;
    margin-bottom: .6rem;
    min-height: 1.6rem;
}

.next-box li::before {
    content: counter(paso);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--mfa-blue);
    color: #fff;
    font-size: .8125rem;
    font-weight: 700;
    line-height: 1.6rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.video-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-top: .75rem;
    padding: .75rem .9rem;
    background: var(--mfa-blue);
    border: 1px solid var(--mfa-blue);
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    transition: background-color .15s, border-color .15s;
}

.video-card:hover,
.video-card:focus-visible {
    background: var(--mfa-blue-hover);
    border-color: var(--mfa-blue-hover);
    color: #fff;
}

.video-card-play {
    display: flex;
    font-size: 2.4rem;
    line-height: 1;
}

.video-card-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.video-card-text small {
    color: #e3f0fa;
    font-size: .8125rem;
}

.video-dialog {
    width: min(94vw, 760px);
    padding: 0;
    border: 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}

.video-dialog::backdrop {
    background: rgba(20, 20, 20, .7);
}

.video-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--mfa-blue);
    color: #fff;
    padding: .65rem .9rem;
}

.video-dialog-head h2 {
    font-family: 'Rokkitt', Georgia, serif;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.2;
    margin: 0;
}

.video-frame {
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-dialog-foot {
    margin: 0;
    padding: .55rem .9rem;
    font-size: .8125rem;
    color: #555;
}

.alert {
    border-radius: 4px;
    font-size: .9375rem;
    padding: .8rem .9rem;
}

.alert-success {
    --bs-alert-color: #2b6a2d;
    --bs-alert-bg: #dff0d8;
    --bs-alert-border-color: #c9e2b8;
}

.alert-danger {
    --bs-alert-color: #a12d2b;
    --bs-alert-bg: #f2dede;
    --bs-alert-border-color: #ebccd1;
}

.alert-warning {
    --bs-alert-color: #7a5f2c;
    --bs-alert-bg: #fcf8e3;
    --bs-alert-border-color: #faebcc;
}

.alert-info {
    --bs-alert-color: #2a6079;
    --bs-alert-bg: #d9edf7;
    --bs-alert-border-color: #bce8f1;
}

/* Código de verificación */

.pin-input {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: .45em;
    padding-left: .45em;
}

.pin-input::placeholder {
    letter-spacing: .45em;
    font-weight: 700;
    color: #b08aa6;
    opacity: 1;
}

.countdown {
    text-align: center;
    margin: .6rem 0 0;
    color: #555;
}

.countdown strong {
    font-variant-numeric: tabular-nums;
    color: var(--unae-text);
}

.countdown.is-expired {
    color: #a12d2b;
}

.resend {
    margin-top: 1.1rem;
    font-size: .875rem;
    text-align: center;
}

.resend .btn-link {
    font-size: inherit;
}

.request-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .08em;
    white-space: nowrap;
}

/* Progreso */

.processing {
    text-align: center;
    padding: 1.5rem 0;
}

.processing .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--mfa-blue);
}

.processing-text {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 1rem 0 .25rem;
    text-wrap: balance;
}

/* Pie fijo */

.unae-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--unae-dark);
    color: #fff;
    text-align: center;
    padding: 8px 12px;
    z-index: 1000;
}

.unae-footer small {
    font-size: .78em;
    letter-spacing: .04em;
}

@media (min-width: 576px) {
    .page {
        padding-top: 2rem;
    }

    .panel-title {
        font-size: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .spinner-border,
    .btn.is-loading::before {
        animation-duration: 3s;
    }
}
