/*For the signup and login window*/

#show-login, #show-signup {
    cursor: pointer;
}

section {
    z-index: 1;
}

.overlay {
    background: rgba(0, 0, 0, 0.7);
    z-index: 2;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    padding: 2rem;
    box-shadow: 0, 0, 40px, rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    background-color: white;
    animation: popupAnimation 0.5s ease-in-out forwards;
    z-index: 3;
}

@keyframes popupAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.25);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.close-btn {
    position: absolute; /*set the ancestor elem to be the popup*/
    top: 15px;
    right: 20px; /*"top" and "right" are positioning properties. 
                    They indicate the distance of the element from the top and right edges of its nearest positioned ancestor.
                    In this case, the elem is "close-btn", and its ancestor elem is "popup".*/
    transform: scale(1.2);
    text-align: center;
    line-height: 20px;
    cursor: pointer;
}

.close-btn:hover {
    background: #747474;
    color: white;
    border-radius: 15px;
    width: 20px;
    height: 20px;
    animation: rotation 0.1s linear;
}

@keyframes rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(90deg);
    }
}

.popup, .form-input, .form-button {
    font-family: 'Gabarito', sans-serif;
    font-size: 1.2rem;
}

.form-hidden { /*add hidden style for switching between signup and login*/
    display: none;
}

.form > *:first-child {
    margin-top: 0;
}

.form > *:last-child {
    margin-bottom: 0;
}

.form-title {
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2.5rem;
    letter-spacing: 0.2rem;
}

.form-message {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.form-message-success {
    color: blueviolet;
}

.form-message-error {
    color: rgb(216, 0, 0);
}

.form-input-group {
    margin-bottom: 1rem;
}

.form-input {
    display: block;
    width: 100%;
    padding: 0.75rem;
    box-sizing: border-box;
    border-radius: 4px;
    border: 1px solid #dddddd;
    outline: none;
    background: #eeeeee;
    transition: background 0.2s, border-color, 0.2s;
}

.form-input:focus {
    border-color: blueviolet;
    background: white;
}

.form-input-error {
    color: rgb(216, 0, 0);
    border-color: rgb(216, 0, 0);
}

.form-input-error-message {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: rgb(216, 0, 0);
}

.form-button {
    width: 100%;
    padding: 12px 20px;
    font-weight: bold;
    letter-spacing: 0.1rem;
    color: white;
    border: none;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    background: blueviolet;
}

.form-button:hover {
    background: rgb(88, 21, 151);
}

.form-button:active {
    transform: scale(0.98);
}

.form-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    margin: 1rem;
    font-size: 1rem;
}

.form-link {
    color: #747474;
    text-decoration: none;
    cursor: pointer;
}

.form-link:hover {
    text-decoration: underline;
}
