/* ==========================================================================
   Kidoclassic Mall, custom /order-confirmation page
   --------------------------------------------------------------------------
   The last touchpoint in the purchase journey, and a brand moment, not a
   receipt on a blank page. A centred, celebratory column: a magenta success
   mark with a soft pulsing halo, a warm Playfair headline, then a clean receipt
   card, three simple "what happens next" steps, and a warm handoff back to the
   store. No upsell.

   Self-contained: the design tokens below are copied from the theme's
   global.css :root so this module never imports the theme file yet every colour
   and font matches the store exactly. Everything is scoped under .kc-oc so
   nothing here can bleed onto another page.

   Mobile first: base rules are the phone layout (a single centred column); the
   media queries near the bottom widen the rhythm on tablet and desktop.
   ========================================================================== */

.kc-oc {
	/* Brand palette (from global.css :root) */
	--kido-magenta: #C4186C;
	--kido-magenta-deep: #A8125B;
	--kido-magenta-deeper: #7E1450;
	--kido-magenta-wash: #FBE2EE;
	--kido-magenta-tint: #FDF1F6;

	--kido-pink: #FF6EB4;
	--kido-pink-soft: #FFE6F1;

	--kido-crimson: #8B0038;
	--kido-crimson-soft: #F7DAE4;

	--kido-ink: #2B1A20;
	--kido-ink-2: #5A464E;
	--kido-muted: #8C7B83;
	--kido-border: #F0E2E9;
	--kido-border-strong: #E2CFD8;
	--kido-blush: #F7DCE8;

	--kido-green: #1F7A4D;
	--kido-green-soft: #E3F3EA;

	--kido-bg: #FDF8FA;
	--kido-surface: #FFFFFF;
	--kido-surface-2: #F8EEF3;

	--kido-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
	--kido-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

	--kido-r-xs: 6px;
	--kido-r-sm: 10px;
	--kido-r-md: 16px;
	--kido-r-lg: 24px;
	--kido-r-pill: 999px;

	--kido-shadow-xs: 0 1px 2px rgba(43, 26, 32, 0.06);
	--kido-shadow-sm: 0 2px 10px rgba(43, 26, 32, 0.08);
	--kido-shadow-md: 0 10px 28px rgba(43, 26, 32, 0.10);

	--kido-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--kido-t-fast: 0.16s var(--kido-ease);
	--kido-t: 0.26s var(--kido-ease);

	--kido-gutter: 18px;

	background: var(--kido-surface);
	padding-bottom: 88px;
}

/* Test mode notice: full-width amber bar, matched to the checkout page. */
.kc-oc__testbar {
	background: #FEF3C7;
	color: #92400E;
	border-bottom: 2px solid #F59E0B;
	padding: 14px 24px;
	text-align: center;
	font-family: var(--kido-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
}

.kc-oc__shell {
	max-width: 640px;
	margin: 0 auto;
	padding: 32px var(--kido-gutter) 0;
}
.kc-oc__shell--narrow {
	max-width: 34rem;
}

/* ==========================================================================
   Celebration
   ========================================================================== */

.kc-oc__hero {
	text-align: center;
	margin-bottom: 30px;
}

/* Success mark: a magenta disc with a white check, wrapped in a soft halo that
   pulses gently outward. The halo is a separate layer so it can animate without
   touching the disc. */
.kc-oc__mark {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 96px;
	margin-bottom: 22px;
}
.kc-oc__mark-halo {
	position: absolute;
	inset: 0;
	border-radius: var(--kido-r-pill);
	background: var(--kido-magenta-wash);
	transform: scale(0.9);
	animation: kc-oc-pulse 2.4s var(--kido-ease) infinite;
}
.kc-oc__mark-disc {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 76px;
	height: 76px;
	border-radius: var(--kido-r-pill);
	background: linear-gradient(150deg, var(--kido-magenta) 0%, var(--kido-magenta-deeper) 100%);
	color: #fff;
	box-shadow: 0 10px 24px rgba(196, 24, 108, 0.32);
	animation: kc-oc-pop 0.5s var(--kido-ease) both;
}

@keyframes kc-oc-pulse {
	0% { transform: scale(0.9); opacity: 0.7; }
	70% { transform: scale(1.35); opacity: 0; }
	100% { transform: scale(1.35); opacity: 0; }
}
@keyframes kc-oc-pop {
	0% { transform: scale(0.6); opacity: 0; }
	60% { transform: scale(1.08); }
	100% { transform: scale(1); opacity: 1; }
}

.kc-oc__headline {
	font-family: var(--kido-display);
	font-weight: 700;
	font-size: clamp(28px, 6vw, 40px);
	line-height: 1.1;
	margin: 0 0 12px;
	color: var(--kido-ink);
}
.kc-oc__subtext {
	color: var(--kido-ink-2);
	font-size: 15px;
	line-height: 1.65;
	margin: 0 auto;
	max-width: 40ch;
}
.kc-oc__subtext strong { color: var(--kido-ink); font-weight: 600; }
.kc-oc__email { color: var(--kido-magenta-deeper); font-weight: 600; }

/* ==========================================================================
   Order details card
   ========================================================================== */

.kc-oc__card {
	background: var(--kido-surface);
	border: 1px solid var(--kido-border);
	border-radius: var(--kido-r-md);
	box-shadow: var(--kido-shadow-sm);
	padding: 22px 20px;
}

.kc-oc__card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}
.kc-oc__meta {
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.kc-oc__meta--right { text-align: right; }
.kc-oc__meta-label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--kido-muted);
}
.kc-oc__meta-value {
	font-size: 15px;
	font-weight: 600;
	color: var(--kido-ink);
}

/* Dividers ---------------------------------------------------------------- */

