/* =====================================================================================================================
   Hoja común de los temas estáticos del SSO.

   Es la estructura de todas las pantallas: lo que comparten los temas. Lo propio de cada uno —la paleta, los logos y
   las pocas reglas que no son de color— vive en static/themes/<tema>/css/theme.css, que se carga después de esta hoja
   y define las variables que se usan acá:

     --lua-fondo            fondo de la página
     --lua-fondo-movil      fondo de la página hasta 599 px (opcional: si falta, el mismo de arriba)
     --lua-titulo           título de la caja (h2)
     --lua-link             links dentro de la caja
     --lua-primario         botones
     --lua-primario-hover   botones con el mouse encima o con foco
     --lua-boton-padding    relleno de los botones
     --lua-footer-texto     textos del pie
     --lua-otp-titulo       título de las vistas de código (OTP y loop)

   Orden de carga: Bootstrap 3 → esta hoja → el theme.css del tema.
   ===================================================================================================================== */

@import url('https://fonts.googleapis.com/css?family=Lato:700,400,300,100');
@import url('https://fonts.googleapis.com/css?family=Roboto:400,700');
@import url('https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700');

/* ---------------------------------------------------------------------------------------------------------------------
   Definiciones generales
   --------------------------------------------------------------------------------------------------------------------- */

body * {
    box-sizing: border-box;
}

html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr,
address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var,
b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot,
thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header,
hgroup, menu, nav, section, summary, time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    vertical-align: baseline;
    background: transparent;
}

body {
    font-size: 14px;
    font-family: Verdana, sans-serif;
    line-height: 1.4em;
    background: #eee;
}

a {
    margin: 0;
    padding: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
}

input, select {
    vertical-align: middle;
}

.button-link {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    font-family: arial, sans-serif;
    color: #069;
    text-decoration: underline;
    cursor: pointer;
    border-radius: 0 !important;
}

input::placeholder {
    font-weight: 700;
    opacity: 0.7;
    font-size: 16px;
    font-family: 'Roboto Condensed', sans-serif;
}

/* Cursores de los elementos interactivos */
a[href],
.btn,
button,
[role="button"],
input[type="submit"],
input[type="button"],
label[for],
[onclick] {
    cursor: pointer !important;
}

/* Cursor de texto en los controles de ingreso, sin importar el padre */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea {
    cursor: text !important;
}

.btn.disabled,
.btn[disabled],
button[disabled],
input[disabled] {
    cursor: not-allowed !important;
}

/* ---------------------------------------------------------------------------------------------------------------------
   Contenedor general y cabecera
   --------------------------------------------------------------------------------------------------------------------- */

#container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

body#cas {
    font-family: 'RobotoC', serif;
    background: var(--lua-fondo);
    min-height: 100vh;
}

#cas .btn-submit {
    background: #70ba61;
    border: 0;
    padding: 10px 25px;
    font-weight: normal;
    color: white;
    border-radius: 4px;
    font-size: 1.25em;
}

a:link, a:visited {
    color: #2F64BA;
}

a:hover {
    color: #a0b757;
}

p {
    margin-bottom: 1.4em;
}

header {
    overflow: hidden;
    padding: 20px 0;
}

/* ---------------------------------------------------------------------------------------------------------------------
   Logo: lo dibuja el CSS (la imagen la pone cada tema); el <img> del fragmento queda oculto
   --------------------------------------------------------------------------------------------------------------------- */

#logo {
    color: #fff;
    display: block;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 24px;
    text-align: center;
    text-transform: uppercase;
}

a#logo {
    display: block;
    width: 100%;
    max-width: 196px;
    height: auto;
    aspect-ratio: 196 / 60;
    margin: 0 auto;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}

#logo-image { display: none; }

/* ---------------------------------------------------------------------------------------------------------------------
   Contenido y mensajes
   --------------------------------------------------------------------------------------------------------------------- */

#content {
    overflow: hidden;
    background: #fff;
    padding: 0;
    border-radius: 10px;
}

#msg {
    padding: 20px;
    margin-bottom: 40px;
}

#msg.errors   { border: 2px dotted #BB0000; color: #BB0000; }
#msg.success  { border: 2px dotted #390;    color: #390; }
#msg.info     { border: 2px dotted #008;    color: #008; }
#msg.question { border: 2px dotted #390;    color: #390; }
#msg.warn     { border: 2px dotted #960;    color: #960; }

.errors {
    border: 2px dotted #BB0000;
    color: #BB0000;
    padding-top: 5px;
    margin-bottom: 5px;
    background-color: transparent !important;
}

.alert.alert-danger {
    border-radius: 4px;
    border: 1px solid #ad262b;
}

.alert.alert-danger span {
    color: #444;
    font-weight: normal;
    max-width: 980px;
    margin: 0 auto;
    display: block;
}

/* ---------------------------------------------------------------------------------------------------------------------
   Caja del login (y de las demás vistas, que usan la misma estructura)
   --------------------------------------------------------------------------------------------------------------------- */

