/* ========================================
   LOGIN, REGISTER & PASSWORD RESET PAGES
   ======================================== */

/* --- LOGIN/REGISTER PAGE --- */

.login-register-container {
    max-width: 900px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--color-text);
}

/* --- LOGIN/REGISTER GRID LAYOUT --- */

.login-register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.login-section {
    padding-right: 3rem;
    border-right: 1px solid var(--color-border);
}

.register-section {
    padding-left: 3rem;
    scroll-margin-top: calc(var(--header-height) + 1rem);
}

.login-section h2,
.register-section h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    text-align: left;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
}

/* --- LOGIN ONLY SECTION (When registration is disabled) --- */

.login-only-section {
    max-width: 500px;
    margin: 0 auto;
}

.login-only-section h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
    color: var(--color-text);
}

/* --- FORM FIELDS --- */

.login-form,
.register-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-form .form-field,
.register-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-form .form-field label,
.register-form .form-field label {
    font-weight: 500;
    color: var(--color-text);
    font-size: 0.95rem;
}

.login-form .form-field input[type="text"],
.login-form .form-field input[type="email"],
.login-form .form-field input[type="password"],
.register-form .form-field input[type="text"],
.register-form .form-field input[type="email"],
.register-form .form-field input[type="password"] {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form .form-field input:focus,
.register-form .form-field input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 69, 0.1);
}

/* --- LOGIN META (Remember me + Lost password) --- */

.login-meta-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.login-meta-flex .form-field-checkbox {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-meta-flex .form-field-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.login-meta-flex .form-field-checkbox label {
    margin: 0;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--color-text);
}

.lost-password-link {
    font-size: 0.9rem;
    text-decoration: underline;
    color: var(--color-primary);
    transition: color 0.2s ease;
}

.lost-password-link:hover {
    color: var(--color-primary-dark);
}

/* --- REGISTER INFO (Privacy policy text) --- */

.register-info {
    font-size: 0.9rem;
    color: var(--color-grey);
    line-height: 1.6;
    margin: 1rem 0 1.5rem 0;
}

.register-info a {
    text-decoration: underline;
    font-weight: 500;
    color: var(--color-primary);
}

.register-info a:hover {
    color: var(--color-primary-dark);
}

/* --- FORM BUTTONS --- */

.login-form .btn,
.register-form .btn {
    margin-top: 0.5rem;
}

/* --- PASSWORD RESET PAGES --- */

.password-reset-container {
    max-width: 500px;
    margin: 0 auto;
}

.password-reset-form-wrapper {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2.5rem;
}

.password-reset-intro {
    font-size: 0.95rem;
    color: var(--color-grey);
    line-height: 1.6;
    margin-bottom: 2rem;
    text-align: center;
}

.password-reset-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.password-reset-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.password-reset-form .form-field label {
    font-weight: 500;
    color: var(--color-text);
    font-size: 0.95rem;
}

.password-reset-form .form-field input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.password-reset-form .form-field input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 69, 0.1);
}

.password-reset-form .form-actions {
    margin-top: 1rem;
}

.password-reset-links {
    margin-top: 2rem;
    text-align: center;
}

.back-to-login {
    font-size: 0.95rem;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-to-login:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* --- WOOCOMMERCE MESSAGES --- */

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    border-radius: 4px;
    border-left: 4px solid;
}

.woocommerce-message {
    background-color: #ecfdf5;
    border-left-color: #10b981;
    color: #065f46;
}

.woocommerce-error {
    background-color: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.woocommerce-info {
    background-color: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e40af;
}

/* --- MOBILE RESPONSIVENESS --- */

@media (max-width: 1024px) {
    .login-register-container {
        max-width: 100%;
        padding: 0 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .login-register-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .login-section {
        border-right: none;
        padding-right: 0;
        margin-bottom: 3rem;
        padding-bottom: 3rem;
        border-bottom: 1px solid var(--color-border);
    }

    .register-section {
        padding-left: 0;
        margin-top: 0;
    }

    .password-reset-form-wrapper {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        margin-bottom: 2rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .login-section h2,
    .register-section h2,
    .login-only-section h2 {
        font-size: 1.5rem;
    }

    .login-meta-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .login-form .btn,
    .register-form .btn,
    .password-reset-form .btn {
        width: 100%;
    }
}

/* --- REQUIRED FIELD ASTERISK --- */

.required {
    color: #ef4444;
    font-weight: 600;
}
