@import "/home/wildaxewappears/node_modules/modern-normalize/modern-normalize.css";
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
  line-height: 1.5;
}

h1, h2, h3, h4, h5, figure, p, ol, ul {
    margin: 0;
  }
  
  ol[role="list"], ul[role="list"] {
    list-style: none;
    padding-inline: 0;
  }
  
  img {
    display: block;
    max-inline-size: 100%;
  }
  

:root.light{
    --body-background-color:#f9fafb;
    --text-color:white;
    --right-container-text-color: black;
    --form-background-color:white;
    --label-text-color:rgb(107, 107, 107);
    --input-text-color:white;
    --input-valid: #388E3C;
    --input-invalid:  #D32F2F;
    --button-bg-color: #214254;
    --button-bg-hover: #1B3A4B;
    --form-box-shadow: 0px 5px 7px 1px #C4C4C4;
    --submit-box-shadow:  0px 2px 1px 0px #C4C4C4;
    --background-image: url(img/lightSide.jpg);
    --error-text-color: red;
    --theme-bg-color: black;
    --theme-text-color: white;
    --link-text-color: #388E3C
}

:root.dark {
    --body-background-color: #1a1a1a;
    --text-color: white;
    --right-container-text-color: white;
    --form-background-color: #333333;
    --label-text-color: #bbbbbb;
    --input-text-color: white;
    --input-valid: #00E676;
    --input-invalid: #FF1744;
    --button-bg-color: #D32F2F;
    --button-bg-hover: #B71C1C;
    --background-image: url(img/darkSide.jpg);
    --form-box-shadow: 0px 5px 7px 1px rgba(255, 0, 0, 0.5);
    --submit-box-shadow: 0px 2px 1px 0px rgba(255, 0, 0, 0.5);
    --error-text-color: white;
    --theme-bg-color: white;
    --theme-text-color: black;
    --link-text-color:#D32F2F;
    

  }

body{
    font-family: 'Roboto', sans-serif;
    min-height: 100vh;
    margin: 0px;
    display: flex;
    position: relative;
    background-color: var(--body-background-color)
    }

.left-container {
    background-image: var(--background-image);
    background-position: center;
    background-size: cover; 
    width: 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.logo{
    background-color: rgb(0 0 0 / 30%);
    width: 100%;
    height: 9.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    color: var( --text-color);
    text-shadow:  3px 3px 5px black;
    margin: calc(200rem/16);
    
}

.left-footer{
    color: var( --text-color);
    text-shadow: 
    2px 2px 4px black, 1px 1px 4px black, 3px 2px 4px black, 0px 3px 4px black, 0 0 5px black;
    font-size: 1.2rem;
}

.right-container{
    display: flex;
    flex-direction: column;
    padding-top: 6rem;
    margin-top: 2.5rem;
}

header{
    display: flex;
    flex-direction: column;
    margin-left: 2.5rem;
    margin-bottom: 3.5rem;
    margin-right: 10rem;
    min-width: 15rem;
    color: var(--right-container-text-color);
}

header h2:nth-of-type(2) {
    margin-top: 1rem; 
}

#theme {
    position: absolute;
    top: 1px;
    right: 10px;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    background-color: var(--theme-bg-color);
    color: var(--theme-text-color);
}

.form-container {
    padding: 1.5rem 0;
    background-color: var(--form-background-color);
    box-shadow: var(--form-box-shadow);

}

.form-container p {

    font-size: 1.5rem;
    font-weight: 550;
    line-height: 2rem;
    margin-left: 2.5rem;
    color: var(--right-container-text-color);
}

form{
    max-width: 50%;
    margin-top: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-left: 2.5rem;
}

.credentials{
    display: flex;
    flex-direction: column;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

label{
    margin-bottom: 0.3rem;
    color: var(--right-container-text-color);
    font-weight: 550;
    letter-spacing: 0.1rem;
    font-size: 0.9rem;
}

input{
    height: 28px;
    width: 240px;
    margin: 0;
    font-family: inherit;
    font-size: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input + span {
    position: relative;
  }
  
  input:required + span::after {
    font-size: 0.7rem;
    position: absolute;
    content: "required";
    color: var(--input-text-color); 
    background-color: black;
    padding: 3px 15px;
    top: -53px;
    right: 0px;
  }

  input:valid {
    border-color: var(--input-valid); 
    box-shadow: 0 4px 6px rgba(70, 177, 75, 0.2);
    outline: none;
}

input:invalid {
    border-color: var(--input-invalid); 
    box-shadow: 0 4px 6px rgba(211, 47, 47, 0.3);
    outline: none;
}

.error{
    font-size: 0.7rem;
    color: var(--error-text-color);
    margin-top: 3px;
    visibility: hidden;
}

.login{
    display: flex;
    flex-direction: column;
    margin-top: 2rem;
    margin-left: 2.5rem;
}

.login p{
    margin-top: 24px;
    color: var(--right-container-text-color);
}

#submit{    
    width: 240px;
    height: 54px;
    padding: 1rem 3rem;
    border-radius: 12px;
    background-color: var(--button-bg-color);
    color: white;
    font-size: 1.2rem;
    box-shadow: var(--submit-box-shadow);
    border: none;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

#submit:hover {
    background-color: var(--button-bg-hover); 
}

#submit:active {
    transform: scale(0.95);
    box-shadow: 0px 2px 5px 1px rgba(0, 0, 0, 0.2);
}

a{
    text-decoration: none;
    color: var(--link-text-color);
}
a:hover{
    text-decoration: underline;
}

.right-footer{
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: black;
    text-align: center;
    margin-top: auto;
    color: white;
    height: calc(30rem/16);
}

.right-footer a {
    color: white;
}

@media only screen and (max-width: 768px) {
    body{
        display: flex;
        flex-direction: column;
        }

        .left-container {
            width: 100%;
        }
    }