.login #content {
    background: transparent;
}

#login {
    padding: 24px;
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e3e3e3;
    vertical-align: top;
}

#login .row {
    margin: 0 0 10px;
}

#login label {
    display: block;
    margin-bottom: 2px;
    color: #525252;
}

#login .check label {
    display: inline;
}

#login input[type=text], #login input[type=password] {
    font-size: 1.3em;
    padding: 5px;
    width: 100%;
}

#login .btn-row {
    text-align: center;
    padding-top: 0 !important;
}

#login .btn-submit {
    background: #077472;
    border: 0;
    padding: 10px 25px;
    font-weight: normal;
    color: white;
    border-radius: 4px;
    font-size: 1.25em;
}

#login .btn-submit:hover {
    background: #819e73;
}

.login .container header {
    padding: 39px 0 16px 0;
}

.login .container #content #login {
    max-width: 450px;
    margin: 0 auto;
}

.login .container #content #login form section {
    margin: 0 auto;
    padding-top: 30px;
}

.login .container #content * {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 14px;
}

.login .container #content h2 {
    color: var(--lua-titulo);
    font-size: 22px;
    padding: 0 0 20px 0;
    border-bottom: 1px solid #e3e3e3;
}

/* El color del h3 lo pone cada tema: en unos es !important y en otros no, y eso decide quién gana contra los style
   inline de algunas vistas. */
.login .container #content h3 {
    font-size: 16px;
    margin: 0 0 20px 0;
    text-align: center;
    line-height: 45px;
}

.login .container #content p {
    margin: 0;
}

.login .container #content a {
    color: var(--lua-link);
}

.login .container #content a:focus,
.login .container #content a:hover {
    color: #025aa3;
}

.login .container #content a.nuevaCuenta span {
    font-size: 18px;
}

.login .container #content label {
    font-size: 14px;
    font-weight: normal;
    margin: 0.25em 0;
}

.login .container #content .check label {
    font-size: 14px;
    margin-left: 5px;
}

/* El borde lo pone cada tema, por el mismo motivo que el color del h3. */
.login .container #content input {
    border-radius: 3px;
    margin-bottom: 5px;
    padding: 0 15px;
    height: 45px;
}

.login .container #content input[type=submit], .login .container #content input[type=button] { height: auto; }

.login .container #content input:hover,
.login .container #content input:focus {
    border: 1px solid #66afe9;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    transition: background-color 5000s ease-in-out 0s;
}

.login .container #content .btn {
    background: var(--lua-primario);
    border: var(--lua-primario);
    font-size: 22px;
    padding: var(--lua-boton-padding);
    margin: 5px 0 40px 0;
    width: 100%;
}

.login .container #content .btn:hover,
.login .container #content .btn:focus {
    background: var(--lua-primario-hover);
    border: var(--lua-primario-hover);
}

/* ---------------------------------------------------------------------------------------------------------------------
   Formulario de ingreso de datos
   --------------------------------------------------------------------------------------------------------------------- */

#fm1 .row input[type=text],
#fm1 .row input[type=password] {
    max-width: 100%;
    min-width: 0;
}

.top-row {
    display: flex;
}

.top-row-left {
    margin-right: auto;
}

.top-row-right {
    margin-left: auto;
    padding: 0.25rem 0;
}

#capslock-on {
    color: firebrick;
}

/* ---------------------------------------------------------------------------------------------------------------------
   Pie
   --------------------------------------------------------------------------------------------------------------------- */

#footer {
    width: 100%;
}

#footer .container {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

footer {
    padding: 20px;
    z-index: 1;
    margin-top: 50px;
    border-top: 1px solid #e3e3e3;
    color: black;
}

footer p {
    color: var(--lua-footer-texto);
    font-family: "Roboto Condensed", sans-serif;
    font-size: 13px;
    font-weight: 300;
    line-height: 14px;
    margin: 0 0 2px;
}

footer .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* El logo de Antel del pie: la imagen la pone cada tema. */
footer .logo {
    margin: 0 10px 0 0;
    width: 60px;
    height: 30px;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    flex: 0 0 60px;
}

footer .subtitle {
    align-self: flex-start;
    flex: 1 1 auto;
    min-width: 220px;
}

footer .terms {
    text-align: right;
    flex: 0 0 auto;
}

footer .terms p { font-weight: 600; }

footer .terms a {
    font-size: 13px;
    line-height: 14px;
    margin-left: 20px;
    font-family: 'Roboto Condensed', sans-serif;
}

footer a:link, footer a:visited {
    color: darkgray;
}

.login .container footer {
    margin-top: 2em;
    padding: 1em 0;
    border-top: 1px solid #e3e3e3;
}

/* ---------------------------------------------------------------------------------------------------------------------
   Avisos debajo de la caja
   --------------------------------------------------------------------------------------------------------------------- */

#notices h2 {
    font-size: 1.25em;
}

#notices p {
    font-size: 10pt;
}

#notices ul.list-group .fa {
    margin-right: 7px;
}

