/* --- Login Page specific styles --- */

.auth-main {
    min-height: calc(100vh - 400px);
    /* rough fallback */
    padding-top: 8rem;
    padding-bottom: 5rem;
    background-color: var(--clr-gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-wrapper {
    max-width: 480px;
    margin: 0 auto;
    background: var(--clr-white);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--clr-gray-medium);
}

.auth-container {
    display: flex;
    width: 200%;
    /* allows sliding two 100% panes */
    transition: transform var(--transition-slow);
}

.auth-container.show-register {
    transform: translateX(-50%);
    /* Moves left to reveal register */
}

html[dir="rtl"] .auth-container.show-register {
    transform: translateX(50%);
    /* In RTL, element to the right is technically at negative transform, so to reveal left pane we move right (positive translation) */
}

.auth-form-box {
    width: 50%;
    /* each pane takes half of the 200% width container */
    padding: 3rem 2.5rem;
}

.auth-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--clr-navy);
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    color: var(--clr-gray-dark);
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--clr-text-main);
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--clr-navy);
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.forgot-link:hover {
    color: var(--clr-gold);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i.fa-envelope,
.input-wrapper i.fa-lock,
.input-wrapper i.fa-user {
    position: absolute;
    inset-inline-start: 1rem;
    color: var(--clr-gray-dark);
    font-size: 0.9rem;
}

.input-wrapper input {
    width: 100%;
    padding: 0.8rem;
    padding-inline-start: 2.5rem;
    padding-inline-end: 1rem;
    border: 1px solid var(--clr-gray-medium);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background-color: var(--clr-white);
}

.input-wrapper input:focus {
    border-color: var(--clr-gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* Specific styling for fields without leading icons like Last Name */
.input-wrapper input:not(:focus):placeholder-shown {
    color: var(--clr-gray-dark);
}

/* Adjust padding if no icon */
.form-row .input-wrapper:not(:has(i.far)) input {
    padding-inline-start: 1rem;
}


.password-toggle {
    position: absolute;
    inset-inline-end: 1rem;
    background: none;
    border: none;
    color: var(--clr-gray-dark);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--clr-navy);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    accent-color: var(--clr-gold);
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.85rem;
    color: var(--clr-text-main);
    cursor: pointer;
    font-weight: 600;
}

.checkbox-group label a {
    color: var(--clr-gold);
    text-decoration: underline;
}

.auth-submit {
    margin-top: 1rem;
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

.auth-switch {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--clr-text-main);
}

.switch-btn {
    background: none;
    border: none;
    color: var(--clr-navy);
    font-weight: 700;
    cursor: pointer;
    margin-inline-start: 0.5rem;
    text-decoration: underline;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.switch-btn:hover {
    color: var(--clr-gold);
}

/* Responsive adjustments */
@media screen and (max-width: 576px) {
    .auth-form-box {
        padding: 2.5rem 1.5rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1.25rem;
    }
}