/* ---------------------------------------
 *
 * HOJA DE ESTILOS DE DATAWORK FIRMA SEGURA
 * Versión: 4.0.2
 * Fecha de creación: 23/09/2025
 * Fecha de edición: --/--/----
 *
--------------------------------------- */

/* IMPORTAR ------------------------------------------------------------------------------ */
@import url('reset.css');
@import url('../color_scheme.css');
@import url('../font_face.css');
@import url('../material_iconset.css');
@import url('spinner.css');


/* GENERALES ----------------------------------------------------------------------------- */
:root {
    /* FUENTE */
    --main_font: 'Poppins', sans-serif;
}

html {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 100%;
}

body {
    font-family: var(--main_font);
    font-size: 0.9rem;
    color: rgb(var(--shadow_deep));
    height: 100%;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0;
    font-weight: bold;
}

.sh1 {
    font-size: 2.25rem;
    line-height: 2.7rem;
    font-weight: bold;
}
h1 {
    font-size: 1.7rem;
    line-height: 2rem;
}
h2 {
    font-size: 1.4rem;
    line-height: 1.6rem;
}
h3 {
    font-size: 1.125rem;
    line-height: 1.4rem;
 }
h4 {
    font-size: 1rem;
    line-height: 1.1rem;
}
h5 {
    font-size: 0.9rem;
    line-height: 1.1rem;
}
h6 {
    font-size: 0.8rem;
    line-height: 1.1rem;
}

/* Textos */
p { margin-bottom: 0; }

small { font-size: 0.75rem; }

b, strong { font-weight: 600; }

ul {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
    padding-left: 1.5em;
}

ul li { position: relative; }
ul li::before {
    content: '';
    display: inline-block;
    position: absolute;
    top: 0.1em;
    left: -1.5em;
    width: 0.8em;
    height: 0.8em;
    background-color: rgb(var(--shadow_deep));
    border-radius: 0.4em;
}

/* Enlaces */
a {
    text-decoration: none;
    font-weight: 600;
    color: rgb(var(--main_firma));
    transition: ease-in-out 0.2s;
}
a:hover {
    color: rgb(var(--alt_firma));
}

/* Animaciones */
@keyframe fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframe fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}


/* DISEÑO ----------------------------------------------------------------------------- */
/* Contenedores */
main { padding: 20px; }

