/* Modal hidden by default */
.auth-modal {
    display: none;
    pointer-events: none;

    position: fixed;
    z-index: 9999;
    inset: 0;
    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.6);

    justify-content: center;
    align-items: center;
    opacity: 0;

    transition: opacity .2s ease;
}

/* When activated */
.auth-modal.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

/* Modal content box */
.auth-modal-content {
    background: #fff;
    padding: 25px;
    width: 350px;

    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;

    opacity: 0;
    transform: scale(0.9);
    transition: opacity .25s ease, transform .25s ease;
}

/* When modal is active */
.auth-modal.show .auth-modal-content {
    opacity: 1;
    transform: scale(1);
}

/* Close button */
.auth-close {
    position: absolute;
    top: 10px;
    right: 15px;

    font-size: 22px;
    cursor: pointer;
    color: #333;
}

.auth-close:hover { color: red; }

/* Forms */
.auth-modal-content input {
    width: 90%;
    margin: 8px 0;
    padding: 10px;

    border: 1px solid #ccc;
    border-radius: 5px;
}

.auth-modal-content button {
    width: 95%;
    padding: 10px;
    margin-top: 10px;

    background: #0073aa;
    color: #fff;

    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.auth-modal-content button:hover {
    background: #005f87;
}

/* Messages */
#popup_login_message,
#popup_register_message {
    margin-top: 10px;
    font-weight: bold;
}

.error { color: red; }
.success { color: green; }

/* Toggle form animation */
#popup-login-form,
#popup-register-form {
    opacity: 0;
    transform: translateY(-10px);
    transition: .3s ease;
}

#popup-login-form.active,
#popup-register-form.active {
    opacity: 1;
    transform: translateY(0);
}
