/*
 * Kooker pannkoogikalkulaator.
 *
 * Archivo is self-hosted rather than pulled from Google: the site localises its
 * fonts on purpose (see the local-google-fonts plugin) and runs a consent
 * manager, so a third-party font request would not belong here. It ships as one
 * variable file per subset, so 600-800 costs a single download.
 *
 * Everything is scoped to .kpc. Body text deliberately inherits the theme's
 * font so the block follows the site if its typography ever changes; only the
 * display face (Cormorant, the theme's heading font) is stated outright.
 */

@font-face {
	font-family: "ArchivoKPC";
	font-style: normal;
	font-weight: 600 800;
	font-display: swap;
	src: url("fonts/archivo-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
		U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
		U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "ArchivoKPC";
	font-style: normal;
	font-weight: 600 800;
	font-display: swap;
	src: url("fonts/archivo-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
		U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
		U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.kpc {
	--kpc-paper: #fff;
	--kpc-paper-2: #f9f9f9;
	--kpc-ink: #0a0a0a;
	--kpc-ink-2: #444;
	--kpc-muted: #7e7e7e;
	--kpc-line: #e2e2e2;
	--kpc-line-soft: #f1f1f1;
	--kpc-brass: #bb9230;
	--kpc-brass-text: #8a6a1c;
	--kpc-tan: #c19b77;
	--kpc-panel: #f8f4ea;
	--kpc-panel-line: #e7ddc7;
	--kpc-display: "ArchivoKPC", "Helvetica Neue", Arial, sans-serif;

	color: var(--kpc-ink-2);
	line-height: 1.6;
	font-size: 15px;

	/* Content pages here use the theme's full-width template, which hands the
	   shortcode the whole viewport — so the block sets its own measure. The
	   bottom padding clears the fixed total bar on small screens. */
	max-width: 1080px;
	margin: 0 auto;
	padding: 8px 24px 40px;
}

@media (max-width: 900px) {
	.kpc { padding: 4px 18px 110px; }
}

/* ---------------------------------------------------------------------
 * Defensive reset. The theme styles h2/h3 globally (Cormorant, 35px of
 * margin and a decorative :after bar), which would otherwise land on every
 * field label in here.
 * ------------------------------------------------------------------ */

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

.kpc h2,
.kpc h3 {
	margin: 0;
	padding: 0;
	position: static;
	color: inherit;
	line-height: 1.2;
}

.kpc h2::after,
.kpc h3::after { content: none; display: none; }

.kpc p { margin: 0; }
.kpc ul { margin: 0; padding: 0; list-style: none; }
.kpc button { font: inherit; margin: 0; text-transform: none; letter-spacing: 0; }
.kpc input { font: inherit; margin: 0; }
.kpc a { text-decoration: none; }

.kpc :focus-visible {
	outline: 2px solid var(--kpc-brass-text);
	outline-offset: 2px;
}

.kpc [hidden] { display: none !important; }

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

/* ---------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------ */

.kpc-eyebrow {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--kpc-muted);
	margin: 0 0 14px !important;
}

.kpc-title {
	font-family: var(--kpc-display);
	font-weight: 800;
	font-size: clamp(1.75rem, 3.8vw, 2.4rem);
	line-height: 1.12;
	letter-spacing: -.02em;
	color: var(--kpc-ink);
	margin: 0 0 18px !important;
	position: relative !important;
	padding-bottom: 18px;
}

.kpc-title::after {
	content: "" !important;
	display: block !important;
	position: absolute;
	left: 0;
	bottom: 0;
	width: 30px;
	height: 2px;
	background: var(--kpc-brass);
}

.kpc-lede {
	max-width: 62ch;
	color: var(--kpc-ink-2);
	font-size: 15.5px;
}

.kpc-rule {
	height: 1px;
	background: var(--kpc-line-soft);
	border: 0;
	margin: 34px 0 0;
}

/* ---------------------------------------------------------------------
 * Layout
 * ------------------------------------------------------------------ */

.kpc-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 388px;
	gap: 56px;
	align-items: start;
	margin-top: 34px;
}

@media (max-width: 900px) {
	.kpc-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
}

.kpc-fields { display: flex; flex-direction: column; }

.kpc-field {
	padding: 26px 0;
	border-bottom: 1px solid var(--kpc-line-soft);
}

.kpc-field:first-child { padding-top: 4px; }

.kpc-field-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 14px;
}

