/* Dhaka Property account pages. Loaded after the theme's main.css, whose fonts and colour
 * tokens it uses. Phone first: a fixed header, content scrolling beneath it, a bottom tab
 * bar. From 1024px the tabs become a sidebar. Light and dark follow the system. */

.acct-body {
	--a-bg: var(--c-bg, #f9f9f8);
	--a-surface: var(--c-surface, #fff);
	--a-text: var(--c-text, #2d3748);
	--a-heading: var(--c-heading, #12423f);
	--a-muted: var(--c-muted, #6c737f);
	--a-line: var(--c-line, rgb(18 66 63 / 0.12));
	--a-tint: var(--c-tint, #edf4f2);
	--a-primary: var(--c-primary, #2e6b5f);
	--a-primary-dark: var(--c-primary-dark, #044544);
	--a-error: var(--c-error-text, #c81e1e);
	--a-bar-h: 3.75rem;
	--a-tab-h: 4rem;
	background: var(--a-bg);
	color: var(--a-text);
	min-height: 100dvh;
	margin: 0;
}

@media (prefers-color-scheme: dark) {
	.acct-body {
		--a-bg: #0f1716;
		--a-surface: #17211f;
		--a-text: #dfe7e5;
		--a-heading: #e9f2f0;
		--a-muted: #9aa8a5;
		--a-line: rgb(220 235 232 / 0.14);
		--a-tint: #1e2b28;
		--a-primary: #7cc3b6;
		--a-primary-dark: #a1cfca;
		--a-error: #ff9b9b;
		color-scheme: dark;
	}
	.acct-body .brand,
	.acct-body .brand__name b { color: var(--a-heading); }
	.acct-body .brand__name,
	.acct-body .brand__tagline { color: var(--a-muted); }
}

.acct-body h1,
.acct-body h2 { color: var(--a-heading); text-wrap: balance; }

/* ---------- Buttons ---------- */
.acct-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 48px;
	padding: 0 1.25rem;
	border-radius: var(--r-pill, 999px);
	border: 1px solid var(--a-line);
	background: var(--a-surface);
	color: var(--a-text);
	font: 600 1rem / 1 var(--font, system-ui, sans-serif);
	text-decoration: none;
	cursor: pointer;
	transition: transform var(--dur, 220ms) var(--ease, ease), box-shadow var(--dur, 220ms) var(--ease, ease);
}
.acct-btn:hover { box-shadow: var(--sh-1, 0 1px 4px rgb(0 0 0 / 0.1)); }
.acct-btn:active { transform: scale(0.98); }
.acct-btn:focus-visible { outline: 3px solid var(--a-primary); outline-offset: 2px; }
.acct-btn[disabled] { opacity: 0.6; cursor: progress; }
/* The button that was tapped keeps full strength and swaps its icon for a spinner. */
.acct-btn.is-busy { opacity: 1; }
.acct-btn.is-busy > svg { display: none; }
.acct-btn.is-busy::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: acct-spin 0.7s linear infinite;
}
@keyframes acct-spin { to { transform: rotate(360deg); } }
.acct-btn--google { width: 100%; }
.acct-btn--apple { width: 100%; background: #000; color: #fff; border-color: #000; }
@media (prefers-color-scheme: dark) {
	.acct-btn--apple { background: #fff; color: #000; border-color: #fff; }
}
.acct-btn--quiet { background: transparent; }

/* ---------- Sign-in sheet ---------- */
.acct-signin {
	min-height: 100dvh;
	display: grid;
	place-items: center;
	padding-block: max(1.5rem, env(safe-area-inset-top, 0px)) max(1.5rem, env(safe-area-inset-bottom, 0px));
	padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
	background:
		radial-gradient(120% 60% at 50% 0%, var(--a-tint) 0%, transparent 70%),
		var(--a-bg);
}
.acct-sheet {
	width: 100%;
	max-width: 26.5rem;
	display: grid;
	gap: 1rem;
	padding: clamp(1.25rem, 4vw, 2rem);
	border-radius: var(--r-lg, 28px);
	background: var(--a-surface);
	border: 1px solid var(--a-line);
	box-shadow: var(--sh-2, 0 18px 40px -12px rgb(0 0 0 / 0.25));
}
.acct-sheet[aria-busy="true"] { cursor: progress; }
.acct-sheet__brand .brand { text-decoration: none; }
.acct-sheet__title { margin: 0.25rem 0 0; font-size: clamp(1.5rem, 1.25rem + 1.2vw, 1.875rem); line-height: 1.2; }
.acct-sheet__lead { margin: 0; color: var(--a-muted); }
.acct-sheet__buttons { display: grid; gap: 0.75rem; margin-top: 0.25rem; }
.acct-sheet__status { margin: 0; font-size: var(--fs-sm, 0.875rem); color: var(--a-muted); }
.acct-sheet__status.is-error { color: var(--a-error); }
.acct-sheet__status:empty { margin-top: -1rem; }
.acct-sheet__hint,
.acct-sheet__foot { margin: 0; font-size: var(--fs-sm, 0.875rem); color: var(--a-muted); }
.acct-sheet__foot a { color: inherit; }

.acct-new {
	margin: 0;
	padding: 0.75rem 0 0;
	border: 0;
	border-top: 1px solid var(--a-line);
	display: grid;
	gap: 0.5rem;
}
.acct-new legend { padding: 0.75rem 0 0.25rem; font-weight: 600; color: var(--a-heading); }
.acct-choice {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 44px;
	padding: 0.5rem 0.875rem;
	border-radius: var(--r-md, 16px);
	border: 1px solid var(--a-line);
	cursor: pointer;
}
.acct-choice:has(input:checked) { border-color: var(--a-primary); background: var(--a-tint); }
.acct-choice input { width: 1.125rem; height: 1.125rem; accent-color: var(--a-primary); }
.acct-choice:has(input:disabled) { opacity: 0.6; cursor: progress; }
.acct-new__note { margin: 0.25rem 0 0; font-size: var(--fs-xs, 0.8125rem); color: var(--a-muted); }

.acct-alert {
	margin: 0;
	padding: 0.75rem 1rem;
	border-radius: var(--r-md, 16px);
	background: var(--a-tint);
	color: var(--a-heading);
	font-size: var(--fs-sm, 0.875rem);
}
.acct-alert--error { color: var(--a-error); }

/* ---------- Signed-in shell ---------- */
.acct-bar {
	position: fixed;
	inset: 0 0 auto;
	z-index: 10;
	padding-top: env(safe-area-inset-top, 0px);
	background: color-mix(in srgb, var(--a-surface) 92%, transparent);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--a-line);
}
.acct-bar__inner {
	height: var(--a-bar-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
}
.acct-bar .brand__tagline { display: none; }
.acct-bar__title { font-weight: 600; color: var(--a-muted); }

.acct-shell {
	padding-top: calc(var(--a-bar-h) + env(safe-area-inset-top, 0px));
	padding-bottom: calc(var(--a-tab-h) + env(safe-area-inset-bottom, 0px));
}

.acct-nav {
	position: fixed;
	inset: auto 0 0;
	z-index: 10;
	padding-bottom: env(safe-area-inset-bottom, 0px);
	background: var(--a-surface);
	border-top: 1px solid var(--a-line);
}
.acct-nav ul { display: flex; margin: 0; padding: 0; list-style: none; height: var(--a-tab-h); }
.acct-nav li { flex: 1; }
.acct-nav a {
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.2rem;
	color: var(--a-muted);
	font-size: var(--fs-xs, 0.8125rem);
	font-weight: 600;
	text-decoration: none;
}
.acct-nav a[aria-current="page"] { color: var(--a-primary-dark); }
.acct-nav a:focus-visible { outline: 3px solid var(--a-primary); outline-offset: -3px; }

.acct-main {
	display: grid;
	gap: 1rem;
	max-width: 44rem;
	margin: 0 auto;
	padding-block: 1.25rem 2rem;
	padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
}
.acct-hello { padding: 0.5rem 0 0.25rem; }
.acct-hello__role {
	display: inline-block;
	margin: 0 0 0.5rem;
	padding: 0.2rem 0.7rem;
	border-radius: var(--r-pill, 999px);
	background: var(--a-tint);
	color: var(--a-primary-dark);
	font-size: var(--fs-xs, 0.8125rem);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.acct-hello__title { margin: 0; font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); line-height: 1.1; }

.acct-card {
	display: block;
	padding: 1.25rem;
	border-radius: var(--r-md, 16px);
	background: var(--a-surface);
	border: 1px solid var(--a-line);
	color: inherit;
}
.acct-card h2 { margin: 0 0 0.5rem; font-size: var(--fs-h3, 1.25rem); line-height: 1.25; }
.acct-card p { margin: 0 0 0.75rem; }
.acct-card p:last-child { margin-bottom: 0; }
.acct-card--lead { background: var(--a-tint); border-color: transparent; }
.acct-card--link { text-decoration: none; transition: box-shadow var(--dur, 220ms) var(--ease, ease); }
.acct-card--link:hover { box-shadow: var(--sh-1, 0 1px 4px rgb(0 0 0 / 0.1)); }
.acct-card--link:focus-visible { outline: 3px solid var(--a-primary); outline-offset: 2px; }
.acct-card__note { font-size: var(--fs-sm, 0.875rem); color: var(--a-muted); }

.acct-stores { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.acct-store {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 1rem;
	border-radius: var(--r-pill, 999px);
	background: var(--a-primary-dark);
	color: var(--a-surface);
	font-weight: 600;
	font-size: var(--fs-sm, 0.875rem);
	text-decoration: none;
}

.acct-facts { margin: 0 0 1rem; display: grid; gap: 0.75rem; }
.acct-facts div { display: grid; gap: 0.1rem; }
.acct-facts dt { font-size: var(--fs-xs, 0.8125rem); color: var(--a-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.acct-facts dd { margin: 0; overflow-wrap: anywhere; }

/* A text-styled button (Cookie settings opens the theme's consent banner). */
.acct-link { padding: 0; border: 0; background: none; color: var(--a-primary); font: inherit; text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; }
.acct-link:focus-visible { outline: 3px solid var(--a-primary); outline-offset: 2px; border-radius: 2px; }
/* The theme's consent banner sits above the phone tab bar. */
.acct-body .consent { z-index: 90; }

@media (min-width: 1024px) {
	.acct-shell {
		display: grid;
		grid-template-columns: 15rem minmax(0, 1fr);
		padding-bottom: 0;
	}
	.acct-nav {
		position: sticky;
		top: calc(var(--a-bar-h) + env(safe-area-inset-top, 0px));
		align-self: start;
		height: calc(100dvh - var(--a-bar-h));
		border-top: 0;
		border-right: 1px solid var(--a-line);
		background: transparent;
	}
	.acct-nav ul { flex-direction: column; height: auto; padding: 1rem 0.75rem; gap: 0.25rem; }
	.acct-nav a {
		flex-direction: row;
		justify-content: flex-start;
		gap: 0.75rem;
		padding: 0.75rem 1rem;
		border-radius: var(--r-sm, 8px);
		font-size: var(--fs-sm, 0.875rem);
	}
	.acct-nav a[aria-current="page"] { background: var(--a-tint); }
	.acct-main { padding-block: 2rem 3rem; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.acct-btn,
	.acct-card--link { transition: none; }
	.acct-btn.is-busy::before { animation-duration: 2.4s; }
}
