/**
 * Sign-in / register shortcode pages + cart auth modal (Hat Bar canvas).
 */

.hb-auth-page-wrap {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 32px 16px 48px;
	box-sizing: border-box;
}

.hb-auth-wrap {
	max-width: 440px;
	width: 100%;
	margin: auto 0;
	padding: 0;
	box-sizing: border-box;
}

.hb-auth-card {
	background: var(--hatbar-white, #fff);
	border: 1px solid var(--hatbar-sand3, #d8ccb4);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 12px 40px rgba(28, 23, 18, 0.08);
}

.hb-auth-header {
	background: var(--hatbar-ink, #1c1712);
	padding: 28px 32px;
	text-align: center;
}

.hb-auth-header h1 {
	font-family: var(--hatbar-serif, Georgia, serif);
	font-size: 1.35rem;
	font-weight: 500;
	color: var(--hatbar-white, #fff);
	letter-spacing: -0.02em;
	margin: 0 0 6px;
}

.hb-auth-header p {
	font-family: var(--hatbar-sans, system-ui, sans-serif);
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.55);
	margin: 0;
}

.hb-auth-body {
	padding: 28px 32px 32px;
	font-family: var(--hatbar-sans, system-ui, sans-serif);
}

.hb-auth-tabs {
	display: flex;
	border-bottom: 1px solid var(--hatbar-sand3, #d8ccb4);
	margin: -28px -32px 24px;
}

.hb-auth-tab {
	flex: 1;
	padding: 14px;
	text-align: center;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	border: none;
	border-radius: 0;
	background: transparent;
	color: var(--hatbar-ink3, #6b5f4e);
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	transition: color 0.15s, border-color 0.15s;
	font-family: var(--hatbar-sans, system-ui, sans-serif);
}

.hb-auth-tab.active {
	color: var(--hatbar-copper, #b8763a);
	border-bottom-color: var(--hatbar-copper, #b8763a);
}

.hb-auth-fields {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.hb-auth-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.hb-auth-field label {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--hatbar-ink2, #3d3529);
}

.hb-auth-field input {
	padding: 11px 14px;
	border: 1.5px solid var(--hatbar-sand3, #d8ccb4);
	border-radius: 10px;
	font-size: 0.9rem;
	font-family: var(--hatbar-sans, system-ui, sans-serif);
	color: var(--hatbar-ink, #1c1712);
	background: var(--hatbar-sand, #f5f0e8);
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
	width: 100%;
	box-sizing: border-box;
}

.hb-auth-field input:focus {
	border-color: var(--hatbar-copper, #b8763a);
	box-shadow: 0 0 0 3px rgba(184, 118, 58, 0.12);
}

.hb-auth-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

@media (max-width: 400px) {
	.hb-auth-field-row {
		grid-template-columns: 1fr;
	}
}

.hb-auth-submit {
	width: 100%;
	padding: 13px;
	background: var(--hatbar-ink, #1c1712);
	color: var(--hatbar-white, #fff);
	border: none;
	border-radius: 10px;
	font-family: var(--hatbar-sans, system-ui, sans-serif);
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
	margin-top: 6px;
	transition: background 0.15s;
}

.hb-auth-submit:hover {
	background: var(--hatbar-ink2, #3d3529);
}

.hb-auth-submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.hb-auth-error {
	background: #fdecea;
	border: 1px solid #f5c4c0;
	color: #7b2a22;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 0.82rem;
	display: none;
	box-sizing: border-box;
}

.hb-auth-error.visible {
	display: block;
}

.hb-auth-switch {
	text-align: center;
	font-size: 0.8rem;
	color: var(--hatbar-ink3, #6b5f4e);
	margin-top: 20px;
}

.hb-auth-switch a {
	color: var(--hatbar-copper-dim, #8a5628);
	font-weight: 600;
	text-decoration: none;
}

.hb-auth-switch a:hover {
	text-decoration: underline;
}

/* Cart checkout auth modal */
#hb-auth-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 10060;
	background: rgba(28, 23, 18, 0.55);
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

#hb-auth-modal-overlay.open {
	display: flex;
}

#hb-auth-modal {
	background: var(--hatbar-white, #fff);
	border-radius: 14px;
	width: 100%;
	max-width: 420px;
	overflow: hidden;
	box-shadow: 0 24px 64px rgba(28, 23, 18, 0.2);
}

#hb-auth-modal .hb-auth-header {
	border-radius: 0;
}

.hb-auth-modal-close {
	display: block;
	width: calc(100% - 0px);
	margin-top: 4px;
	padding: 12px;
	background: transparent;
	border: none;
	font-family: var(--hatbar-sans, system-ui, sans-serif);
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--hatbar-copper-dim, #8a5628);
	cursor: pointer;
	text-align: center;
}

.hb-auth-modal-close:hover {
	text-decoration: underline;
}
