/* * 03_auth.css 
 * Contains: All styles for the Auth Page (Login, Register, Forgot)
 */

/* ---------------------------------- */
/* 4. Auth Page & Forms            */
/* ---------------------------------- */
.auth-header {
    max-width: 900px; 
    margin: 40px auto 0 auto; 
    text-align: center;
}

.auth-logo {
    width: 90%; 
    max-width: 900px;
    height: auto; 
}

.auth-description {
    max-width: 900px;
    margin: 15px auto 25px auto;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-color-secondary);
}

#authContainer {
    max-width: 400px;
    margin: 0 auto 40px auto; 
    padding: 20px;
    background-color: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

#authContainer form input,
#authContainer form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background-color: #2c2c2c;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    box-sizing: border-box; 
    font-family: 'Roboto', sans-serif; /* Ensure textarea inherits font */
}

#authContainer form textarea {
    resize: vertical;
    min-height: 120px;
}

#authContainer form button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

#authContainer form button:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.forgot-password-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.85rem;
}

/* Form status messages (e.g., login error) */
.form-message {
    text-align: center;
    margin-bottom: 15px;
    min-height: 1.2em;
    font-weight: bold;
}

.form-instructions {
    font-size: 0.9rem;
    color: var(--text-color-secondary);
    text-align: center;
    margin-bottom: 15px;
}

.form-message.success {
    color: var(--success-color);
}

.form-message.error {
    color: var(--danger-color);
}

/* Password visibility toggle */
.password-container {
    position: relative;
    width: 100%;
}

.password-container input {
    padding-right: 40px; 
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-60%); 
    cursor: pointer;
    color: var(--text-color-secondary);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

/* "Stay logged in" */
.form-options {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
}

/* Custom checkbox container */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px; /* Space for the custom box */
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color-secondary);
    user-select: none;
}

/* Hide the browser's default checkbox */
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create the custom checkbox */
.custom-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #2c2c2c;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

/* On hover, slightly change border */
.checkbox-container:hover input ~ .custom-checkmark {
    border-color: var(--primary-color);
}

/* When checked, change background */
.checkbox-container input:checked ~ .custom-checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Create the checkmark (hidden when not checked) */
.custom-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* Show the checkmark when checked */
.checkbox-container input:checked ~ .custom-checkmark:after {
    display: block;
}

/* ============================ */
/* === LANGUAGE FLAG STYLES === */
/* ============================ */

.language-flags-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.lang-flag {
    width: 50px; 
    height: 35px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid #555;
    background-color: #333; /* Fallback color */
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}
.lang-flag:hover {
    border-color: #777;
    transform: scale(1.05);
}
.lang-flag.active {
    border-color: #3fa9f5;
    transform: scale(1.1);
}

/* New rule to center the flags on the auth page */
.auth-flags {
    justify-content: center;
    margin-bottom: 20px; /* Add space below flags */
}
