/* Authentication Forms - Specific Styles Only */
/* Note: This file only contains auth-specific styles. All base styles, CSS variables, */
/* typography, and form controls come from common.css */

/* Auth Page Layout */
body.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: transparent !important;
    border-radius: var(--radius-md);
    box-shadow: none !important;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

[data-theme="light"] .auth-card {
    border: 1px solid rgba(0, 0, 0, 0.2) !important; /* More visible border for light theme */
}

.auth-card:hover {
    border-color: var(--accent-green);
    background: rgba(0, 212, 170, 0.05) !important;
}

[data-theme="dark"] .auth-card:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo {
    margin-bottom: 0.75rem;
}

.auth-logo img {
    max-width: 100px;
    height: auto;
}

.auth-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-links a {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: color 0.3s ease;
    font-size: var(--font-size-sm);
}

.auth-links a:hover {
    color: var(--accent-green);
    opacity: 0.8;
}

.auth-links p {
    font-size: var(--font-size-sm);
    margin-bottom: 0.5rem;
}

.auth-footer-links {
    border-top: 1px solid var(--border-color);
    text-align: center;
    padding-top: 1rem;
    margin-top: 1.5rem;
}

.auth-footer-links small {
    font-size: var(--font-size-xs);
}

.auth-footer-links a {
    color: var(--accent-green);
    text-decoration: none;
    font-size: var(--font-size-xs);
}

.auth-footer-links a:hover {
    color: var(--accent-green);
    opacity: 0.8;
}

.divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider-text {
    position: relative;
    background: transparent;
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: transparent !important;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none !important;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--accent-green);
    background: rgba(0, 212, 170, 0.05) !important;
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.theme-toggle i {
    color: var(--text-primary);
    font-size: var(--font-size-lg);
}

/* Form check label styling for auth pages */
.auth-card .form-check-label {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Override form controls for auth pages - use consistent sizing */
.auth-card .form-control {
    font-size: var(--font-size-base);
    padding: 0.625rem 0.875rem;
    margin-bottom: 0;
    background: transparent !important;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

[data-theme="light"] .auth-card .form-control {
    border: 1px solid rgba(0, 0, 0, 0.3) !important; /* More visible border for light theme */
}

[data-theme="dark"] .auth-card .form-control {
    border: 1px solid var(--border-color) !important;
}

.auth-card .form-control:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
    outline: none;
    background: transparent !important;
}

.auth-card .form-label {
    font-size: var(--font-size-sm);
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-medium);
}

/* Button sizing for auth pages */
.auth-card .btn {
    font-size: var(--font-size-base);
    padding: 0.625rem 1.25rem;
    margin-bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.auth-card .btn-primary,
.auth-card .btn-outline-secondary {
    width: 100%;
}

/* Button styling - outline secondary */
.auth-card .btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-primary);
    background: transparent !important;
}

[data-theme="light"] .auth-card .btn-outline-secondary {
    border-color: var(--accent-green);
    color: #1e293b; /* Black text for light theme */
}

.auth-card .btn-outline-secondary:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: transparent !important;
}

[data-theme="dark"] .auth-card .btn-outline-secondary:hover {
    color: #ffffff; /* White text for dark theme hover */
    background: rgba(0, 212, 170, 0.1) !important;
}

/* Form group spacing */
.auth-card .form-group {
    margin-bottom: 1rem;
}

/* Ensure icons are properly sized */
.auth-card .form-label i,
.auth-card .btn i,
.auth-card .auth-links a i {
    font-size: var(--font-size-sm);
}

/* Cloudflare Turnstile styling */
.turnstile-container {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    min-height: 65px; /* Minimum height for Turnstile widget */
}

.cf-turnstile {
    display: flex;
    justify-content: center;
}

/* Ensure Turnstile widget is properly sized */
.cf-turnstile iframe {
    max-width: 100%;
    border: none;
}

/* Show loading state while Turnstile loads */
.turnstile-container:empty::before {
    content: 'Loading security verification...';
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 65px;
}

/* Alerts - transparent with borders */
.auth-card .alert {
    background: transparent !important;
    border: 1px solid var(--border-color);
    border-left: 4px solid;
    border-radius: var(--radius-sm);
}

.auth-card .alert-success {
    border-left-color: #28a745;
}

.auth-card .alert-info {
    border-left-color: #0dcaf0;
}

.auth-card .alert-warning {
    border-left-color: #ffc107;
}

.auth-card .alert-danger {
    border-left-color: #dc3545;
}

/* Form check styling */
.auth-card .form-check-input {
    border: 1px solid var(--border-color);
    background: transparent !important;
}

[data-theme="light"] .auth-card .form-check-input {
    border-color: rgba(0, 0, 0, 0.3) !important; /* More visible border for light theme */
}

[data-theme="dark"] .auth-card .form-check-input {
    border-color: var(--border-color) !important;
}

/* Checked state: green background + white checkmark (need !important to override base background shorthand) */
.auth-card .form-check-input:checked {
    background-color: var(--accent-green) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
    border-color: var(--accent-green);
}

.auth-card .form-check-input:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.auth-card .form-check-label {
    color: var(--text-primary);
}

/* Invalid feedback styling */
.auth-card .invalid-feedback {
    color: #dc3545;
    font-size: var(--font-size-sm);
}

.auth-card .form-control.is-invalid {
    border-color: #dc3545;
}

.auth-card .form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Form text (help text) styling */
.auth-card .form-text {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* Invite code applied styling */
.auth-card .form-control.invite-code-applied {
    border-color: var(--accent-green);
    background: rgba(0, 212, 170, 0.05) !important;
}

[data-theme="dark"] .auth-card .form-control.invite-code-applied {
    background: rgba(0, 212, 170, 0.1) !important;
}

.auth-card .form-control.invite-code-applied:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}