.kc-oc__divider {
	height: 1px;
	background: var(--kido-border);
	margin: 18px 0;
}
.kc-oc__divider--strong { background: var(--kido-border-strong); }

/* Items ------------------------------------------------------------------- */

.kc-oc__items {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.kc-oc__item {
	display: grid;
	grid-template-columns: 56px 1fr auto;
	gap: 14px;
	align-items: center;
}
.kc-oc__item-media {
	position: relative;
	width: 56px;
	height: 56px;
	border-radius: var(--kido-r-sm);
	overflow: hidden;
	background: var(--kido-surface-2);
}
.kc-oc__item-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.kc-oc__item-qty {
	position: absolute;
	top: -8px;
	right: -8px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--kido-r-pill);
	background: var(--kido-magenta);
	color: #fff;
	font-family: var(--kido-body);
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	box-shadow: var(--kido-shadow-xs);
}
.kc-oc__item-info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.kc-oc__item-name {
	font-size: 14px;
	line-height: 1.35;
	color: var(--kido-ink);
	font-weight: 500;
}
.kc-oc__item-meta {
	font-size: 12px;
	color: var(--kido-muted);
	line-height: 1.4;
}
.kc-oc__item-meta p { margin: 0; }
.kc-oc__item-line {
	font-size: 12.5px;
	color: var(--kido-muted);
}
.kc-oc__item-total {
	font-size: 14px;
	font-weight: 600;
	color: var(--kido-ink);
	white-space: nowrap;
}

/* Totals rows ------------------------------------------------------------- */

.kc-oc__rows {
	display: flex;
	flex-direction: column;
	gap: 11px;
}
.kc-oc__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	font-size: 14.5px;
}
.kc-oc__row-key { color: var(--kido-ink-2); }
.kc-oc__row-val { color: var(--kido-ink); font-weight: 500; text-align: right; }
.kc-oc__free { color: var(--kido-magenta-deeper); font-weight: 600; }
.kc-oc__row--discount .kc-oc__row-key { color: var(--kido-magenta-deeper); font-weight: 500; }
.kc-oc__row-val--discount { color: var(--kido-magenta); }

.kc-oc__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
}
.kc-oc__total-key {
	font-family: var(--kido-display);
	font-weight: 500;
	font-size: 18px;
	color: var(--kido-ink);
}
.kc-oc__total-val {
	font-family: var(--kido-display);
	font-weight: 700;
	font-size: 26px;
	line-height: 1.1;
	color: var(--kido-ink);
}

/* Delivery address -------------------------------------------------------- */

.kc-oc__ship {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.kc-oc__ship-label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--kido-muted);
}
.kc-oc__ship-address {
	font-style: normal;
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--kido-ink);
}

/* ==========================================================================
   What happens next
   ========================================================================== */

.kc-oc__next {
	margin-top: 34px;
}
.kc-oc__next-label {
	font-family: var(--kido-body);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--kido-muted);
	text-align: center;
	margin: 0 0 20px;
}
.kc-oc__steps {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 24rem;
	margin-inline: auto;
}
.kc-oc__step {
	display: flex;
	align-items: center;
	gap: 14px;
}
.kc-oc__step-num {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: var(--kido-r-pill);
	background: var(--kido-magenta);
	color: #fff;
	font-family: var(--kido-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
}
.kc-oc__step-text {
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--kido-ink);
}

/* ==========================================================================
   Keep exploring: warm handoff
   ========================================================================== */

.kc-oc__keep {
	margin-top: 36px;
	padding-top: 28px;
	border-top: 1px solid var(--kido-border);
	text-align: center;
}
.kc-oc__keep-cta {
	padding-left: 30px;
	padding-right: 30px;
}
.kc-oc__keep-social {
	margin: 18px 0 0;
	font-size: 14px;
	color: var(--kido-muted);
}
.kc-oc__keep-social a {
	color: var(--kido-magenta-deeper);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.kc-oc__keep-social a:hover { color: var(--kido-magenta); }
.kc-oc__keep-orders {
	margin: 10px 0 0;
	font-size: 14px;
}
.kc-oc__keep-orders a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--kido-magenta);
	font-weight: 600;
}
.kc-oc__keep-arrow { transition: transform var(--kido-t-fast); }
.kc-oc__keep-orders a:hover .kc-oc__keep-arrow { transform: translateX(3px); }

/* ==========================================================================
   Error state
   ========================================================================== */

.kc-oc__error {
	text-align: center;
	padding: 56px 0 72px;
}
.kc-oc__error-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: var(--kido-r-pill);
	background: var(--kido-crimson-soft);
	color: var(--kido-crimson);
	margin-bottom: 22px;
}
.kc-oc__error-title {
	font-family: var(--kido-display);
	font-weight: 700;
	font-size: clamp(22px, 4.4vw, 28px);
	margin: 0 0 10px;
	color: var(--kido-ink);
}
.kc-oc__error-text {
	color: var(--kido-muted);
	font-size: 15px;
	line-height: 1.65;
	margin: 0 auto 26px;
	max-width: 38ch;
}
.kc-oc__error-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
}

/* ==========================================================================
   Tablet and up
   ========================================================================== */

@media (min-width: 600px) {
	.kc-oc__card { padding: 28px 30px; }

	/* Steps read as a row on wider screens, evenly spaced. */
	.kc-oc__steps {
		flex-direction: row;
		max-width: none;
		gap: 20px;
	}
	.kc-oc__step {
		flex: 1;
		flex-direction: column;
		text-align: center;
		gap: 12px;
	}
	.kc-oc__step-text { max-width: 22ch; }
}

@media (min-width: 720px) {
	.kc-oc { --kido-gutter: 24px; }
	.kc-oc__shell { padding-top: 48px; }
	.kc-oc__hero { margin-bottom: 36px; }
}
