/* SenzaFreni_cc/css/login-page-styles.css */

/* Styles for the standalone login page */
body.login-page-active {
    background-image: linear-gradient(to bottom right, var(--dark-blue), var(--dark-purple));
    background-attachment: fixed;
    background-size: cover;
    font-family: 'Open Sans', sans-serif;
    display: flex;
    justify-content: center; /* Center .login-page-wrapper (or .login-container) horizontally */
    align-items: center; /* Center .login-page-wrapper (or .login-container) vertically */
    min-height: 100vh;
    margin: 0; /* Remove default body margin */
    padding: 20px; /* Add some padding around the login box */
    box-sizing: border-box;
}

/* Wrapper for the login container, mainly for semantic structure or future additions */
.login-page-wrapper {
    display: flex; /* Ensures it can center the login-container if needed, or just wraps it */
    justify-content: center;
    align-items: center;
    width: 100%; /* Takes width from body's padding */
    max-width: 450px; /* Max width of the content area, same as login-container */
}

.login-container {
    background-color: rgba(255, 255, 255, 0.98); /* Slightly transparent white */
    padding: 2.5rem 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
    width: 100%; /* Takes full width of its parent (.login-page-wrapper) */
    text-align: center;
    border-top: 5px solid var(--bright-red);
}

.login-logo {
    margin-bottom: 1.8rem;
}

.login-logo img {
    max-height: 80px;
    width: auto;
}

.login-title {
    font-family: 'Patrick Hand', cursive;
    color: var(--dark-blue);
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    font-weight: normal;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
    position: relative; /* Needed for absolute positioning of the toggle icon */
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: bold;
    font-size: 0.95rem;
    font-family: 'Open Sans', sans-serif;
}

.login-form .form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box; /* Ensure padding doesn't add to width */
}

.login-form .form-control:focus {
    border-color: var(--bright-red);
    box-shadow: 0 0 0 0.2rem rgba(230, 33, 69, 0.25);
    outline: none;
}

/* Styles for the password toggle icon */
.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    top: 70%; /* Adjust to vertically align with the input field text */
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem; /* Adjust size as needed */
    color: #888; /* Icon color */
    user-select: none; /* Prevent text selection on click */
}

/* Adjust input padding to prevent text from overlapping with the icon */
.login-form .form-control#password {
    padding-right: 40px; /* Ensure space for the icon */
}

.login-button {
    background-color: var(--bright-red);
    border-color: var(--bright-red);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    font-family: 'Patrick Hand', cursive;
    border-radius: 6px;
    width: 100%;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-button:hover,
.login-button:focus {
    background-color: var(--dark-purple);
    border-color: var(--dark-purple);
    color: var(--white);
}

.login-message {
    padding: 0.8rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    text-align: center;
    font-family: 'Open Sans', sans-serif;
}

.error-message {
    background-color: rgba(230, 33, 69, 0.1);
    color: var(--bright-red);
    border: 1px solid rgba(230, 33, 69, 0.3);
}

.timeout-message {
    background-color: rgba(23, 57, 80, 0.1);
    color: var(--dark-blue);
    border: 1px solid rgba(23, 57, 80, 0.3);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .login-container {
        padding: 2rem 1.5rem;
    }
    .login-title {
        font-size: 2.4rem;
    }
    .login-logo img {
        max-height: 70px;
    }
}

@media (max-width: 480px) {
    body.login-page-active {
        padding: 10px; /* Reduce body padding on very small screens */
    }
    .login-container {
        padding: 1.5rem 1rem;
    }
    .login-title {
        font-size: 2rem;
    }
    .login-logo img {
        max-height: 60px;
    }
    .login-form .form-control,
    .login-button {
        font-size: 0.95rem;
        padding: 0.7rem 0.9rem;
    }
}

/* Adjustments for when the keyboard is open on mobile, optional */
@media (max-height: 500px) and (max-width: 767px) {
    body.login-page-active {
        justify-content: flex-start; /* Align to top if content overflows due to keyboard */
        padding-top: 20px;
        padding-bottom: 20px;
    }
    .login-page-wrapper {
        margin-top: 10px; /* Add some margin if screen is very short */
        margin-bottom: 10px;
    }
    .login-logo img {
        max-height: 50px;
    }
    .login-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
}

