/*
 * LOGIN PAGE STYLES
 * This file styles the login form to match the modern dark theme.
 */

/* The .card class from styles.css is now applied to this container */
.login-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    width: 405px;
    /* Max-width and other card styles are inherited */
}

.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.login-heading {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-text);
}

#login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Input Styles */
.input-block {
    margin-bottom: 20px;
    width: 100%;
}

.input-block label {
    display: block;
    text-align: left;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--secondary-text);
}

.input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--dark-bg); /* Darker than the card for contrast */
    border: 1px solid var(--c1);
    border-radius: var(--dbor);
    padding: 0 15px;
    transition: border-color 0.3s;
}

.input-container:focus-within {
    border-color: var(--accent-green); /* Highlight on focus */
}

.input-container img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.input-container input {
    width: 100%;
    height: 45px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--primary-text);
    font-size: 1rem;
}

.input-container input::placeholder {
    color: var(--secondary-text);
    opacity: 0.7;
}

/* Buttons and Links */
.submit-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: var(--dbor);
    font-weight: bold;
    font-size: 1rem;
    color: var(--primary-text);
    background: linear-gradient(45deg, #57C785, var(--accent-green));
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.toggle-link {
    text-align: right;
    font-size: 0.9rem;
    color: var(--c2);
    cursor: pointer;
    margin-top: -10px;
    margin-bottom: 20px;
}

.toggle-link:hover {
    text-decoration: underline;
}

.register-link {
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--secondary-text);
}

.register-link a {
    color: var(--accent-green);
    font-weight: 600;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Modal Styling */
.modal {
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    padding: 40px;
    top: 35%;
    width: 96%;
    margin-right: 10px;
    margin-left: 10px;
}

.modal-heading {
    margin-bottom: 20px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--secondary-text);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--primary-text);
}

/*
 * AUTOFILL STYLES FIX
 * Overrides browser default styles for autofilled form fields to match the dark theme.
 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {

    /* Force the text color to be white, overriding the browser's default. */
    -webkit-text-fill-color: var(--primary-text) !important;

    /* A trick to delay the application of the browser's styles. */
    transition: background-color 5000s ease-in-out 0s;
}