/**
 * Afoomart - Customer Authentication & Account Access Styles
 * Chapter 12 - Login, Registration & Password Management
 *
 * @package Afoomart
 */

/* ==========================================================================
   1. AUTH PAGE LAYOUT & CONTAINER
   ========================================================================== */

.af-auth-page-wrapper {
	padding: 48px 0 64px;
	background-color: var(--af-bg-secondary, #f8fafc);
	min-height: calc(100vh - 200px);
	display: flex;
	align-items: center;
}

.af-auth-card-layout {
	display: grid;
	grid-template-columns: 440px 1fr;
	background: #ffffff;
	border-radius: var(--af-radius-lg, 16px);
	box-shadow: 0 10px 30px -5px rgba(11, 21, 40, 0.08), 0 4px 12px -2px rgba(11, 21, 40, 0.03);
	border: 1px solid var(--af-border-color, #e2e8f0);
	overflow: hidden;
	max-width: 1040px;
	margin: 0 auto;
}

/* ==========================================================================
   2. LEFT PANEL: BRANDING & BUYER ASSURANCE
   ========================================================================== */

.af-auth-branding-panel {
	background: linear-gradient(155deg, #0b1528 0%, #11203d 50%, #0d2822 100%);
	color: #ffffff;
	padding: 44px 36px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	position: relative;
	overflow: hidden;
}

.af-auth-branding-panel::before {
	content: '';
	position: absolute;
	top: -60px;
	right: -60px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(0, 135, 90, 0.25) 0%, rgba(0, 135, 90, 0) 70%);
	pointer-events: none;
}

.af-branding-panel-inner {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.af-branding-logo-wrap {
	margin-bottom: 28px;
}

.af-auth-brand-link {
	display: inline-block;
	text-decoration: none;
	margin-bottom: 12px;
}

.af-auth-logo-text {
	font-size: 26px;
	font-weight: 800;
	color: #ffffff;
	letter-spacing: -0.5px;
}

.af-auth-logo-text .af-logo-accent {
	color: var(--af-primary-color, #00875a);
}

.af-auth-badge {
	display: inline-block;
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #cbd5e1;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	padding: 4px 10px;
	border-radius: 20px;
}

.af-branding-headline {
	margin-bottom: 32px;
}

.af-branding-title {
	font-size: 24px;
	font-weight: 700;
	color: #ffffff;
	line-height: 1.3;
	margin: 0 0 10px;
}

.af-branding-subtitle {
	font-size: 14px;
	color: #94a3b8;
	line-height: 1.6;
	margin: 0;
}

.af-branding-features-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-bottom: 36px;
}

.af-branding-feature-item {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.af-feature-icon-box {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: rgba(0, 135, 90, 0.2);
	color: #10b981;
	border: 1px solid rgba(16, 185, 129, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.af-feature-text strong {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #f8fafc;
	margin-bottom: 3px;
}

.af-feature-text p {
	font-size: 12px;
	color: #94a3b8;
	line-height: 1.5;
	margin: 0;
}

.af-branding-footer-note {
	margin-top: auto;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: #94a3b8;
}

.af-branding-footer-note svg {
	color: #10b981;
	flex-shrink: 0;
}

/* ==========================================================================
   3. RIGHT PANEL: TABS & FORMS
   ========================================================================== */

.af-auth-forms-panel {
	padding: 44px 48px;
	background: #ffffff;
}

.af-forms-panel-inner {
	max-width: 440px;
	margin: 0 auto;
}

/* Auth Navigation Tabs */
.af-auth-tabs-nav {
	display: flex;
	background: var(--af-bg-secondary, #f1f5f9);
	border-radius: 10px;
	padding: 5px;
	margin-bottom: 32px;
	gap: 4px;
}

.af-auth-tab-btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 600;
	color: var(--af-text-muted, #64748b);
	background: transparent;
	border: none;
	border-radius: 7px;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.af-auth-tab-btn:hover {
	color: var(--af-text-main, #0f172a);
}

.af-auth-tab-btn.is-active {
	background: #ffffff;
	color: var(--af-text-main, #0f172a);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.af-auth-tab-btn.is-active svg {
	color: var(--af-primary-color, #00875a);
}

/* Tab Panes */
.af-auth-tab-pane {
	display: none;
	animation: afAuthFadeIn 0.25s ease-out;
}

.af-auth-tab-pane.is-active {
	display: block;
}

@keyframes afAuthFadeIn {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.af-pane-header {
	margin-bottom: 24px;
}

.af-pane-title {
	font-size: 22px;
	font-weight: 700;
	color: var(--af-text-main, #0f172a);
	margin: 0 0 6px;
	letter-spacing: -0.3px;
}

.af-pane-desc {
	font-size: 13px;
	color: var(--af-text-muted, #64748b);
	margin: 0;
	line-height: 1.5;
}

/* ==========================================================================
   4. FORM GROUPS & INPUT STYLING
   ========================================================================== */

.af-auth-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.af-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.af-form-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--af-text-main, #0f172a);
}

.af-label-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.af-lost-password-link {
	font-size: 12px;
	font-weight: 600;
	color: var(--af-primary-color, #00875a);
	text-decoration: none;
	transition: color 0.15s;
}

.af-lost-password-link:hover {
	color: var(--af-primary-hover, #006b47);
	text-decoration: underline;
}

.af-input-icon-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.af-field-icon {
	position: absolute;
	left: 14px;
	color: #94a3b8;
	pointer-events: none;
	transition: color 0.15s;
}

.af-form-input {
	width: 100%;
	height: 46px;
	padding: 10px 14px 10px 42px;
	font-size: 14px;
	color: var(--af-text-main, #0f172a);
	background: #ffffff;
	border: 1px solid var(--af-border-color, #cbd5e1);
	border-radius: var(--af-radius-md, 8px);
	transition: all 0.2s ease;
	outline: none;
	box-sizing: border-box;
}

.af-form-input:focus {
	border-color: var(--af-primary-color, #00875a);
	box-shadow: 0 0 0 3px rgba(0, 135, 90, 0.15);
}

.af-form-input:focus + .af-field-icon,
.af-input-icon-wrap:focus-within .af-field-icon {
	color: var(--af-primary-color, #00875a);
}

/* Password Input & Show/Hide Eye Toggle */
.af-password-wrap .af-password-input {
	padding-right: 44px;
}

.af-toggle-password-btn {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	color: #94a3b8;
	cursor: pointer;
	border-radius: 6px;
	transition: all 0.15s;
}

.af-toggle-password-btn:hover {
	color: var(--af-text-main, #0f172a);
	background: #f1f5f9;
}

/* Remember Me Checkbox */
.af-form-options-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.af-checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 13px;
	color: var(--af-text-muted, #475569);
	user-select: none;
}

.af-checkbox-label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--af-primary-color, #00875a);
	cursor: pointer;
	margin: 0;
}

/* Password Strength Bar */
.af-password-strength-container {
	margin-top: 8px;
}

.af-strength-bar-track {
	height: 4px;
	background: #e2e8f0;
	border-radius: 2px;
	overflow: hidden;
}

.af-strength-bar-fill {
	height: 100%;
	width: 0%;
	transition: width 0.3s ease, background-color 0.3s ease;
}

.af-strength-bar-fill.strength-1 {
	width: 25%;
	background-color: #ef4444; /* Weak */
}

.af-strength-bar-fill.strength-2 {
	width: 50%;
	background-color: #f59e0b; /* Fair */
}

.af-strength-bar-fill.strength-3 {
	width: 75%;
	background-color: #0284c7; /* Good */
}

.af-strength-bar-fill.strength-4 {
	width: 100%;
	background-color: #10b981; /* Strong */
}

.af-strength-label-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 4px;
	font-size: 11px;
}

.af-strength-text {
	font-weight: 600;
	color: #64748b;
}

.af-strength-hint {
	color: #94a3b8;
}

/* Privacy Policy Snippet */
.af-privacy-policy-text {
	font-size: 12px;
	color: #64748b;
	line-height: 1.5;
	margin-top: 4px;
}

.af-privacy-policy-text a {
	color: var(--af-primary-color, #00875a);
	text-decoration: underline;
}

/* Submit Button & Arrow */
.af-auth-submit-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 48px;
	font-size: 15px;
	font-weight: 700;
	border-radius: var(--af-radius-md, 8px);
	cursor: pointer;
	transition: all 0.2s;
}

.af-auth-submit-btn .af-btn-arrow {
	transition: transform 0.2s ease;
}

.af-auth-submit-btn:hover .af-btn-arrow {
	transform: translateX(4px);
}

/* Quick Switch Prompt */
.af-switch-prompt-box {
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid var(--af-border-color, #e2e8f0);
	text-align: center;
	font-size: 13px;
	color: var(--af-text-muted, #64748b);
}

.af-switch-prompt-box p {
	margin: 0;
}

.af-link-button {
	background: transparent;
	border: none;
	color: var(--af-primary-color, #00875a);
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	padding: 0;
	font-size: inherit;
	font-family: inherit;
}

.af-link-button:hover {
	color: var(--af-primary-hover, #006b47);
}

/* ==========================================================================
   5. LOST PASSWORD & CONFIRMATION CARDS
   ========================================================================== */

.af-lost-password-wrapper {
	padding: 60px 0 80px;
}

.af-lost-password-card {
	max-width: 480px;
	margin: 0 auto;
	background: #ffffff;
	border-radius: var(--af-radius-lg, 16px);
	padding: 40px 36px;
	box-shadow: 0 10px 30px -5px rgba(11, 21, 40, 0.08);
	border: 1px solid var(--af-border-color, #e2e8f0);
}

.af-lost-password-header {
	text-align: center;
	margin-bottom: 28px;
}

.af-lost-pw-icon-box {
	width: 56px;
	height: 56px;
	border-radius: 16px;
	background: rgba(0, 135, 90, 0.1);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 16px;
}

.af-lost-password-title {
	font-size: 22px;
	font-weight: 700;
	color: var(--af-text-main, #0f172a);
	margin: 0 0 8px;
}

.af-lost-password-desc {
	font-size: 13px;
	color: var(--af-text-muted, #64748b);
	line-height: 1.6;
	margin: 0;
}

.af-back-to-login-row .af-return-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--af-text-muted, #64748b);
	text-decoration: none;
	transition: color 0.15s;
}

.af-back-to-login-row .af-return-link:hover {
	color: var(--af-primary-color, #00875a);
}

.af-email-hint-box {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 12px;
	color: #166534;
	line-height: 1.5;
	text-align: left;
}

.af-text-green {
	color: #10b981;
}

/* ==========================================================================
   6. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 960px) {
	.af-auth-card-layout {
		grid-template-columns: 1fr;
		max-width: 540px;
	}

	.af-auth-branding-panel {
		padding: 32px 28px;
	}

	.af-branding-features-list {
		display: grid;
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.af-auth-forms-panel {
		padding: 36px 28px;
	}
}

@media (max-width: 480px) {
	.af-auth-page-wrapper {
		padding: 20px 0 40px;
	}

	.af-auth-card-layout {
		border-radius: 12px;
		border-left: none;
		border-right: none;
	}

	.af-auth-forms-panel {
		padding: 28px 20px;
	}

	.af-auth-branding-panel {
		padding: 24px 20px;
	}

	.af-lost-password-card {
		padding: 30px 20px;
	}
}
