@import "_mensajes.css";
@import "_modal.css";
@import "_loader.css";

@font-face {
    font-family:'RailAway';
    src: url('../fonts/Raleway-Medium.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
}

:root {
    --background-foto: linear-gradient(135deg, #667eea7e 0%, #764ba298 100%);
    --background: linear-gradient(120deg, #fff 0%, #005D85 100%);
    --color-primary: #667eea;
    --color-secondary: #764ba2;
    --color-enlace:#000;
}

@font-face {
    font-family:'Cabin';
    src: url('../fonts/Cabin-Bold.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
}

@font-face {
    font-family:'Gabarito';
    src: url('../fonts/Gabarito-Regular.ttf') format('truetype');
    font-style: normal;
    font-weight: normal;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a{
    color: var(--color-enlace);
    text-decoration: none;
}

img{
    display:block;
    width: 100%;
}

.wrap{
    width: 100%;
    height: 100vh;
    display: grid;
    max-width: 1920px;
    background: var(--background);
    margin: 0 auto;
    grid-template-rows: 10% 1fr 4%;
    font-family: 'RailAway'; 

    .headerWrap{
        display: grid;
        grid-template-columns: repeat(12,1fr);
        padding: .5rem;

        .header_logo{
            width: 100%;
        }

        .header_text{
            grid-column: 9 / 13;
            align-items: center;
            font-size: 1.8rem;
            font-weight: bold;
            color: #fff;
            text-shadow: 2px 3px 5px #c2c2c2;
            padding-top: 1rem;
            padding-right: 0.1rem;
        }
    }

    .bodyWrap{
        display: flex;
        justify-content: center;
        align-items: center;
        background: var(--background-foto),url("../assets/background.jpg");
        background-repeat: no-repeat;
        background-size: cover;
        background-attachment: fixed;
        background-position: center; 
        
        .loginContainer{
            #formData{
                background-color: rgba(255, 255, 255, 0.9); /* 🔧 Corregido */
                backdrop-filter: blur(15px);
                position: relative;
                border-radius: 10px;
                font-family: 'Gabarito';
                padding: 1rem;
                margin: auto;
                

                h1{
                    display: block;
                    text-align: center;
                }

                .group{
                    position: relative;
                    margin: 2rem 20px;

                    .icon_login {
                        position: absolute;
                        right: 0;
                        top: 0;
                        
                        .icon_img {
                            height: 15px;
                            display: block;
                        }
                    }
                }

                .login_input{
                    font-size:16px;
                    padding:10px 10px 10px 5px;
                    display:block;
                    width:100%;
                    border:none;
                    border-bottom:1px solid #757575;
                    background: transparent;

                    &:focus {
                        outline:none;
                    }
                
                    &:focus ~ label, &:valid ~ label {
                        top:-20px;
                        font-size:14px;
                        color:#000;
                    }
                
                    /* 🔧 Eliminado el código de .bar que no existe */
                    &:focus ~ .highlight {
                        -webkit-animation:inputHighlighter 0.3s ease;
                        -moz-animation:inputHighlighter 0.3s ease;
                        animation:inputHighlighter 0.3s ease;
                    }
                }

                .place_label {
                    color:#c2c2c2; 
                    font-size:18px;
                    font-weight:normal;
                    position:absolute;
                    pointer-events:none;
                    left:5px;
                    top:10px;
                    transition:0.2s ease all; 
                }

                .login_actions{
                    text-align: center;

                    .login_link {
                        border: 2px solid transparent;
                        transition: all 0.5s;
                        padding: 10px;
    
                        &:hover{
                            border: 2px solid #005B86;
                            color:#005B86;
                        }
                    }
                }

                .button_login{
                    color: #fff;
                    font-size: 20px;
                   
                    padding: 0.5em 1.2em;
                    background: #79ae92;
                    position: relative;
                    border: 2px solid #79ae92;
                    outline: 1px solid;
                    outline-color: rgba(229, 241, 251, 0.4);
                    transition: all 1s cubic-bezier(0.19, 1, 0.22, 1);
                    display: block;
                    margin: 2rem auto;
                    width: 80%;
                    border-radius: 10px;
                    margin-bottom: 2rem;
    
                    &:hover{
                        box-shadow: inset 0 0 5px rgba(0, 138, 172, 0.5), 0 0 5px rgba(49, 138, 172, 0.4);
                        outline-color: rgba(0, 138, 172, 0);
                        outline-offset: 10px;
                        text-shadow: 1px 1px 3px #fff;
                    }

                    /* 🔧 Accesibilidad */
                    &:focus-visible {
                        outline: 2px solid #005B86;
                        outline-offset: 2px;
                    }
                }

                .requirements-list {
                    list-style: none;
                    padding: 0;
                    margin: 0;
                }

                .requirement-item {
                    display: flex;
                    align-items: center;
                    margin-bottom: 8px;
                    color: #050504;
                    font-size: 14px;
                    transition: color 0.3s;
                }

                .requirement-item::before {
                    content: "❌";
                    margin-right: 10px;
                    font-size: 12px;
                }

                .requirement-item.valid {
                    color: #2eed34;
                }

                .requirement-item.valid::before {
                    content: "✅";
                }
            }
        }
    }

    .footerWrap{
        display: flex;
        justify-content:center;
        align-items:center;
    }
}

@media screen and (max-width:412px){
    .wrap {
        width: 100%;
        height: 100vh !important;
        max-width: 480px;
        grid-template-rows: 10% 1fr 2%;

        .header_logo{
            grid-column: 1 / 4;
            margin-top: 5px;
        }

        .header_text{
            display: block;
            grid-column: 5 / 13 !important;
            font-size: .9rem !important;
        }
    }

    .modal_mensaje{
        width: 100%;
        left: 0;
    }

    .loginContainer {
        width: 70% !important;
    }
}