/*
 * Funcția de retragere (OUG 18/2026).
 *
 * Scoped under .arcane-wd so the storefront theme is never touched. Typography
 * is inherited from the theme; everything structural (scale, rhythm, borders,
 * states) is defined here so the page reads the same on any template.
 */

.arcane-wd {
	--wd-ink: #0f1218;
	--wd-ink-2: #434a55;
	--wd-ink-3: #646c78;
	--wd-line: #dde1e7;
	--wd-line-soft: #eef0f3;
	--wd-surface: #ffffff;
	--wd-raised: #f7f8fa;
	--wd-accent: #8c6b2e;
	--wd-brand: #1b3a5b;
	--wd-error: #b91c1c;

	--wd-r: 4px;
	--wd-r-lg: 8px;

	--wd-ease: cubic-bezier(0.2, 0, 0, 1);

	max-width: 760px;
	margin: 0 auto;
	padding: 0 0 64px;
	color: var(--wd-ink);
	font-size: 16px;
	line-height: 1.6;
	text-align: left;
}

.arcane-wd *,
.arcane-wd *::before,
.arcane-wd *::after {
	box-sizing: border-box;
}

.arcane-wd p {
	margin: 0 0 16px;
	color: var(--wd-ink-2);
}

.arcane-wd a {
	color: var(--wd-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 120ms var(--wd-ease);
}

.arcane-wd a:hover {
	color: var(--wd-brand);
}

.arcane-wd a:focus-visible,
.arcane-wd button:focus-visible,
.arcane-wd input:focus-visible,
.arcane-wd textarea:focus-visible {
	outline: 2px solid var(--wd-brand);
	outline-offset: 2px;
}

/* ---------- masthead ---------- */

.arcane-wd__masthead {
	padding: 8px 0 32px;
	border-bottom: 1px solid var(--wd-line);
	margin-bottom: 40px;
}

.arcane-wd__eyebrow {
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wd-ink-3);
}

.arcane-wd__eyebrow sup {
	font-size: 0.7em;
}

.arcane-wd__title {
	margin: 0 0 12px;
	font-size: 36px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.018em;
	color: var(--wd-ink);
}

.arcane-wd__lead {
	margin: 0 0 28px;
	font-size: 18px;
	line-height: 1.55;
	color: var(--wd-ink-2);
	max-width: 62ch;
}

.arcane-wd__steps {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.arcane-wd__step {
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--wd-ink-3);
}

.arcane-wd__step-num {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	color: var(--wd-line);
}

.arcane-wd__step.is-done .arcane-wd__step-num,
.arcane-wd__step.is-active .arcane-wd__step-num {
	color: var(--wd-accent);
}

.arcane-wd__step.is-active {
	color: var(--wd-ink);
	font-weight: 600;
}

/* ---------- sections ---------- */

.arcane-wd__section {
	margin: 0 0 48px;
}

.arcane-wd__section-title {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0 0 16px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.012em;
	color: var(--wd-ink);
}

.arcane-wd__section-num {
	font-size: 14px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--wd-accent);
}

.arcane-wd__hint {
	margin: 0 0 20px;
	font-size: 14px;
	color: var(--wd-ink-3);
}

.arcane-wd__hint--inline {
	margin: 0;
	max-width: 44ch;
}

/* ---------- hairline grid ---------- */

.arcane-wd__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1px;
	background: var(--wd-line);
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-r-lg);
	overflow: hidden;
	margin: 0 0 24px;
}

.arcane-wd__grid-cell {
	background: var(--wd-surface);
	padding: 16px 20px;
}

.arcane-wd__grid--meta {
	grid-template-columns: repeat(2, 1fr);
}

.arcane-wd__label {
	display: block;
	margin-bottom: 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wd-ink-3);
}

.arcane-wd__value {
	display: block;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--wd-ink);
	font-variant-numeric: tabular-nums;
}

.arcane-wd__value--mono {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 15px;
	letter-spacing: -0.01em;
}

.arcane-wd__value-note {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: var(--wd-ink-3);
}

/* ---------- order picker ---------- */

.arcane-wd__order {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	transition: background-color 120ms var(--wd-ease);
}

