/* Auth Modal — glassmorphism overlay */
.auth-overlay {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	padding: 1rem;
}

.auth-modal {
	width: 100%;
	max-width: 420px;
	background: var(--bg-surface);
	border: 1px solid var(--glassmorphism-border);
	border-radius: var(--radius-large);
	box-shadow: var(--shadow-xl);
	padding: 2rem;
	position: relative;
}

.auth-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--bg-secondary);
	color: var(--text-muted);
	cursor: pointer;
	transition: var(--transition-smooth);
	font-size: 0.9rem;
}

.auth-close:hover {
	color: var(--text-primary);
	background: var(--bg-tertiary);
}

.auth-title {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--text-primary);
	margin-bottom: 1.5rem;
	text-align: center;
}

/* OAuth buttons */
.auth-oauth-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}

.auth-oauth-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.65rem 1rem;
	font-size: 0.85rem;
	font-weight: 500;
	border: 1px solid var(--border-light);
	border-radius: var(--radius-medium);
	background: var(--bg-primary);
	color: var(--text-primary);
	cursor: pointer;
	transition: var(--transition-smooth);
}

.auth-oauth-btn:hover {
	border-color: var(--border-medium);
	background: var(--bg-secondary);
	transform: translateY(-1px);
	box-shadow: var(--shadow-sm);
}

.auth-oauth-btn i {
	font-size: 1rem;
}

.auth-oauth-btn.google i { color: #4285F4; }
.auth-oauth-btn.apple i { color: var(--text-primary); }
.auth-oauth-btn.yandex { font-weight: 700; }
.auth-oauth-btn.yandex span.ya-icon {
	font-weight: 800;
	font-size: 1.1rem;
	color: #FC3F1D;
}
.auth-oauth-btn.github i { color: var(--text-primary); }
.auth-oauth-btn.metamask i { color: #F6851B; }

/* Divider */
.auth-divider {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
	color: var(--text-muted);
	font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--border-light);
}

/* Form fields */
.auth-field {
	margin-bottom: 1rem;
}

.auth-input {
	width: 100%;
	padding: 0.75rem 1rem;
	font-size: 0.95rem;
	border: 1px solid var(--border-light);
	border-radius: var(--radius-medium);
	background: var(--bg-primary);
	color: var(--text-primary);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
	border-color: rgba(var(--brand-blue-rgb), 0.4);
	box-shadow: 0 0 0 3px rgba(var(--brand-blue-rgb), 0.08);
}

.auth-input::placeholder {
	color: var(--text-muted);
}

.auth-submit {
	width: 100%;
	margin-top: 0.5rem;
}

.auth-error {
	font-size: 0.8rem;
	color: var(--color-error);
	margin-bottom: 0.75rem;
	text-align: center;
}

/* Bottom links */
.auth-switch {
	text-align: center;
	margin-top: 1.25rem;
	font-size: 0.85rem;
	color: var(--text-muted);
}

.auth-switch-link {
	color: var(--color-primary);
	cursor: pointer;
	font-weight: 500;
	background: none;
	border: none;
	font-size: 0.85rem;
}

.auth-switch-link:hover {
	text-decoration: underline;
}

/* Forgot sent state */
.auth-sent-icon {
	font-size: 2.5rem;
	color: var(--color-success);
	margin-bottom: 1rem;
	text-align: center;
}

.auth-sent-text {
	text-align: center;
	font-size: 0.95rem;
	color: var(--text-secondary);
	line-height: 1.5;
}

/* Dark theme */
:root[data-theme="dark"] .auth-modal {
	background: var(--bg-surface);
	border-color: var(--border-light);
}

:root[data-theme="dark"] .auth-oauth-btn {
	background: var(--bg-secondary);
	border-color: var(--border-medium);
}

:root[data-theme="dark"] .auth-oauth-btn:hover {
	background: var(--bg-tertiary);
}

:root[data-theme="dark"] .auth-input {
	background: var(--bg-secondary);
	border-color: var(--border-medium);
}

/* Responsive */
@media (max-width: 480px) {
	.auth-modal {
		padding: 1.5rem;
	}

	.auth-title {
		font-size: 1.2rem;
	}

	.auth-oauth-grid {
		grid-template-columns: 1fr;
	}
}