.kpc-label {
	font-family: var(--kpc-display);
	font-weight: 700;
	font-size: 16.5px;
	letter-spacing: -.01em;
	color: var(--kpc-ink);
}

.kpc-hint { font-size: 13px; color: var(--kpc-muted); }
.kpc-hint.kpc-below { margin-top: 13px !important; }

.kpc-linkish {
	background: none;
	border: 0;
	padding: 0;
	font-weight: 700;
	color: var(--kpc-brass-text);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------------------------------------------------------------------
 * Controls
 * ------------------------------------------------------------------ */

.kpc-stepper {
	display: flex;
	align-items: center;
	width: fit-content;
	border: 1px solid var(--kpc-ink);
	border-radius: 3px;
	overflow: hidden;
	background: var(--kpc-paper);
}

.kpc-stepper button {
	font-family: var(--kpc-display);
	font-size: 19px;
	font-weight: 600;
	line-height: 1;
	width: 44px;
	height: 46px;
	border: 0;
	background: transparent;
	color: var(--kpc-ink);
	cursor: pointer;
	transition: background .12s ease;
}

.kpc-stepper button:hover { background: var(--kpc-paper-2); }

.kpc-stepper input {
	width: 76px;
	height: 46px;
	border: 0;
	border-left: 1px solid var(--kpc-ink);
	border-right: 1px solid var(--kpc-ink);
	border-radius: 0;
	background: transparent;
	color: var(--kpc-ink);
	font-family: var(--kpc-display);
	font-weight: 700;
	font-size: 21px;
	text-align: center;
	font-variant-numeric: tabular-nums;
	box-shadow: none;
}

.kpc-stepper input:focus { outline: none; background: var(--kpc-paper-2); }
.kpc-stepper input::-webkit-outer-spin-button,
.kpc-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.kpc-stepper input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.kpc-stepper.kpc-sm button { width: 36px; height: 38px; font-size: 17px; }
.kpc-stepper.kpc-sm input { width: 58px; height: 38px; font-size: 17px; }

.kpc-seg { display: flex; flex-wrap: wrap; gap: 8px; }

.kpc-seg button {
	font-size: 14px;
	font-weight: 600;
	padding: 11px 15px;
	border: 1px solid var(--kpc-line);
	border-radius: 3px;
	background: var(--kpc-paper);
	color: var(--kpc-ink-2);
	cursor: pointer;
	text-align: left;
	transition: border-color .12s ease, color .12s ease, background .12s ease;
}

.kpc-seg button .kpc-sub {
	display: block;
	font-weight: 400;
	font-size: 12.5px;
	color: var(--kpc-muted);
	margin-top: 2px;
	font-variant-numeric: tabular-nums;
}

.kpc-seg button:hover { border-color: var(--kpc-tan); }

.kpc-seg button[aria-pressed="true"] {
	background: var(--kpc-ink);
	border-color: var(--kpc-ink);
	color: var(--kpc-paper);
}

.kpc-seg button[aria-pressed="true"] .kpc-sub { color: rgba(255, 255, 255, .72); }

.kpc-seg.kpc-stack { flex-direction: column; }
.kpc-seg.kpc-stack button { width: 100%; }

.kpc-checks { display: flex; flex-direction: column; }

.kpc-check {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 8px 0;
	margin: 0;
	cursor: pointer;
	font-size: 14.5px;
	color: var(--kpc-ink-2);
}

.kpc-check input {
	width: 19px;
	height: 19px;
	accent-color: var(--kpc-brass);
	cursor: pointer;
	flex: none;
}

.kpc-cname { font-weight: 600; color: var(--kpc-ink); }
.kpc-cnote { color: var(--kpc-muted); font-size: 13px; }

.kpc-tweak-grid { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 14px; }
.kpc-tweak-item { display: flex; flex-direction: column; gap: 8px; }

.kpc-tweak-item .kpc-tl {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--kpc-muted);
}