.arcane-wd__order:hover {
	background: var(--wd-raised);
}

.arcane-wd__order-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.arcane-wd__order-number {
	font-size: 16px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--wd-ink);
}

.arcane-wd__order-date,
.arcane-wd__order-deadline {
	font-size: 13px;
	color: var(--wd-ink-3);
}

/* ---------- form ---------- */

.arcane-wd__form {
	margin: 0;
}

.arcane-wd__field {
	margin: 0 0 24px;
	max-width: 34rem;
}

.arcane-wd__field label,
.arcane-wd__fieldset legend {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--wd-ink);
}

.arcane-wd__optional {
	font-weight: 400;
	color: var(--wd-ink-3);
}

.arcane-wd__field input[type="text"],
.arcane-wd__field input[type="email"],
.arcane-wd__field textarea {
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	font: inherit;
	font-size: 16px;
	color: var(--wd-ink);
	background: var(--wd-surface);
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-r);
	transition: border-color 120ms var(--wd-ease);
}

.arcane-wd__field textarea {
	min-height: 96px;
	line-height: 1.6;
	resize: vertical;
}

.arcane-wd__field input:hover,
.arcane-wd__field textarea:hover {
	border-color: #c2c8d1;
}

.arcane-wd__field.has-error input,
.arcane-wd__field.has-error textarea {
	border-color: var(--wd-error);
}

.arcane-wd__field-hint {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--wd-ink-3);
}

.arcane-wd__error {
	margin: 6px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--wd-error);
}

.arcane-wd__fieldset {
	margin: 0 0 24px;
	padding: 0;
	border: 0;
}

.arcane-wd__fieldset legend {
	padding: 0;
}

/* ---------- items ---------- */

.arcane-wd__items {
	margin: 0;
	padding: 0;
	list-style: none;
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-r-lg);
	overflow: hidden;
}

.arcane-wd__item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	padding: 14px 20px;
	background: var(--wd-surface);
	border-bottom: 1px solid var(--wd-line-soft);
}

.arcane-wd__item:last-child {
	border-bottom: 0;
}

.arcane-wd__check {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1 1 60%;
	min-height: 24px;
	margin: 0;
	font-weight: 400;
	cursor: pointer;
}

.arcane-wd__check input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--wd-brand);
	flex: 0 0 auto;
}

.arcane-wd__item-name {
	font-size: 15px;
	line-height: 1.45;
	color: var(--wd-ink);
}

.arcane-wd__item-total {
	font-size: 14px;
	font-variant-numeric: tabular-nums;
	color: var(--wd-ink-2);
	margin-left: auto;
}

.arcane-wd__qty {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 13px;
	font-weight: 500;
	color: var(--wd-ink-3);
}

.arcane-wd__qty input {
	width: 72px;
	min-height: 40px;
	padding: 8px 10px;
	font: inherit;
	font-variant-numeric: tabular-nums;
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-r);
	background: var(--wd-surface);
	color: var(--wd-ink);
}

/* ---------- statement ---------- */

.arcane-wd__statement {
	margin: 0 0 28px;
	padding: 20px 24px;
	background: var(--wd-raised);
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-r-lg);
	font-size: 16px;
	line-height: 1.6;
	color: var(--wd-ink);
	quotes: none;
}

.arcane-wd__pre {
	margin: 0;
	padding: 20px 24px;
	background: var(--wd-raised);
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-r-lg);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	line-height: 1.7;
	color: var(--wd-ink);
	white-space: pre-wrap;
	word-break: break-word;
	overflow-x: auto;
}

/* ---------- actions ---------- */

.arcane-wd__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 24px;
	margin-top: 8px;
}

.arcane-wd__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 28px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: var(--wd-r);
	cursor: pointer;
	transition: background-color 120ms var(--wd-ease), border-color 120ms var(--wd-ease), color 120ms var(--wd-ease);
}

.arcane-wd__btn--primary {
	background: var(--wd-ink);
	color: #ffffff;
}

.arcane-wd__btn--primary:hover {
	background: #2a2f38;
	color: #ffffff;
}

.arcane-wd__btn--confirm {
	background: var(--wd-brand);
	color: #ffffff;
	min-height: 52px;
	padding: 14px 36px;
	font-size: 16px;
	letter-spacing: 0.005em;
}