#notices .well h3 {
    margin-top: 0;
    font-size: 1.25em;
}

#notices .well ul.list-group {
    margin-bottom: 0;
}

/* Mensaje de abajo de los temas genéricos (fragments/marco :: mensajeAbajo) */
#welcomeMessage {
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 2em 0 0;
}

#welcomeMessage p {
    color: #9e9e9e;
    font-size: 12px !important;
}

/* ---------------------------------------------------------------------------------------------------------------------
   Vistas de código (login por código y loop de 2FA)
   --------------------------------------------------------------------------------------------------------------------- */

body.login.otp #content {
    background: transparent;
}

body.login.otp .otp-box {
    max-width: 560px;
    margin: 0 auto;
    padding: 20px;
}

body.login.otp .otp-title {
    font-size: 22px !important;
    font-weight: bold !important;
    color: var(--lua-otp-titulo) !important;
    line-height: 1.3 !important;
}

body.login.otp .otp-box p {
    margin-bottom: 1.1rem !important;
    line-height: 1.6 !important;
}

body.login.otp .otp-destinations p {
    margin-bottom: 0.75rem !important;
}

body.login.otp .otp-actions .btn {
    white-space: normal;
    text-align: center;
    margin-bottom: 12px;
}

/* Espaciado vertical entre los bloques directos de la caja */
body.login.otp .otp-box > * + * {
    margin-top: 0.75rem !important;
}

body.login.otp .otp-destinations-list {
    margin: 0.5rem 0 1.25rem 1.25rem !important;
}

body.login.otp .otp-destinations-list li {
    margin-bottom: 0.5rem !important;
    line-height: 1.6 !important;
}

body.login.otp .otp-box p,
body.login.otp .otp-box li,
body.login.otp .otp-box a,
body.login.otp .otp-box label {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 14px;
}

/* Botones iguales a los del login */
body.login.otp .otp-box .otp-actions .btn {
    font-size: 22px !important;
    padding: 0.5em !important;
    white-space: normal !important;
    text-align: center !important;
    margin-bottom: 12px !important;
}

/* Casilleros del código, uno por dígito (fragments/codigo-por-digito) */
body.login.otp .otp-code-wrapper {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 0.5rem 0 1rem 0;
}

body.login.otp .otp-code-input {
    width: 1.8ch;
    min-width: 1.8ch;
    height: 3rem;
    text-align: center;
    font-size: 1.6rem;
    line-height: 3rem;
    padding: 0;
    color: #000;
    background-color: #fff;
    border: 1px solid #222;
    border-radius: 3px;
}

body.login.otp .otp-captcha-wrap {
    display: flex;
    justify-content: center;
}

/* ---------------------------------------------------------------------------------------------------------------------
   Responsive: 960, 855, 767, 599 y 480 px
   --------------------------------------------------------------------------------------------------------------------- */

@media only screen and (max-width: 960px) {
    header {
        padding: 20px;
    }

    #content {
        border-radius: 0;
        padding: 0;
    }
}

@media only screen and (max-width: 855px) {
    #login {
        float: none;
        width: 100%;
    }

    #fm1 .row input[type=text],
    #fm1 .row input[type=password] {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }

    #fm1 .row .btn-submit {
        outline: none;
        -webkit-appearance: none;
        border: 0;
        background: #70ba61;
        color: white;
        width: 100%;
        padding: 10px 20px;
        border-radius: 3px;
    }
}

@media (max-width: 767px) {
    footer .logo,
    footer .subtitle,
    footer .terms {
        flex: 1 1 100%;
        text-align: center;
        margin: 6px 0;
    }

    footer .terms a { display: inline-block; margin: 0 10px; }
}

@media only screen and (max-width: 599px) {
    body#cas {
        background: var(--lua-fondo-movil, var(--lua-fondo));
    }

    #container {
        padding-left: 15px;
        padding-right: 15px;
    }

    a#logo {
        max-width: 175px;
    }

    .login .container header {
        padding: 7px 0 0 0;
    }

    .login .container #content #login {
        padding: 0;
        margin: 30px 0 0;
        width: 100%;
        max-width: none;
        border: none;
    }

    .login .container #content h2 {
        padding-left: 20px;
        margin: 15px 0 0;
    }

    .login .container #content h3 {
        font-size: 14px;
        line-height: 35px;
        margin-top: 15px;
    }

    .login .container #content .btn {
        margin-bottom: 30px;
        font-size: 18px;
        padding: 0.7em;
    }

    .login .container #content #login form section {
        padding: 35px 20px 0;
    }

    .alert.alert-danger {
        margin: 0 19px 20px;
    }

    #footer > div.container > div.row {
        padding: 0 10px;
    }

    /* Mantener los márgenes laterales en móvil aunque otras vistas los quiten */
    body.login.otp #container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .otp-box {
        padding: 0 20px !important;
    }

    .otp-instruction {
        text-align: center !important;
    }
}

@media (max-width: 480px) {
    body.login.otp .otp-code-input {
        height: 2.6rem;
        font-size: 1.4rem;
    }
}
