/*
 * ============================================================
 * llavemx.css
 * SIAAT · LOGIN LLAVE MX / E.FIRMA
 * Base gráfica ATDT adaptada al layout real de SIAAT
 * ============================================================
 *
 * SUSTITUIR COMPLETAMENTE EL ARCHIVO ANTERIOR.
 *
 * Se conservan las medidas visuales originales de ATDT.
 * Solo se adapta:
 *   - full-bleed dentro del .container de SIAAT
 *   - altura disponible bajo header + sub-navbar
 *   - conflictos con estilos globales de SIAAT
 *   - formulario e.firma
 * ============================================================
 */


/* ============================================================
   VARIABLES DE ENCAJE SIAAT
   ============================================================ */

.lmx-wrapper {
    /*
     * Header principal (~60px) + sub-navbar (~50px).
     * Si en algún ambiente cambia la altura, solo se ajusta
     * esta variable, no el resto de la maqueta.
     */
    --siaat-top-ui: 110px;
}


/* ============================================================
   RESET AISLADO
   ============================================================ */

.lmx-wrapper,
.lmx-wrapper *,
.lmx-wrapper *::before,
.lmx-wrapper *::after {
    box-sizing: border-box;
}

.lmx-wrapper h1,
.lmx-wrapper h2,
.lmx-wrapper p,
.lmx-wrapper label,
.lmx-wrapper button,
.lmx-wrapper input,
.lmx-wrapper small,
.lmx-wrapper span,
.lmx-wrapper a {
    font-family: "Noto Sans", sans-serif !important;
}


/* ============================================================
   CONTENEDOR RAÍZ
   Rompe únicamente el ancho del .container de SIAAT.
   ============================================================ */

.lmx-wrapper {
    position: relative;

    width: 100vw !important;
    max-width: none !important;

    /*
     * Centra el viewport aunque la vista Angular esté dentro
     * de un .container con ancho máximo.
     */
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;

    /*
     * SIAAT ya coloca la vista debajo de su navegación.
     * No agregamos otro espacio superior.
     */
    margin-top: 0 !important;

    /*
     * Compensa el espacio que el layout antiguo deja antes
     * del footer.
     */
margin-bottom: -64px !important;

    padding: 0 !important;

    min-height: calc(100vh - var(--siaat-top-ui));

    background: #f9f9f9 !important;

    overflow-x: hidden;
}


/* Esta clase existe en el HTML, pero no añade espacio. */
.lmx-wrapper--siaat {
    padding: 0 !important;
}


/* ============================================================
   PÁGINA DE DOS PANELES
   ============================================================ */

.lmx-page {
    display: flex;

    width: 100% !important;
    max-width: none !important;

    min-height: calc(100vh - var(--siaat-top-ui));

    margin: 0 !important;
    padding: 0 !important;
}


/* ============================================================
   PANEL IZQUIERDO
   MEDIDAS ORIGINALES ATDT
   ============================================================ */

.lmx-left {
    flex: 1 1 50%;

    width: 50%;
    max-width: 50%;

    min-width: 0;
    min-height: calc(100vh - var(--siaat-top-ui));

    padding: 80px 60px;

    background-color: #781839 !important;
    background-image: url("../img/fondo-llave.svg") !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-blend-mode: multiply;

    display: flex;
    align-items: center;
    justify-content: center;
}


.lmx-left__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 40px;

    width: 100%;
    /* max-width: 380px; */
    max-width: 407px;
}


.lmx-left__title {
    margin: 0 !important;

    color: #ffffff !important;

    font-size: 36px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;

    text-align: left;
}


.lmx-left__acronym {
    display: block;

    margin: 0 !important;
}


/* Logo institucional */

.lmx-inst-card {
    min-width: 220px;

    padding: 20px 28px;

    background: #ffffff !important;

    border: 0 !important;
    border-radius: 8px;

    display: flex;
    align-items: center;
    justify-content: center;
}


.lmx-inst-card img {
    display: block;

    width: auto;
    height: auto;

    /* max-width: 240px;
    max-height: 70px; */

    max-width: 198px;
    max-height: 70px;

    object-fit: contain;
}


/* ============================================================
   PANEL DERECHO
   MEDIDAS ORIGINALES ATDT
   ============================================================ */

.lmx-right {
    flex: 1 1 50%;

    width: 50%;
    max-width: 50%;

    min-width: 0;
    min-height: calc(100vh - var(--siaat-top-ui));

    padding: 60px 40px;

    background-color: #f9f9f9 !important;
    background-image: url("../img/fondo-llave.svg") !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;

    display: flex;
    align-items: center;
    justify-content: center;
}


/* ============================================================
   TARJETA
   ORIGINAL ATDT
   ============================================================ */

