/**
 * The order flow's shared rules (inc/orderflow.php): the pack picker, cart, sign in / sign up, My account, checkout and
 * thank-you pages. Drawn in the 25 Oct 2026 canvas "DigitaVision Order Flow"; the canvas hexes map to the tokens of
 * tokens.css, so every rule here follows light and dark mode with no per-mode copy (except the state tints below).
 *
 * Class prefix: dvo-. A view's own rules go in assets/css/orderflow/<view>.css, loaded after this file.
 * Buttons and chips are the site's own (.dv-btn, .dv-chip in components.css); .dvo-btn--xl is the canvas's tall CTA.
 * Astra styles every bare button/input, so the rules that must win over it are doubled (.dvo-x.dvo-x), as components.css does.
 */

/* State tints (soft backgrounds for ok, error, warning and info rows). Two dark blocks, identical, as in tokens.css. */
:root {
	--dvo-ok-bg: #DFF2E8;
	--dvo-ok-ink: #1F7A55;
	--dvo-err-bg: #FEE2E2;
	--dvo-err-ink: #991B1B;
	--dvo-warn-bg: #FDEBCB;
	--dvo-warn-ink: #8A4B00;
	--dvo-info-bg: #E6EBFF;
	--dvo-info-ink: #1E3A8A;
	--dvo-field-border: #CFC8B8;
}

:root[data-theme="dark"] {
	--dvo-ok-bg: #11291F;
	--dvo-ok-ink: #6FD3A0;
	--dvo-err-bg: #3A1515;
	--dvo-err-ink: #FCA5A5;
	--dvo-warn-bg: #33250A;
	--dvo-warn-ink: #FBBF24;
	--dvo-info-bg: #1B2347;
	--dvo-info-ink: #A9B8FF;
	--dvo-field-border: #3A3D46;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--dvo-ok-bg: #11291F;
		--dvo-ok-ink: #6FD3A0;
		--dvo-err-bg: #3A1515;
		--dvo-err-ink: #FCA5A5;
		--dvo-warn-bg: #33250A;
		--dvo-warn-ink: #FBBF24;
		--dvo-info-bg: #1B2347;
		--dvo-info-ink: #A9B8FF;
		--dvo-field-border: #3A3D46;
	}
}

/* Page frame ---------------------------------------------------------------- */

body.dvo {
	/* Geist Mono has no taka sign: the site's taka-only Noto Sans Bengali (fonts.css) comes second, so "≈ ৳1,200" never shows a box. */
	--dv-font-mono: "Geist Mono", "Noto Sans Bengali", ui-monospace, Menlo, monospace;
	background: var(--dv-bg-canvas);
	color: var(--dv-ink);
	font-family: var(--dv-font-body);
}

/* Astra's page title and breadcrumb: the canvas draws its own h1 on every one of these pages. */
body.dvo .ast-breadcrumbs-wrapper,
body.dvo .ast-archive-description {
	display: none;
}

.dvo-wrap {
	box-sizing: border-box;
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	padding: 28px clamp(16px, 4vw, 32px) 96px;
}

.dvo-wrap--1280 { max-width: 1280px; }
.dvo-wrap--1200 { max-width: 1200px; }
.dvo-wrap--1120 { max-width: 1120px; }

/* Type ---------------------------------------------------------------------- */

.dvo-h1 {
	margin: 0;
	font-family: var(--dv-font-display);
	font-weight: 800;
	font-size: clamp(2.25rem, 1.2rem + 3.6vw, 3.5rem);
	line-height: .95;
	letter-spacing: var(--dv-tracking-display);
	color: var(--dv-ink);
}

.dvo-h1--l {
	font-size: clamp(2.5rem, 1.2rem + 4.4vw, 4rem);
}

