/*
Copyright 2018 JoinFaces.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/* 
        Created on : 29-01-2018, 16:21:49
        Author     : luis
*/

html, body{
    min-height: 100%;
    height: 100%;
}

body{
    display: block;
    height: 100%;
    position: relative;
    min-height: 100%;
    background: #f5f5f5 !important;
}

.contenedor-login-box {
    border-radius: 0 0 500px 500px /40px !important;
    height: 90%;
    text-align: center;
    display: block;
    position: relative;
    background: #ffffff;
    padding: 40px;
}

.contenedor-login-footer {
    width: 100%;
    margin: 0px !important;
    background: transparent;
    height: 10%;
    padding-top: 10px;
}

.login-box {
    width: 40%;
    margin: 0;
    max-width: 400px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
}

.login-logo-pais {
    margin: 0px 20px;
    width: 25%;
    max-width: 200px;
    max-height: 80px;
}

@media (max-width: 768px) {
    .login-box {
        width: 60%;
    }
    
    .contenedor-login-box {
        height: 70%;
    }
    
    .contenedor-login-footer {
        height: 30%;
    }
    
}

@media (max-width: 425px) {
    .login-box {
        width: 80%;
    }
    
    .contenedor-login-box {
        height: 70%;
    }
    
    .contenedor-login-footer {
        height: 30%;
    }
}

@media (max-width: 375px) {
    .login-box {
        width: 90%;
    }
    
    .contenedor-login-box {
        height: 70%;
    }
    
    .contenedor-login-footer {
        height: 30%;
    }
}

.login-logo {
    margin-bottom: 0;
}

.login-logo img{
    width: 70%;
    max-width: 400px !important;
}

.login-footer {
    font-size: 12px; 
    color: #02368e; 
    text-align: center;
}

.login-footer span{
    position: absolute;
    text-align: center;
    margin: 0 auto;
    bottom: 10px;;
    left: 50%;
    transform: translate(-50%,-50%);
}
.login-footer span, .login-footer a {
    color: #615151;
}

.PF_footer__login {
    text-align: center;
    margin: 30px 0;
}

.PF_footer__login img {
    max-width: 150px;
}

/* =========================================================
   Mejoras visuales del formulario (mismo lenguaje que SAAM/ICB)
   ========================================================= */
.login-page {
    --login-accent: #3f7bc8;
}

.login-input-improved {
    border-radius: 8px !important;
    padding: 12px 15px !important;
    height: auto !important;
    font-size: 14px !important;
    border: 1px solid #d2d6de !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.login-input-improved:focus {
    border-color: var(--login-accent) !important;
    box-shadow: 0 0 0 3px rgba(63, 123, 200, 0.15) !important;
}

.login-icon-improved {
    color: #999;
    font-size: 16px;
    margin-top: 15px !important;
    transition: color 0.2s ease;
}

.form-group:focus-within .login-icon-improved {
    color: var(--login-accent);
}

.btn-login-improved {
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.btn-login-improved:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.login-recuperar-link {
    text-align: right;
    margin-top: 12px;
}

.login-recuperar-link a {
    color: #444;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-recuperar-link a:hover {
    color: var(--login-accent);
}

/* =========================================================
   Entrada con fade (solo login /admin)
   El logo y la tarjeta parten ocultos (CSS puro, desde el primer
   pintado) y se revelan cuando login-admin.xhtml agrega .login-ready.
   Se limita a .login-fx para no afectar a las demas vistas que usan
   login.css (recuperar contrasenia, etc.), que no cargan el script.
   Sin librerias: CSS puro + JS vanilla minimo.
   ========================================================= */
.login-page.login-fx .login-logo,
.login-page.login-fx .login-box-body {
    opacity: 0;
    transform: translateY(14px);
}

.login-page.login-fx.login-ready .login-logo {
    animation: loginFadeUp 0.5s ease forwards;
}

.login-page.login-fx.login-ready .login-box-body {
    animation: loginFadeUp 0.5s ease 0.06s forwards;
}

@keyframes loginFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accesibilidad: sin animacion si se prefiere movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .login-page.login-fx .login-logo,
    .login-page.login-fx .login-box-body {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}