/**
 * Auth Pages CSS - Simple Clean Layout
 * Makes auth pages look like the old simple layout without breaking the new system
 */

/* Style header for auth pages to match glassmorphism effect */
/* Removed duplicate header styling - using unified header instead */

/* Navigation container styling to match public header */
body.user-type-auth .header .nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
  height: var(--nav-height);
}

/* Simplify main content layout */
body.user-type-auth .main-content {
    background: linear-gradient(135deg, var(--background-color) 0%, var(--background-secondary) 100%);
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

/* Dark theme support for main content */
[data-theme="dark"] body.user-type-auth .main-content {
    background: linear-gradient(135deg, var(--background-color) 0%, var(--background-secondary) 100%);
}

/* Animated background for auth pages */
body.user-type-auth .animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

body.user-type-auth .container {
    max-width: var(--container-max-width, 1200px);
    width: 100%;
    background: transparent;
}

/* Auth Section */
.login-section,
.register-section,
.forgot-password-section,
.reset-password-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 2rem 2rem 2rem;
    background: transparent;
}

.login-container,
.register-container,
.forgot-password-container,
.reset-password-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: transparent;
}

.login-card,
.register-card,
.forgot-password-card,
.reset-password-card {
    background: var(--glass-background);
    backdrop-filter: var(--glass-backdrop-filter);
    -webkit-backdrop-filter: var(--glass-backdrop-filter);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    box-shadow: 0 20px 40px var(--shadow-color);
}

/* Auth Header */
.login-header,
.register-header,
.forgot-password-header,
.reset-password-header {
    text-align: center;
    margin-bottom: 2.5rem;
    background: transparent;
}

.login-header h1,
.register-header h1,
.forgot-password-header h1,
.reset-password-header h1 {
    font-family: var(--font-headings);
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-header p,
.register-header p,
.forgot-password-header p,
.reset-password-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin: 0;
}

/* Form Styling */
.login-form,
.register-form,
.forgot-password-form,
.reset-password-form {
    margin-bottom: 1.5rem;
    background: transparent;
}

.form-group {
    margin-bottom: 1.25rem;
    background: transparent;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--glass-background);
    color: var(--text-color);
    transition: all 0.2s ease;
    box-sizing: border-box;
    backdrop-filter: var(--glass-backdrop-filter);
    -webkit-backdrop-filter: var(--glass-backdrop-filter);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 139, 34, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Checkbox styling */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
}