.arcane-wd__btn--confirm:hover {
	background: #14304c;
	color: #ffffff;
}

.arcane-wd__btn--secondary {
	background: transparent;
	color: var(--wd-ink);
	border-color: var(--wd-line);
}

.arcane-wd__btn--secondary:hover {
	background: var(--wd-raised);
	border-color: #c2c8d1;
	color: var(--wd-ink);
}

.arcane-wd__btn[disabled],
.arcane-wd__btn[aria-busy="true"] {
	opacity: 0.6;
	cursor: progress;
}

.arcane-wd__actions--confirm {
	align-items: flex-start;
	padding-top: 8px;
	border-top: 1px solid var(--wd-line);
	margin-top: 24px;
	padding-top: 24px;
}

/* ---------- notices ---------- */

.arcane-wd__alert {
	margin: 0 0 32px;
	padding: 16px 20px;
	background: #fdf3f3;
	border: 1px solid #f0cccc;
	border-radius: var(--wd-r-lg);
}

.arcane-wd__alert p {
	margin: 0 0 8px;
	color: #8a1b1b;
	font-size: 15px;
}

.arcane-wd__alert p:last-child {
	margin-bottom: 0;
}

.arcane-wd__notice {
	margin: 0 0 24px;
	padding: 14px 18px;
	background: var(--wd-raised);
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-r);
	font-size: 14px;
	color: var(--wd-ink-2);
}

.arcane-wd__fallback {
	margin: 24px 0 0;
	font-size: 14px;
	color: var(--wd-ink-3);
}

.arcane-wd__fallback.is-highlighted {
	padding: 14px 18px;
	background: var(--wd-raised);
	border: 1px solid var(--wd-line);
	border-radius: var(--wd-r);
	color: var(--wd-ink-2);
}

.arcane-wd__back {
	margin: 0 0 40px;
	font-size: 14px;
}

.arcane-wd__address {
	font-size: 15px;
	color: var(--wd-ink);
}

/* ---------- legal footnote ---------- */

.arcane-wd__legal {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--wd-line);
}

.arcane-wd__legal p {
	font-size: 13px;
	line-height: 1.65;
	color: var(--wd-ink-3);
	max-width: 68ch;
}

.arcane-wd__legal-links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
}

/* ---------- entry points ---------- */

.arcane-wd-entry--button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

/*
 * Informațiile standard, inserate într-o pagină de politici. Textul curge cu
 * restul paginii, dar linkul către funcția de retragere trebuie să rămână
 * vizibil, nu îngropat într-un bloc de text.
 */
.arcane-wd--info {
	max-width: none;
	padding: 20px 0 8px;
	border-top: 1px solid var(--wd-line);
}

/* Inserat într-o pagină existentă, blocul curge ca restul paginii: aceeași
   lățime, aceeași culoare de text. Nu trebuie să arate ca un corp străin. */
.arcane-wd--info p {
	max-width: none;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

.arcane-wd--info .arcane-wd-entry {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin-top: 8px;
	padding: 12px 28px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	color: #ffffff;
	background: var(--wd-brand);
	border-radius: var(--wd-r);
	text-decoration: none;
	transition: background-color 120ms var(--wd-ease);
}

.arcane-wd--info .arcane-wd-entry:hover {
	background: #14304c;
	color: #ffffff;
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
	.arcane-wd__title {
		font-size: 28px;
	}

	.arcane-wd__lead {
		font-size: 16px;
	}

	.arcane-wd__grid--meta {
		grid-template-columns: 1fr;
	}

	.arcane-wd__item-total {
		margin-left: 32px;
	}

	.arcane-wd__btn {
		width: 100%;
	}

	.arcane-wd__order .arcane-wd__btn {
		width: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.arcane-wd * {
		transition: none !important;
	}
}

@media print {
	.arcane-wd__steps,
	.arcane-wd__actions,
	.arcane-wd__back {
		display: none;
	}

	.arcane-wd {
		max-width: none;
	}
}

/* Titlul modulului se retrage când tema afișează deja același titlu. */
.arcane-wd__title[hidden] {
	display: none;
}