/* ---------------------------------------------------------------------
 * Docket
 * ------------------------------------------------------------------ */

.kpc-docket {
	background: var(--kpc-panel);
	color: var(--kpc-ink-2);
	border: 1px solid var(--kpc-panel-line);
	border-radius: 3px;
	padding: 28px 26px 26px;
	position: sticky;
	top: 24px;
}

@media (max-width: 900px) { .kpc-docket { position: static; } }

.kpc-docket-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 22px;
}

.kpc-eyebrow-sm,
.kpc-total-label,
.kpc-grand .kpc-gl,
.kpc-alt-title {
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--kpc-muted);
}

.kpc-badge {
	background: var(--kpc-brass);
	color: var(--kpc-ink);
	font-weight: 700;
	font-size: 12.5px;
	padding: 4px 11px;
	border-radius: 999px;
	white-space: nowrap;
}

.kpc-total-label { margin: 0 0 2px !important; display: block; }

.kpc-total {
	font-family: var(--kpc-display);
	font-weight: 800;
	font-size: clamp(2.7rem, 6.4vw, 3.5rem);
	line-height: .96;
	letter-spacing: -.035em;
	font-variant-numeric: tabular-nums;
	color: var(--kpc-ink);
}

.kpc-total-sub {
	font-size: 12.5px;
	color: var(--kpc-muted);
	margin: 10px 0 0 !important;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--kpc-panel-line);
}

.kpc-lines { display: flex; flex-direction: column; }

.kpc-line {
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 6px 14px;
	align-items: baseline;
	padding: 13px 0;
	border-bottom: 1px solid var(--kpc-panel-line);
}

.kpc-line .kpc-lname { font-weight: 600; font-size: 14.5px; grid-column: 1; color: var(--kpc-ink); }

.kpc-line .kpc-lsub {
	font-size: 12.5px;
	color: var(--kpc-muted);
	margin: 3px 0 0 !important;
	grid-column: 1;
	font-variant-numeric: tabular-nums;
}

.kpc-line .kpc-lqty {
	font-family: var(--kpc-display);
	font-weight: 700;
	font-size: 18px;
	font-variant-numeric: tabular-nums;
	color: var(--kpc-ink);
	grid-column: 2;
	grid-row: 1;
}

.kpc-line .kpc-lsum {
	font-size: 14px;
	color: var(--kpc-muted);
	font-variant-numeric: tabular-nums;
	grid-column: 3;
	grid-row: 1;
	min-width: 66px;
	text-align: right;
}

.kpc-line.kpc-sub-item { padding: 9px 0; border-bottom: 0; }
.kpc-line.kpc-sub-item .kpc-lname { font-weight: 400; font-size: 14px; padding-left: 17px; }
.kpc-line.kpc-sub-item .kpc-lqty { font-size: 15px; }
.kpc-line.kpc-is-off { display: none; }

.kpc-swatch {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 2px;
	margin-right: 8px;
	vertical-align: 1px;
}

.kpc-sw-sweet { background: var(--kpc-brass); }
.kpc-sw-salt { background: var(--kpc-tan); }
.kpc-sw-add { background: var(--kpc-ink); }

.kpc-grand {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-top: 18px;
	padding-top: 18px;
	border-top: 2px solid var(--kpc-brass);
}

.kpc-grand .kpc-gv {
	font-family: var(--kpc-display);
	font-weight: 800;
	font-size: 25px;
	letter-spacing: -.02em;
	font-variant-numeric: tabular-nums;
	color: var(--kpc-ink);
}

.kpc-perhead {
	font-size: 13px;
	color: var(--kpc-muted);
	margin: 6px 0 0 !important;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* alternative: ready-made packages */

.kpc-alt {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px dashed var(--kpc-panel-line);
}

.kpc-alt-title { display: block; margin: 0 0 8px !important; color: var(--kpc-brass-text); }
.kpc-alt ul { display: flex; flex-direction: column; gap: 4px; }
.kpc-alt li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }

.kpc-alt li a {
	color: var(--kpc-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: var(--kpc-muted);
}

.kpc-alt li a:hover { color: var(--kpc-brass-text); text-decoration-color: var(--kpc-brass-text); }
.kpc-alt li .kpc-ap { color: var(--kpc-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.kpc-alt-sum { margin: 10px 0 0 !important; font-size: 13px; color: var(--kpc-muted); line-height: 1.5; }

.kpc-alt-sum strong {
	color: var(--kpc-ink);
	font-family: var(--kpc-display);
	font-size: 15px;
	font-variant-numeric: tabular-nums;
}

/* actions — the theme's own button: brass, white, uppercase Cormorant */

.kpc-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }

.kpc-btn {
	font-size: 15px;
	font-weight: 700;
	padding: 13px 18px;
	border-radius: 3px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: opacity .12s ease, border-color .12s ease, color .12s ease;
	text-align: center;
	display: block;
}

.kpc-btn-primary { background: var(--kpc-brass); color: var(--kpc-ink); }
.kpc-btn-primary:hover { opacity: .88; color: var(--kpc-ink); }

.kpc-btn-ghost { background: transparent; color: var(--kpc-ink); border-color: var(--kpc-line); }
.kpc-btn-ghost:hover { border-color: var(--kpc-tan); color: var(--kpc-brass-text); }

.kpc-cart-note {
	font-size: 12px;
	color: var(--kpc-muted);
	line-height: 1.5;
	margin: 9px 0 0 !important;
}

.kpc-cart-note:empty { display: none; }

.kpc-btn[aria-disabled="true"] {
	opacity: .45;
	pointer-events: none;
}

.kpc-docket-note { font-size: 12.5px; color: var(--kpc-muted); margin: 16px 0 0 !important; line-height: 1.5; }
.kpc-docket-note a { color: var(--kpc-brass-text); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* sticky mobile total */

.kpc-bar {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 20;
	background: var(--kpc-ink);
	color: #fff;
	padding: 12px 18px;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	box-shadow: 0 -4px 16px rgba(10, 10, 10, .18);
}

.kpc-bar .kpc-bl {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .7);
}

.kpc-bar .kpc-bv {
	font-family: var(--kpc-display);
	font-weight: 800;
	font-size: 24px;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

@media (max-width: 900px) { .kpc-bar { display: flex; } }

/* ---------------------------------------------------------------------
 * Packages and notes
 * ------------------------------------------------------------------ */

.kpc-packs {
	margin-top: 56px;
	padding-top: 30px;
	border-top: 1px solid var(--kpc-line-soft);
}

.kpc-packs .kpc-h2 {
	font-family: var(--kpc-display);
	font-weight: 700;
	font-size: 19px;
	letter-spacing: -.01em;
	color: var(--kpc-ink);
	margin: 0 0 6px !important;
}

.kpc-packs .kpc-psub { margin: 0 0 20px !important; color: var(--kpc-ink-2); font-size: 14.5px; max-width: 60ch; }

.kpc-packlist {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
	gap: 0 26px;
}

.kpc-packlist li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--kpc-line-soft);
}

.kpc-packlist a { font-weight: 600; color: var(--kpc-ink); }
.kpc-packlist a:hover { color: var(--kpc-brass-text); text-decoration: underline; text-underline-offset: 3px; }

.kpc-packlist .kpc-pp {
	font-family: var(--kpc-display);
	font-weight: 700;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
	color: var(--kpc-ink-2);
	white-space: nowrap;
}

.kpc-notes {
	margin-top: 48px;
	padding-top: 26px;
	border-top: 1px solid var(--kpc-line-soft);
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 26px;
}

.kpc-note .kpc-h3 {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--kpc-muted);
	margin: 0 0 8px !important;
}

.kpc-note p { font-size: 14px; color: var(--kpc-ink-2); line-height: 1.65; }

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