.form-check-input {
    width: auto;
    margin: 0;
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

/* Button styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    background: var(--glass-background);
    color: var(--text-color);
    backdrop-filter: var(--glass-backdrop-filter);
    -webkit-backdrop-filter: var(--glass-backdrop-filter);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 139, 34, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Links */
.login-links,
.register-links,
.forgot-password-links,
.reset-password-links {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: transparent;
}

.login-links a,
.register-links a,
.forgot-password-links a,
.reset-password-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.login-links a:hover,
.register-links a:hover,
.forgot-password-links a:hover,
.reset-password-links a:hover {
    text-decoration: underline;
}

.login-links span,
.register-links span {
    color: var(--text-light);
    font-size: 0.875rem;
    background: transparent;
}

/* Simplify footer for auth pages */
body.user-type-auth .footer {
    background: var(--glass-background);
    border-top: 1px solid var(--glass-border);
    padding: 1rem 0;
    text-align: center;
    backdrop-filter: var(--glass-backdrop-filter);
    -webkit-backdrop-filter: var(--glass-backdrop-filter);
}

body.user-type-auth .footer-content {
    max-width: 100%;
}

body.user-type-auth .footer-links,
body.user-type-auth .footer-social {
    display: none;
}

body.user-type-auth .footer-copyright {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Flash messages styling */
.flash-message {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-backdrop-filter);
    -webkit-backdrop-filter: var(--glass-backdrop-filter);
}

.flash-message.success {
    background: rgba(34, 139, 34, 0.1);
    color: var(--primary-dark);
    border: 1px solid rgba(34, 139, 34, 0.2);
}

.flash-message.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.flash-message.info {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
    border: 1px solid rgba(23, 162, 184, 0.2);
}

.flash-message a {
    color: var(--primary-color);
    text-decoration: underline;
}

.flash-message a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Dark theme support for flash message links */
[data-theme="dark"] .flash-message a {
    color: var(--primary-color);
}

[data-theme="dark"] .flash-message a:hover {
    color: var(--primary-dark);
}

/* Responsive design */
@media (max-width: 768px) {
    body.user-type-auth .main-content {
        padding: 1rem;
    }
    
    .login-card,
    .register-card,
    .forgot-password-card,
    .reset-password-card {
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .login-header h1,
    .register-header h1,
    .forgot-password-header h1,
    .reset-password-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    body.user-type-auth .main-content {
        padding: 1rem;
    }
    
    .login-card,
    .register-card,
    .forgot-password-card,
    .reset-password-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .login-header h1,
    .register-header h1,
    .forgot-password-header h1,
    .reset-password-header h1 {
        font-size: 1.5rem;
    }
}

/* Dark theme support for responsive design */
@media (max-width: 768px) {
    [data-theme="dark"] body.user-type-auth .main-content {
        background: linear-gradient(135deg, var(--background-color) 0%, var(--background-secondary) 100%);
    }
    
    [data-theme="dark"] .login-card,
    [data-theme="dark"] .register-card,
    [data-theme="dark"] .forgot-password-card,
    [data-theme="dark"] .reset-password-card {
        background: var(--glass-background);
        border-color: var(--glass-border);
    }
}

@media (max-width: 480px) {
    [data-theme="dark"] body.user-type-auth .main-content {
        background: linear-gradient(135deg, var(--background-color) 0%, var(--background-secondary) 100%);
    }
    
    [data-theme="dark"] .login-card,
    [data-theme="dark"] .register-card,
    [data-theme="dark"] .forgot-password-card,
    [data-theme="dark"] .reset-password-card {
        background: var(--glass-background);
        border-color: var(--glass-border);
    }
}

/* Dark theme support */
[data-theme="dark"] body.user-type-auth .login-card,
[data-theme="dark"] body.user-type-auth .register-card,
[data-theme="dark"] body.user-type-auth .forgot-password-card,
[data-theme="dark"] body.user-type-auth .reset-password-card {
    background: var(--glass-background);
    border-color: var(--glass-border);
}

/* Card styling */
.login-card,
.register-card,
.forgot-password-card,
.reset-password-card {
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px var(--shadow-color);
    backdrop-filter: var(--glass-backdrop-filter);
    -webkit-backdrop-filter: var(--glass-backdrop-filter);
}

/* Dark theme support for cards */
[data-theme="dark"] .login-card,
[data-theme="dark"] .register-card,
[data-theme="dark"] .forgot-password-card,
[data-theme="dark"] .reset-password-card {
    background: var(--glass-background);
    border-color: var(--glass-border);
}

[data-theme="dark"] body.user-type-auth .form-control {
    background: var(--glass-background);
    border-color: var(--glass-border);
    color: var(--text-color);
}

[data-theme="dark"] body.user-type-auth .btn {
    background: var(--glass-background);
    border-color: var(--glass-border);
    color: var(--text-color);
}

[data-theme="dark"] body.user-type-auth .flash-message {
    background: var(--glass-background);
    border-color: var(--glass-border);
    color: var(--text-color);
}

[data-theme="dark"] body.user-type-auth .footer {
    background: var(--glass-background);
    border-color: var(--glass-border);
    color: var(--text-color);
}

/* Password Strength Meter */
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 1.2rem;
}

.strength-meter {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: var(--glass-border);
    border-radius: 2px;
    transition: all 0.3s ease;
    width: 0%;
}

.strength-bar.very-weak {
    background: #dc3545;
    width: 20%;
}

.strength-bar.weak {
    background: #fd7e14;
    width: 40%;
}

.strength-bar.fair {
    background: #ffc107;
    width: 60%;
}

.strength-bar.good {
    background: #28a745;
    width: 80%;
}

.strength-bar.strong {
    background: #228b22;
    width: 100%;
}

.strength-label {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: var(--text-muted);
}

/* Password Requirements */
.password-requirements {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.requirement-item:last-child {
    margin-bottom: 0;
}

.requirement-item::before {
    content: '✗';
    color: #dc3545;
    font-weight: bold;
}

.requirement-item.valid::before {
    content: '✓';
    color: #228b22;
}

.requirement-item.invalid {
    color: var(--text-muted);
}

.requirement-item.valid {
    color: var(--text-color);
}

/* Password Match Message */
.password-match-message {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.password-match-message.match {
    color: #228b22;
}

.password-match-message.mismatch {
    color: #dc3545;
}

/* Form Validation Messages */
.form-validation-messages {
    margin-bottom: 1rem;
}

.validation-errors {
    list-style: none;
    padding: 0;
    margin: 0;
}

.validation-errors li {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 4px;
    color: #dc3545;
    font-size: 0.875rem;
}

/* Disabled Button State */
.btn-primary.disabled,
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