.lmx-card {
    width: 100%;
    max-width: 380px;

    margin: 0 !important;
    padding: 24px;

    background: #ffffff !important;

    border: 0 !important;
    border-radius: 12px;

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);

    display: flex;
    flex-direction: column;
    align-items: center;
}


.lmx-card__logo {
    display: block;

    width: auto;
    height: 56px;

    max-width: 100%;

    margin: 0 0 32px !important;

    object-fit: contain;
}


/* ============================================================
   SELECTOR
   ORIGINAL ATDT
   ============================================================ */

.lmx-selector {
    width: 100%;
}


.lmx-selector__titulo {
    margin: 0 0 24px !important;

    color: #161a1d !important;

    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;

    text-align: center;
}


.lmx-selector__opciones {
    width: 100%;

    margin: 0 !important;
    padding: 0 !important;

    text-align: center;
    white-space: nowrap;
}


.lmx-selector__opciones label {
    display: inline-flex;
    align-items: center;

    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #161a1d !important;

    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;

    cursor: pointer;
}


.lmx-selector__opciones input[type="radio"] {
    width: 21px;
    height: 21px;

    margin: 0 7px 0 0 !important;

    accent-color: #611232;

    vertical-align: middle;

    cursor: pointer;
}


.lmx-separador {
    display: inline-block;

    width: 1px;
    height: 18px;

    margin: 0 14px;

    background-color: #aaaaaa;

    vertical-align: middle;
}


/*
 * SIAAT tiene:
 * hr { border-top: 7px solid #b38e5d !important; }
 * Recuperamos exactamente la línea de ATDT.
 */
.lmx-wrapper .lmx-divider {
    display: block;

    width: 100% !important;
    height: 0 !important;

    margin: 24px 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-top: 1px solid #dddddd !important;

    background: transparent !important;
}


/* ============================================================
   LLAVE MX · TÉRMINOS
   ORIGINAL ATDT
   ============================================================ */

.lmx-card__terminos {
    width: 100%;

    margin: 0 0 40px !important;

    color: #434343 !important;

    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;

    text-align: left;
}


.lmx-card__terminos a {
    color: #611232 !important;

    font-weight: 400 !important;

    text-decoration: none !important;
}


.lmx-card__terminos a:hover,
.lmx-card__terminos a:focus,
.lmx-card__terminos a:active {
    color: #611232 !important;

    text-decoration: underline !important;
}


/* ============================================================
   BOTONES
   ORIGINAL ATDT
   ============================================================ */

.lmx-btns {
    display: flex;

    width: 100%;

    gap: 24px;
}


.lmx-btn-outline,
.lmx-btn-solid {
    flex: 1;

    min-height: 40px;

    margin: 0 !important;
    padding: 10px !important;

    border-radius: 6px;

    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;

    text-align: center;
    text-decoration: none !important;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: none !important;

    transition:
        background-color 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease;
}


.lmx-btn-outline {
    color: #611232 !important;

    background: #ffffff !important;

    border: 1.5px solid #611232 !important;
}


.lmx-btn-outline:hover,
.lmx-btn-outline:focus,
.lmx-btn-outline:active {
    color: #611232 !important;

    background: #f8f2f4 !important;

    border-color: #611232 !important;

    text-decoration: none !important;
}


.lmx-btn-solid {
    color: #ffffff !important;

    background: #611232 !important;

    border: 1.5px solid #611232 !important;
}


.lmx-btn-solid:hover,
.lmx-btn-solid:focus,
.lmx-btn-solid:active {
    color: #ffffff !important;

    background: #4d0e28 !important;

    border-color: #4d0e28 !important;

    text-decoration: none !important;
}


.lmx-btn-outline:focus,
.lmx-btn-solid:focus,
.lmx-toggle-eye:focus,
.lmx-selector__opciones input[type="radio"]:focus {
    outline: 2px solid #b38e5d !important;
    outline-offset: 2px;
}


/* ============================================================
   E.FIRMA
   Adaptación funcional de SIAAT con escala ATDT
   ============================================================ */

.lmx-form--efirma {
    width: 100%;
}


.lmx-field {
    width: 100%;

    margin: 0 0 20px;
}


.lmx-field label {
    display: block !important;

    min-height: 0 !important;

    margin: 0 0 4px !important;
    padding: 0 !important;

    color: #161a1d !important;

    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}


.lmx-required {
    color: #9d2449 !important;

    font-weight: 700 !important;
}


/* .cer / .key */

.lmx-file {
    display: block;

    width: 100%;
    height: 40px;

    margin: 0 !important;
    padding: 0 !important;

    color: #161a1d !important;

    background: #ffffff !important;

    border: 1px solid #dddddd !important;
    border-radius: 8px !important;

    box-shadow: none !important;

    font-size: 14px !important;
    font-weight: 400 !important;

    outline: none !important;
}