/* The serif italic accent of a title: "Sign in <em>to check out.</em>" */
.dvo-h1 em,
.dvo-h2 em {
	font-family: var(--dv-font-serif);
	font-style: italic;
	font-weight: 400;
	letter-spacing: -0.01em;
	color: var(--dv-brand);
}

.dvo-h2 {
	margin: 0;
	font-family: var(--dv-font-display);
	font-weight: 700;
	font-size: 1.375rem;
	line-height: 1.15;
	letter-spacing: -0.015em;
	color: var(--dv-ink);
}

.dvo-lede {
	margin: 14px 0 0;
	max-width: 52ch;
	font-size: 1.0625rem;
	color: var(--dv-ink-2);
}

.dvo-muted { color: var(--dv-ink-3); }
.dvo-small { font-size: .8125rem; }

/* Prices and codes: Geist Mono. */
.dvo-mono {
	font-family: var(--dv-font-mono);
	font-variant-numeric: tabular-nums;
}

.dvo-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Surfaces ------------------------------------------------------------------ */

.dvo-card {
	box-sizing: border-box;
	background: var(--dv-bg-surface);
	border: 1px solid var(--dv-border);
	border-radius: var(--dv-radius-lg);
}

.dvo-card--lg { border-radius: 20px; padding: 24px; }
.dvo-card--lift { box-shadow: var(--dv-shadow-card); }

/* A dark panel: add .dv-console too (components.css) for the token re-pointing; this gives the canvas's radius. */
.dvo-console {
	box-sizing: border-box;
	border-radius: 20px;
	padding: 24px;
}

/* Label and field rows ------------------------------------------------------- */

.dvo-label {
	display: block;
	margin: 0 0 6px;
	font-size: .875rem;
	font-weight: 600;
	color: var(--dv-ink);
}

.dvo-field.dvo-field,
.dvo-form input[type="text"],
.dvo-form input[type="email"],
.dvo-form input[type="password"],
.dvo-form input[type="tel"],
.dvo-form input[type="search"],
.dvo-form select {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 0 14px;
	border: 1px solid var(--dvo-field-border);
	border-radius: 12px;
	background: var(--dv-bg-surface);
	color: var(--dv-ink);
	font: inherit;
	font-size: 1rem;
	box-shadow: none;
}

.dvo-field.dvo-field:focus,
.dvo-form input:focus,
.dvo-form select:focus {
	border-color: var(--dv-ink);
	outline: 2px solid var(--dv-brand);
	outline-offset: 2px;
	box-shadow: none;
}

.dvo-field--error.dvo-field--error { border-color: var(--dv-brand); }

/* The canvas's tall call to action, on a .dv-btn: <a class="dv-btn dv-btn--primary dvo-btn--xl">. */
.dv-btn.dvo-btn--xl {
	--dv-btn-height: 52px;
	width: 100%;
	border-radius: 12px;
	font-size: 1rem;
}

.dv-btn.dvo-btn--auto { width: auto; }

/* Alerts --------------------------------------------------------------------- */

.dvo-alert {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	box-sizing: border-box;
	margin: 0;
	padding: 12px 14px;
	border-radius: 12px;
	font-size: .875rem;
	line-height: 1.45;
	list-style: none;
}

.dvo-alert--error { background: var(--dvo-err-bg); color: var(--dvo-err-ink); }
.dvo-alert--ok { background: var(--dvo-ok-bg); color: var(--dvo-ok-ink); }
.dvo-alert--warn { background: var(--dvo-warn-bg); color: var(--dvo-warn-ink); }
.dvo-alert--info { background: var(--dvo-info-bg); color: var(--dvo-info-ink); }
.dvo-alert a { color: inherit; font-weight: 600; text-decoration: underline; }

/* Category and fee chips ------------------------------------------------------- */

.dvo-tag {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: var(--dv-radius-full);
	background: var(--dv-bg-subtle);
	color: var(--dv-ink-2);
	font-size: .75rem;
	line-height: 1.5;
}

