@import "./variables.css";

* {
    box-sizing: border-box;
    font-family: "Rubik", sans-serif;
    color: var(--quintenary-color);
}

body {
    margin: 0;
    background-color: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

main {
    display: flex;
    height: 100vh;
    width: 100vw;
    justify-content: center;
    align-items: center;
}

.login-window,
.signup-window {
    width: 100%;
    height: 100%;
    display: flex;
    background-color: var(--primary-color);
    align-items: center;
    flex-flow: column nowrap;
    padding-top: 50px;
    position: relative;
}

.hidden {
    display: none;
}

h1 {
    font-size: 2.5rem;
}

#login-btn {
    margin-top: 5rem;
}

#signup-btn {
    margin-top: 0.65rem;
}

label {
    margin-bottom: 10px;
    width: 400px;
    max-width: 90%;
    font-size: 1rem;
}

input {
    display: block;
    width: 100%;
    height: 2.5rem;
    font-size: 1.2rem;
    margin-top: 1.2rem;
}

button[type="submit"] {
    font-weight: bold;
    font-size: 1.3rem;
    cursor: pointer;
    height: 2rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: var(--quaternary-color);
    border-radius: 5px;
}

button[type="button"] {
    text-decoration: none;
    border: none;
    background-color: var(--tertiary-color);
    cursor: pointer;
    margin-top: 1.5rem;
}

span {
    position: absolute;
    left: max(calc(50% - 190px), 8%);
    transform: translateY(29px);
    transition: transform 0.1s ease;
}

label:has(input:focus) span,
label:has(input:not(:placeholder-shown)) span {
    transform: translate(-8px, -4px);
}

#login-error,
#signup-error {
    font-style: italic;
    height: 1rem;
}

@media (min-width: 768px) {
    main {
        width: 768px;
    }

    .login-window,
    .signup-window {
        height: 600px;
        padding-top: 0;
        border-radius: 20px;
    }
    
    label {
        width: 600px;
    }

    #login-btn {
        margin-top: 4.95rem;
    }

    span {
        left: calc(50% - 290px);
    }
}