.lmx-file::file-selector-button {
    height: 38px;

    margin: 0 10px 0 0;
    padding: 0 12px;

    color: #611232;

    background: #ffffff;

    border: 0;
    border-right: 1px solid #dddddd;

    font-family: "Noto Sans", sans-serif;
    font-size: 14px;
    font-weight: 500;

    cursor: pointer;
}


.lmx-file::-webkit-file-upload-button {
    height: 38px;

    margin: 0 10px 0 0;
    padding: 0 12px;

    color: #611232;

    background: #ffffff;

    border: 0;
    border-right: 1px solid #dddddd;

    font-family: "Noto Sans", sans-serif;
    font-size: 14px;
    font-weight: 500;

    cursor: pointer;
}


/* Contraseña */

.lmx-input-wrap {
    position: relative;

    width: 100%;
}


.lmx-password-input {
    display: block;

    width: 100%;
    height: 40px;

    margin: 0 !important;

    padding: 0 42px 0 14px;

    color: #161a1d !important;

    background: #ffffff !important;

    border: 1px solid #dddddd !important;
    border-radius: 8px !important;

    box-shadow: none !important;

    font-size: 16px !important;
    font-weight: 400 !important;

    outline: none !important;
}


.lmx-password-input::placeholder {
    color: #888888;

    opacity: 1;
}


.lmx-file:focus,
.lmx-password-input:focus {
    border-color: #611232 !important;

    outline: 2px solid rgba(97, 18, 50, 0.12) !important;
    outline-offset: 1px;

    box-shadow: none !important;
}


.lmx-toggle-eye {
    position: absolute;

    top: 50%;
    right: 12px;

    transform: translateY(-50%);

    width: 28px;
    height: 28px;

    margin: 0 !important;
    padding: 0 !important;

    color: #888888 !important;

    background: transparent !important;

    border: 0 !important;
    border-radius: 0 !important;

    box-shadow: none !important;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}


.lmx-toggle-eye:hover,
.lmx-toggle-eye:focus,
.lmx-toggle-eye:active {
    color: #611232 !important;

    background: transparent !important;
}


/* Ayudas / errores */

.lmx-help {
    display: block;

    margin: 5px 0 0 !important;

    color: #666666 !important;

    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
}


.lmx-error {
    display: block;

    margin: 5px 0 0 !important;

    color: #9d2449 !important;

    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}


.lmx-validation-message {
    width: 100%;

    margin: 0 0 12px !important;

    color: #9d2449 !important;

    font-size: 13px !important;
    line-height: 1.4 !important;
}


.lmx-efirma-action {
    width: 100%;

    margin: 4px 0 0;
}


.lmx-btn-solid--full {
    width: 100%;

    flex: none;
}


/* ============================================================
   ELEMENTOS TÉCNICOS DEL FLUJO EXISTENTE
   ============================================================ */

.lmx-wrapper #silverlightControlHost {
    display: none !important;
}


/* ============================================================
   RESPONSIVO
   Conserva comportamiento ATDT y corrige el 50% de escritorio.
   ============================================================ */

@media (max-width: 960px) {

    .lmx-page {
        flex-direction: column;

        min-height: auto;
    }


    .lmx-left,
    .lmx-right {
        flex: none;

        width: 100%;
        max-width: none;

        min-height: auto;
    }


    .lmx-left {
        padding: 40px 24px 48px;

        justify-content: flex-start;
        align-items: flex-start;
    }


    .lmx-left__content {
        gap: 28px;

        max-width: 100%;
    }


    .lmx-left__title {
        font-size: 28px !important;
    }


    .lmx-inst-card {
        width: 100%;
        max-width: 280px;

        min-width: 0;
    }


    .lmx-right {
        padding: 48px 24px 64px;
    }


    .lmx-card {
        max-width: 100%;
    }


    .lmx-btns {
        flex-direction: column;

        gap: 16px;
    }


    .lmx-btn-outline,
    .lmx-btn-solid {
        width: 100%;

        flex: none;
    }
}


@media (max-width: 520px) {

    .lmx-left {
        padding: 34px 18px 40px;
    }


    .lmx-right {
        padding: 34px 16px 50px;
    }


    .lmx-card {
        padding: 24px;
    }


    .lmx-card__logo {
        height: 56px;

        margin-bottom: 24px !important;
    }


    .lmx-selector__opciones {
        display: flex;
        flex-direction: column;
        align-items: stretch;

        gap: 12px;

        white-space: normal;
    }


    .lmx-selector__opciones label {
        justify-content: flex-start;
    }


    .lmx-separador {
        width: 100%;
        height: 1px;

        margin: 0;

        background-color: #dddddd;
    }
}


@media (max-width: 400px) {

    .lmx-left__title {
        font-size: 24px !important;
    }
}