/* "+$3.99": the add-on fee chip. */
.dvo-fee {
	display: inline-block;
	padding: 2px 7px;
	border-radius: 6px;
	background: var(--dv-console);
	color: var(--dv-console-ink);
	font-family: var(--dv-font-mono);
	font-size: .6875rem;
	line-height: 1.5;
}

/* Term / value rows (totals, summaries). */
.dvo-rows {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px 16px;
	margin: 0;
	font-size: .9375rem;
}

.dvo-rows dt { margin: 0; color: var(--dv-ink-2); }
.dvo-rows dd { margin: 0; font-family: var(--dv-font-mono); font-variant-numeric: tabular-nums; text-align: right; }

/* Order steps ------------------------------------------------------------------ */

.dvo-steps {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: .8125rem;
}

.dvo-steps__item {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	padding: 0 12px 0 6px;
	border-radius: var(--dv-radius-full);
	color: var(--dv-ink-3);
}

.dvo-steps__item a {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	color: var(--dv-ink-2);
	text-decoration: none;
}

.dvo-steps__dot {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: var(--dv-radius-full);
	background: var(--dv-bg-subtle);
	font-family: var(--dv-font-mono);
	font-size: .6875rem;
}

.dvo-steps__item--done .dvo-steps__dot { background: var(--dvo-ok-bg); color: var(--dvo-ok-ink); }

.dvo-steps__item--current {
	background: var(--dv-ink);
	color: var(--dv-bg-canvas);
	font-weight: 600;
}

.dvo-steps__item--current .dvo-steps__dot { background: var(--dv-brand); color: var(--dv-on-brand); }

/* In-page row above a title: every step is a bordered pill. */
.dvo-steps--bar .dvo-steps__item { border: 1px solid var(--dv-border); color: var(--dv-ink-2); }
.dvo-steps--bar .dvo-steps__item--current { border-color: var(--dv-ink); color: var(--dv-bg-canvas); }

/* The slim header (sign in, checkout) ------------------------------------------------ */

body.dvo--slim #dv-header.dvo-head { position: static; }

.dvo-head {
	background: var(--dv-bg-surface);
	border-bottom: 1px solid var(--dv-border);
}

.dvo-head__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	box-sizing: border-box;
	max-width: 1440px;
	margin: 0 auto;
	padding: 12px clamp(16px, 4vw, 32px);
}

.dvo-head__logo { display: block; flex: none; }
.dvo-head__logo img { display: block; width: auto; height: 36px; }

/* The two logos: the design shell shows one by theme only inside a .dv wrapper, which this header lacks. */
.dvo-head .dv-logo-dark { display: none; }
:root[data-theme="dark"] .dvo-head .dv-logo-light { display: none; }
:root[data-theme="dark"] .dvo-head .dv-logo-dark { display: block; }

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .dvo-head .dv-logo-light { display: none; }
	:root:not([data-theme="light"]) .dvo-head .dv-logo-dark { display: block; }
}
.dvo-head__row .dvo-steps { margin: 0 auto; }

.dvo-head__chat {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	color: var(--dv-ink-2);
	font-size: .875rem;
	text-decoration: none;
}

.dvo-head__chat:hover { color: var(--dv-brand); }

@media (max-width: 720px) {
	.dvo-head__row .dvo-steps { order: 3; flex: 1 1 100%; justify-content: center; margin: 0; }
	.dvo-head__chat span { display: none; }
	.dvo-head__row { justify-content: space-between; }
}

/* Phone: the four steps stay on one line (the pills tighten) instead of "Pay" dropping to a second row. */
@media (max-width: 480px) {
	.dvo-steps { gap: 2px; flex-wrap: nowrap; }
	.dvo-steps__item { gap: 6px; padding: 0 8px 0 4px; font-size: .75rem; white-space: nowrap; }
	.dvo-steps__item a { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	.dvo *, .dvo *::before, .dvo *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
