/* =============================================================
   Auth Modal — Login / Register, Minimal style
   ============================================================= */

.hb-auth-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.hb-auth-modal.is-open {
	display: flex;
}

/* ── View switching ─────────────────────────────────── */
.hb-auth-view {
	display: none;
	animation: hbAuthFade 0.2s ease;
}

.hb-auth-modal[data-view="login"] .hb-auth-view[data-auth-view="login"],
.hb-auth-modal[data-view="register"] .hb-auth-view[data-auth-view="register"] {
	display: block;
}

.hb-auth-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	animation: hbAuthFade 0.2s ease;
}

.hb-auth-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 420px;
	background: #ffffff;
	border-radius: 6px;
	padding: 40px 36px 32px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
	animation: hbAuthSlideUp 0.25s ease;
	box-sizing: border-box;
}

@keyframes hbAuthFade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

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

/* Close button */
.hb-auth-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	border: 0;
	background: transparent;
	color: #1d1d1f;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: background-color 0.15s ease;
}

.hb-auth-modal-close:hover {
	background: #f2f2f2;
}

/* Title */
.hb-auth-title {
	margin: 0 0 6px;
	font-size: 22px;
	font-weight: 500;
	color: #1d1d1f;
	letter-spacing: 0.2px;
	text-align: center;
}

.hb-auth-subtitle {
	margin: 0 0 22px;
	font-size: 13px;
	color: #6b6b6b;
	text-align: center;
}

/* Form */
.hb-auth-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.hb-auth-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.hb-auth-field label {
	font-size: 12px;
	color: #6b6b6b;
	letter-spacing: 0.2px;
}

.hb-auth-field input {
	height: 42px;
	padding: 0 14px;
	border: 1px solid #d4d4d4;
	border-radius: 3px;
	font-size: 14px;
	color: #1d1d1f;
	background: #ffffff;
	box-sizing: border-box;
	font-family: inherit;
	transition: border-color 0.15s ease;
}

.hb-auth-field input:focus {
	outline: none;
	border-color: #1d1d1f;
}

/* Remember + forgot row */
.hb-auth-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
	margin-top: 2px;
}

.hb-auth-remember {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	color: #1d1d1f;
}

.hb-auth-remember input {
	width: 14px;
	height: 14px;
	margin: 0;
	accent-color: #1d1d1f;
}

.hb-auth-forgot {
	color: #1d1d1f;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: opacity 0.15s ease;
}

.hb-auth-forgot:hover {
	opacity: 0.7;
	color: #1d1d1f;
}

/* Message (error / success) */
.hb-auth-message {
	min-height: 0;
	padding: 0;
	font-size: 13px;
	color: #c0392b;
	text-align: center;
	transition: all 0.2s ease;
}

.hb-auth-message.is-error {
	padding: 8px 12px;
	background: #fef2f0;
	border: 1px solid #f5c6c2;
	border-radius: 3px;
	color: #c0392b;
}

.hb-auth-message.is-success {
	padding: 8px 12px;
	background: #f1f8f4;
	border: 1px solid #c9e4d3;
	border-radius: 3px;
	color: #2d7a46;
}

/* Submit button */
.hb-auth-submit {
	position: relative;
	height: 48px;
	margin-top: 8px;
	background: #1d1d1f;
	color: #ffffff;
	border: 1px solid #1d1d1f;
	border-radius: 3px;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.4px;
	cursor: pointer;
	transition: opacity 0.15s ease;
	font-family: inherit;
}

.hb-auth-submit:hover {
	opacity: 0.85;
}

.hb-auth-submit:disabled {
	cursor: not-allowed;
	opacity: 0.65;
}

.hb-auth-submit-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	margin-left: 8px;
	vertical-align: middle;
	animation: hbAuthSpin 0.7s linear infinite;
}

.hb-auth-submit.is-loading .hb-auth-submit-text {
	opacity: 0.6;
}

.hb-auth-submit.is-loading .hb-auth-submit-spinner {
	display: inline-block;
}

@keyframes hbAuthSpin {
	to { transform: rotate(360deg); }
}

/* Footer */
.hb-auth-foot {
	margin: 22px 0 0;
	font-size: 13px;
	text-align: center;
	color: #6b6b6b;
}

.hb-auth-foot a {
	color: #1d1d1f;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hb-auth-foot a:hover {
	opacity: 0.75;
	color: #1d1d1f;
}

/* Body lock when modal open */
body.hb-auth-locked {
	overflow: hidden;
}

/* Responsive */
@media (max-width: 480px) {
	.hb-auth-modal-dialog {
		padding: 36px 22px 26px;
		max-width: 100%;
	}
	.hb-auth-title {
		font-size: 20px;
	}
}
