/* ============================= */
/*         LOGIN PAGE CSS        */
/* ============================= */

.login-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 20px; /* added to give some spacing on small screens */
}

.login-container,
.password-reset-container,
.reset-password-container {
    background-color: #ffffff;
    border: 1px solid #e1e1e1;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 20px;

    /* Replace fixed height with min-height */
    min-height: 350px; 
    height: auto;
}

/* Optional: specific tweaks for different containers */
.password-reset-container {
    padding: 30px 30px;
    min-height: 300px;
}

.reset-password-container {
    padding: 40px 30px;
    min-height: 350px;
}

.login-title {
    text-align: center;
    font-size: 2rem;
    color: black;
    font-weight: bold;
    margin-bottom: 10px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-form label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #444;
}

.login-links {
    display: flex;
    flex-direction: column;
}

.login-form input[type="email"],
.login-form input[type="password"],
#resetPasswordForm input[type="password"],
div.password-wrapper input#password,
div.password-wrapper input#confirmPassword {
    padding: 12px 14px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fafafa;
    transition: border-color 0.3s ease;
    width: 100%;
}

.login-form input:focus {
    border-color: #e4bc1c;
    outline: none;
}

.login-form button {
    background-color: #e4bc1c;
    color: white;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-form button:hover {
    background-color: #bf9d17;
}

.login-register-link,
.password-reset-link {
    text-align: center;
    font-size: 0.9rem;
    color: #555;
}

.login-register-link a,
.password-reset-link a {
    color: #e4bc1c;
    text-decoration: none;
    font-weight: 600;
}

.login-register-link a:hover,
.password-reset-link a:hover {
    text-decoration: underline;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    flex: 1;
    padding-right: 40px; /* space for the eye icon */
}

.toggle-password {
    position: absolute;
    right: 10px;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    user-select: none;
}

.toggle-password.active {
    opacity: 1;
}

/* Responsive tweaks */
@media (max-width: 480px) {
    .login-container,
    .password-reset-container,
    .reset-password-container {
        padding: 30px 20px;
    }

    .login-title {
        font-size: 1.5rem;
    }
}

/* For tablets and small screens, allow scrolling if needed */
@media (max-height: 600px) {
    .login-main {
        align-items: flex-start; /* avoid cutting off top content */
    }

    .login-container,
    .password-reset-container,
    .reset-password-container {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Spinner */
#loadingSpinner {
    display: none;
    text-align: center;
    margin-top: 0px;
}

.spinner-circle {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #e4bc1c;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 4px solid #ccc;
    border-top-color: #e4bc1c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 5px auto;
}

.login-spinner.hidden {
    display: none;
}

@media (max-width: 768px) {
    .login-main {
        padding-left: 25px;
        padding-right: 25px;
    }
}