.box_login {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.box_header, .box_footer {
    padding-top: 1.5em;
    padding-bottom: 1.5em;
    width: 100%;
}

.box_header {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    align-items: center;
}

.box_body {
    background-color: rgb(var(--shadow_white));
    border-radius: 0.6em;
    overflow: hidden;
}

.box_footer {
    text-align: center;
    color: rgb(var(--shadow_white));
}

.box_form {
    padding: 1.5em 3em;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: start;
    gap: 1.5em;
}

.box_alt {
    background-color: rgb(var(--shadow_medium));
    padding: 1.5em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6em;
}

.box_title {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 1.5em;
    text-align: center;
}

.box_mfa {
    background-color: rgb(var(--shadow_white));
    border-radius: 0.6em;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    overflow: hidden;
    width: 100%;
}

.box_info {
    display: none;
    position: absolute;
    z-index: 1;
    width: 160px;
    top: 380px;
    left: 95%;
    background-color: rgb(var(--shadow_medium));
    border-radius: 0.6em;
    padding: 0.75em 1.5em;
}
.box_info::before {
    content: '';
    display: block;
    position: absolute;
    z-index: 1;
    bottom: 1.5em;
    left: -0.6em;
    width: 1.2em;
    height: 1.2em;
    transform: rotate(45deg);
    background-color: rgb(var(--shadow_medium));
}

/* Logos */
.app_logo {
    width: 157px;
    height: 40px;
    object-fit: contain;
}


/* COMPONENTES ----------------------------------------------------------------------------- */
/* Botones */
.button {
    border: 1px solid transparent;
    border-radius: 0.6em;
    padding: 0.75em 1.8em;
    text-align: center;
    vertical-align: middle;
    font-family: var(--main_font);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2em;
    text-decoration: none;
    color: rgb(var(--main_firma));
    background-color: transparent;
    vertical-align: middle;
    transition: ease-in-out 0.2s;
}
.button:hover {
    background-color: rgb(var(--main_firma));
    border-color: rgb(var(--main_firma));
    color: rgb(var(--shadow_white));
}

.button_main {
    background-color: rgb(var(--main_firma));
    border-color: rgb(var(--main_firma));
    color: rgb(var(--shadow_white));
    padding: 1.2em 1.8em;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.button_main:hover {
    background-color: rgb(var(--alt_firma));
    border-color: rgb(var(--alt_firma));
    color: rgb(var(--main_firma));
}

.button_outline {
    background-color: transparent;
    border-color: rgb(var(--main_firma));
    color: rgb(var(--shadow_deep));
}
.button_outline:hover {
    background-color: rgb(var(--main_firma));
    border-color: rgb(var(--main_firma));
    color: rgb(var(--shadow_white));
}

.box_group_button {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6em;
}
.box_group_button > * { flex-grow: 1; }

.box_group_button.stack {
    flex-direction: column;
    align-self: center;
    width: 100%;
}

.box_header .button {
    border-color: rgb(var(--shadow_white));
    color: rgb(var(--shadow_white));
}
.box_header .button:hover {
    border-color: rgb(var(--main_firma));
}

.button [class^="icon_"],
.button [class*=" icon_"] {
    font-size: 1rem;
    margin-right: 0.3em;
}

.button.google,
.button.microsoft {
    background-color: rgb(var(--shadow_white));
    color: rgb(var(--shadow_deep));
}
.button.google:hover,
.button.microsoft:hover {
    background-color: rgb(var(--main_firma));
    color: rgb(var(--shadow_white));
}
.button.google::before,
.button.microsoft::before {
    content: '';
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    margin-right: 0.6em;
    vertical-align: text-top;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}
.button.google::before { background-image: url('../../imgs/login/google.png'); }
.button.button.microsoft::before { background-image: url('../../imgs/login/microsoft.png'); }

/* Formularios */
form {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 0.6em;
    box-sizing: border-box;
    width: 100%;
}

input:not([type="submit"], [type="hide"], [type="reset"], [type="radio"], [type="checkbox"]) {
    width: 100%;
    height: 40px;
    border-radius: 0.6em;
    padding-left: 1.2em;
    padding-right: 3.3em;
    border: 1px solid rgb(var(--shadow_medium));
    font-family: var(--main_font);
    font-size: 0.9rem;
    box-sizing: border-box;
}

.box_field {
    width: 100%;
    position: relative;
}

.box_field label,
.box_field i {
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto;
}

.box_field i {
    font-size: 1rem;
    width: 1.2em;
    height: 1.2em;
    color: rgb(var(--shadow_medium));
    right: 0.6em;
}

.box_field .ver_pass {
    position: absolute;
    top: 0;
    right: 0;
    height: 40px;
}

.box_field_check {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6em;
    position: relative;
}

input[type="checkbox"] {
    width: 1.2em;
    height: 1.2em;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: absolute;
    opacity: 0;
    z-index: 1;
}

.field_checkbox {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    border: 1px solid rgb(var(--shadow_medium));
    border-radius: 0.3em;
    background-color: rgb(var(--shadow_white));
    vertical-align: middle;
    position: relative;
    transform: translateY(-0.075em);
}

input[type="checkbox"]:checked + .field_checkbox {
    background-color: rgb(var(--main_firma));
    border-color: rgb(var(--main_firma));
}

.box_field_check .field_checkbox::after {
    content: '';
    position: absolute;
    display: none;
    left: 0.35em;
    top: 0.15em;
    width: 0.3em;
    height: 0.6em;
    border: solid rgb(var(--shadow_white));
    border-width: 0 0.15em 0.15em 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:checked + .field_checkbox::after {
    display: block;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1025;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--main_firma), 0.5);
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    animation:  fadeIn 2s ease-in-out forwards;
    visibility: visible;
}

.modal_wrap {
    width: 430px;
    border-radius: 0.6em;
    padding: 1.5em;
    background-color: rgb(var(--shadow_white));
    color: rgb(var(--shadow_deep));
}

.modal_content {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

/* Alertas */
.box_alert {
    box-sizing: border-box;
    width: 100%;
}

.alert {
    box-sizing: border-box;
    width: 100%;
    border-radius: 0.3em;
    padding: 0.3em 0.6em;
    border: 1px solid transparent;
    color: rgb(var(--shadow_deep));
    font-weight: 500;
}

.alert_success {
    background-color: rgba(var(--success), 0.3);
    border-color: rgb(var(--success));
}
.alert_info {
    background-color: rgba(var(--info), 0.3);
    border-color: rgb(var(--info));
}
.alert_warning {
    background-color: rgba(var(--warning), 0.3);
    border-color: rgb(var(--warning));
}
.alert_error {
    background-color: rgba(var(--danger), 0.3);
    border-color: rgb(var(--danger));
}

/* Imágenes */
.box_mfa_banner {
    display: none;
    background-image: url('../../imgs/login/img_mfa.png');
    background-position: top left;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Spinner */
.comp_loader {
    position: fixed;
    z-index: 3025;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    flex-direction: column;
}
.comp_loader .sk-fading-circle .sk-circle:before { background-color: rgb(var(--shadow_white)); }


/* UTILITARIOS ----------------------------------------------------------------------------- */
/* Fondos */
.view_login { background-image: url('../../imgs/login/img_bg_login.png'); }
.view_register { background-image: url('../../imgs/login/img_bg_registro.png'); }

.bg_main { background-color: rgb(var(--main_firma)); }

/* Divisores */
.divider {
    width: 50px;
    height: 2px;
    border-width: 0;
    background-color: rgb(var(--main_firma));
}

/* Manipuladores */
.hide {
    opacity: 0;
    visibility: hidden;
    display: none !important;
}

.show {
    opacity: 1;
    visibility: visible;
    display: block !important;
}


/* MEDIA QUERIES ----------------------------------------------------------------------------- */
@media (min-width: 400px) {
    body {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
}

@media (min-width: 600px) {
    /* DISEÑO ----------------------------------------------------------------------------- */
    /* Contenedores */
    .box_login { width: 494px; }

    .box_header {
        flex-direction: row;
        justify-content: space-between;
    }

    /* COMPONENTES ----------------------------------------------------------------------------- */
    /* Botones */
    .box_group_button {
        width: auto;
        align-self: end;
    }
}

@media (min-width: 1024px) {
    /* DISEÑO ----------------------------------------------------------------------------- */
    /* Contenedores */
    .box_mfa {
        width: 850px;
        height: 600px;
    }
    .box_mfa .box_form {
        justify-content: center;
        padding: 2.25em;
    }

    .box_info {
        display: flex;
        flex-direction: column;
        gap: 0.6em;
    }

    /* COMPONENTES ----------------------------------------------------------------------------- */
    /* Formularios */
    .box_mfa > * { flex: 1; }
    
    /* Imágenes */
    .box_mfa_banner {
        display: block;
        object-fit: cover;
    }
}