/* COLOR VARIABLES */
:root {
    --primary-color: #0D1936;
    --secondary-color: #535354;
    --background-color: #EFEFEF;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --white-color: #FFF;
    --black-color: #000;
    --input-border-color: #E3E4E6;
    --transition-3s: 0.3s;
}

/* GLOBAL STYLES */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Times New Roman', cursive;
}

/* REUSABLE ELEMENTS */
a{
    text-decoration: none;
    color: var(--black-color);
    transition: var(--transition-3s);
}
a:hover{
    text-decoration: underline;
}

body{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--background-color);
}

/* WRAPPER */
.wrapper{
    position: relative;
    width: 430px;
    height: 500px;
    margin-top: 20px;
    background-color: #ffffff;
    opacity: .4;
    border-radius: 15px;
    padding: 120px 32px 64px;
    box-shadow: 0 8px 15px var(--shadow-color);
    transition: var(--transition-3s);
    overflow: hidden;
}
/* FORM HEADER */
.form-header{
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 70px;
    background-color: var(--primary-color);
    border-radius: 0 0 20px 20px;
}
.form-header::before, .form-header::after{
    content: "";
    position: absolute;
    top: 0;
    width: 30px;
    height: 30px;
}
.form-header::before{
    left: -30px;
    border-top-right-radius: 50%;
    box-shadow: 15px 0 0 var(--primary-color);
}
.form-header::after{
    right: -30px;
    border-top-left-radius: 50%;
    box-shadow: -15px 0 0 var(--primary-color);
}
/* TITLES */
.titles{
    position: relative;
}
.title-login, .title-register{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    color: var(--white-color);
    font-size: 34px;
    transition: var(--transition-3s);
}
.title-register{
    top: 50px;
}

/* FORMS */
.login-form{
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    transition: var(--transition-3s);
}

/* INPUT FIELDS */
.input-box{
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 20px 0;
}
.input-field{
    width: 100%;
    height: 40px;
    font-size: 16px;
    background: #ffffff;
    color: black;
    padding: 0 20px;
    border: none;
    border-bottom: 1px solid black;
    outline: none;
    transition: var(--transition-3s);
}
.input-field:focus{
    border-bottom: 1px solid black;
}
.label{
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    transition: 0.2s;
}

.input-field:focus ~ .label,
.input-field:valid ~ .label{
    top: 0;
    font-size: 14px;
    background-color: var(--white-color);
    color: var(--primary-color);
    padding: 0 10px;
}
.input-field:valid ~ .label{
    color: var(--secondary-color);
}
/* FORGOT PASSWORD & TERMS AND CONDITIONS */
.form-cols{
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}
.col-1{
    display: flex;
    align-items: center;
    gap: 6px;
}
/* SUBMIT BUTTON */
.btn-submit{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white-color);
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition-3s);
    margin-top: 8px;
}
.btn-submit:hover{
    gap: 15px;
}
.btn-submit i{
    font-size: 20px;
}
/* SWITCH FORM */
.switch-form{
    text-align: center;
}
.switch-form a{
    font-weight: 500;
}

/* RESPONSIVE STYLES */
@media only screen and (max-width: 1120px) {
    .ask form {
        margin-left: -50px;
        margin-top: -50px;

    }
}
@media only screen and (max-width: 720px){
    .wrapper{
        margin: 20px;
        height: 440px;
        width: 345px;
        margin-top: 80px;
    }

    .message {
        margin-top: -65px;
        float: right;
    }
    .title-login {
        font-size: 28px;
        text-align: center;
        margin-top: -2px;
    }
    .form-header {
        height: 50px;
    }
}
@media only screen and (max-width: 564px){
    .wrapper{
        margin: 20px;
        height: 440px;
        width: 345px;
        margin-top: 80px;
    }

    .message {
        margin-top: -65px;
        float: right;
    }
    .title-login {
        font-size: 28px;
        text-align: center;
        margin-top: -2px;
    }
    .form-header {
        height: 50px;
    }
    .login-form {
        margin-top: -50px;
    }
}
@media only screen and (max-width: 447px){
    .wrapper{
        margin: 20px;
        height: 440px;
        width: 345px;
        margin-top: 80px;
    }

    .message {
        margin-top: -65px;
        float: right;
    }
    .title-login {
        font-size: 28px;
        text-align: center;
        margin-top: -2px;
    }
    .form-header {
        height: 50px;
    }
    .login-form {
        margin-top: -50px;
    }
}

@media only screen and (max-width: 300px){
    .wrapper{
        margin: 20px;
        height: 440px;
        width: 345px;
        margin-top: 80px;
    }

    .message {
        margin-top: -65px;
        float: right;
    }
    .title-login {
        font-size: 28px;
        text-align: center;
        margin-top: -2px;
    }
    .form-header {
        height: 50px;
    }
    .login-form {
        margin-top: -50px;
    }
}
