/* Kamala Studio – gift vouchers: designer, live preview, checkout, balance. Scoped to .stk-vch. */

.stk-vch {
	--stk-bg: #1c1318;
	--stk-accent: #d9a38f;
	--v-ink: var(--wp--preset--color--ink, #1c1318);
	--v-text: #2a2025;
	--v-muted: var(--wp--preset--color--muted, #6b5e64);
	--v-line: var(--wp--preset--color--line, #e6dbd4);
	--v-soft: var(--wp--preset--color--sand, #f1e8e2);
	--v-rose-deep: var(--wp--preset--color--rose-deep, #8f4f3e);
	--v-serif: "STK Cormorant", "Cormorant Garamond", Georgia, serif;
	--v-sans: "STK Manrope", Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--v-script: "STK Great Vibes", "Great Vibes", cursive;
	max-width: 1180px;
	margin: 0 auto;
	font-family: var(--v-sans);
	font-size: 16px;
	line-height: 1.5;
	color: var(--v-text);
}
.stk-vch *, .stk-vch *::before, .stk-vch *::after { box-sizing: border-box; }
.stk-vch [hidden] { display: none !important; }
.stk-vch .stk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.stk-vch .stk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ preview */

.stkv-wrap { container-type: inline-size; width: 100%; }
.stkv {
	--mm: calc(100cqi / 210);
	position: relative;
	width: 100%;
	aspect-ratio: 210 / 148;
	overflow: hidden;
	border-radius: calc(var(--mm) * 3);
	background: #ebe3de;
	font-family: "STK Manrope", Manrope, system-ui, sans-serif;
	font-weight: 500;
	user-select: none;
}
.stkv-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.stkv-bg.is-in { opacity: 1; }
.stkv-scrim { position: absolute; inset: 0; pointer-events: none; }
.stkv-line { white-space: nowrap; overflow: hidden; }
.stkv-label, .stkv-foot, .stkv-code { position: absolute; }
.stkv-label { font-weight: 700; text-transform: uppercase; }
.stkv-flow { position: absolute; display: flex; flex-direction: column; justify-content: center; }
.stkv-flow > * { width: 100%; flex: none; }
.stkv-head { font-weight: 600; }
.stkv-amount { font-family: "STK Cormorant", "Cormorant Garamond", Georgia, serif; font-weight: 600; }
.stkv-rec, .stkv-msg { font-family: "STK Cormorant", "Cormorant Garamond", Georgia, serif; font-style: italic; font-weight: 500; }
.stkv-msg { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.stkv-code > div { position: absolute; font-weight: 700; }
.stkv-code-label { text-transform: uppercase; }
.stkv-foot { font-weight: 500; }

/* decorations + editor */
.stkv-wrap { position: relative; }
.stkv-deco { position: absolute; inset: 0; pointer-events: none; }
.stkv-stk { position: absolute; display: block; max-width: none; margin: 0; user-select: none; -webkit-user-drag: none; pointer-events: none; transform-origin: 50% 50%; }
.is-edit .stkv { outline: none; }
.is-edit .stkv:focus-visible { box-shadow: 0 0 0 3px var(--wp--preset--color--base, #faf6f2), 0 0 0 5px var(--v-ink, #1c1318); }
.is-edit .stkv > :not(.stkv-deco) { pointer-events: none; }
.is-edit .stkv-stk { pointer-events: auto; cursor: grab; touch-action: none; }
.is-edit.is-dragging .stkv-stk, .is-edit.is-dragging { cursor: grabbing; }
.stkv-over { --mm: calc(100cqi / 210); position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 210 / 148; pointer-events: none; }
.stkv-sel { position: absolute; box-sizing: border-box; border: 1.5px dashed #1c1318; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9), inset 0 0 0 1.5px rgba(255, 255, 255, .9); border-radius: 2px; transform-origin: 50% 50%; }
.stkv-sel[hidden] { display: none; }
.stkv-h { position: absolute; box-sizing: border-box; width: 26px; height: 26px; margin: -13px 0 0 -13px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #1c1318; border: 1.5px solid #1c1318; box-shadow: 0 2px 6px rgba(28, 19, 24, .3); pointer-events: auto; touch-action: none; }
.stkv-h-rot { left: 50%; top: -26px; cursor: grab; }
.stkv-h-rot::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 13px; margin-left: -.75px; background: #1c1318; }
.stkv-h-rot svg { width: 14px; height: 14px; }
.stkv-h-size { left: 100%; top: 100%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 5px; cursor: nwse-resize; }
.stkv-h-del { left: 100%; top: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; background: #1c1318; color: #fff; border-color: #fff; cursor: pointer; }
@media (pointer: coarse) {
	.stkv-h { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
	.stkv-h-size { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
	.stkv-h-del { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
	.stkv-h-rot { top: -32px; }
}
.stkv-guide { position: absolute; background: #d6457a; opacity: 0; transition: opacity .12s; }
.stkv-guide.is-x { left: 50%; top: 0; bottom: 0; width: 1px; }
.stkv-guide.is-y { top: 50%; left: 0; right: 0; height: 1px; }
.stkv-guide.is-on { opacity: .85; }

/* toolbar for the selected decoration */
.stk-vt { min-width: 0; margin: 14px 2px 0; padding: 10px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--v-line, #eadfd9); box-shadow: 0 10px 24px -18px rgba(28, 19, 24, .45); animation: stk-vt-in .16s ease-out; }
.stk-vt[hidden] { display: none; }
@keyframes stk-vt-in { from { opacity: 0; transform: translateY(-4px); } }
.stk-vt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.stk-vt-row + .stk-vt-row { margin-top: 8px; }
.stk-vt-name { font-weight: 700; font-size: .875rem; margin-right: auto; }
.stk-vt-colors { display: inline-flex; gap: 6px; }
.stk-vt-color { width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 0; cursor: pointer; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(28, 19, 24, .18); position: relative; }
.stk-vt-color.is-light { box-shadow: inset 0 0 0 1px rgba(28, 19, 24, .3); }
.stk-vt-color[aria-checked="true"]::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--v-ink, #1c1318); }
.stk-vt-color:focus-visible { outline: 2px solid var(--v-ink, #1c1318); outline-offset: 5px; }
.stk-vt-actions { gap: 6px 10px; }
.stk-vt-group { display: inline-flex; gap: 2px; padding: 2px; border-radius: 11px; background: #f5efeb; }
.stk-vt-btn { display: grid; place-items: center; width: 34px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--v-ink, #1c1318); cursor: pointer; }
.stk-vt-btn:hover { background: #fff; box-shadow: 0 1px 3px rgba(28, 19, 24, .12); }
.stk-vt-btn:focus-visible { outline: 2px solid var(--v-ink, #1c1318); outline-offset: 1px; }
.stk-vt-btn.is-del { color: #a3243a; }
@media (max-width: 900px) {
	.stk-vt { margin: 8px 0 0; padding: 8px 10px; }
	.stk-vt-row + .stk-vt-row { margin-top: 6px; }
	.stk-vt-name { font-size: .8125rem; }
	.stk-vt-color { width: 22px; height: 22px; }
	/* one swipeable row of actions keeps the sticky preview short */
	.stk-vt-actions { flex-wrap: nowrap; overflow-x: auto; margin: 6px -10px -2px; padding: 0 10px 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.stk-vt-actions::-webkit-scrollbar { display: none; }
	.stk-vt-group { flex: none; }
	.stk-vt-btn { width: 36px; height: 34px; }
}
@media (hover: none) { .stk-vd-sticker .stk-vd-plus { display: none; } .stk-vd-sticker:hover { transform: none; box-shadow: none; border-color: var(--v-line, #eadfd9); } }

/* decoration palette */
.stk-vd-hint { margin: -4px 0 14px; font-size: .875rem; line-height: 1.5; color: var(--v-muted, #6b5e64); max-width: 46ch; }
.stk-vd-stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.stk-vd-sticker { position: relative; display: block; aspect-ratio: 1; overflow: hidden; padding: 8px; border-radius: 14px; border: 1px solid var(--v-line, #eadfd9); background: #fff; cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; }
.stk-vd-sticker img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; pointer-events: none; }
.stk-vd-sticker.is-dark { background: #2a2226; border-color: #2a2226; }
.stk-vd-sticker:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -12px rgba(28, 19, 24, .5); border-color: var(--v-ink, #1c1318); }
.stk-vd-sticker:focus-visible { outline: 2px solid var(--v-ink, #1c1318); outline-offset: 2px; }
.stk-vd-sticker .stk-vd-plus { position: absolute; right: 5px; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--v-ink, #1c1318); color: #fff; font-size: 12px; line-height: 16px; text-align: center; opacity: 0; transition: opacity .12s; }
.stk-vd-sticker:hover .stk-vd-plus { opacity: 1; }
.stk-vd-sticker-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 10px; font-size: .8125rem; color: var(--v-muted, #6b5e64); }
.stk-vd-sticker-bar button { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--v-ink, #1c1318); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.stk-vd-sticker-bar button[hidden] { display: none; }
.stk-vd-sticker-groups { display: grid; gap: 14px; }
.stk-vd-sticker-groups h4 { margin: 0 0 8px; font-family: inherit; line-height: 1.3; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--v-muted, #6b5e64); font-weight: 700; }

/* ------------------------------------------------------------ designer */

.stk-vd { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .stk-vd { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

.stk-vd-stage { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + 96px); }
.stk-vd-canvas {
	padding: clamp(14px, 3vw, 34px);
	border-radius: 28px;
	background:
		radial-gradient(120% 90% at 20% 0%, #fff 0%, transparent 60%),
		var(--v-soft);
}
.stk-vd-canvas .stkv { box-shadow: 0 2px 4px rgba(28, 19, 24, .08), 0 24px 50px -24px rgba(28, 19, 24, .5); }
.stk-vd-under { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin: 12px 4px 0; font-size: .875rem; color: var(--v-muted); }
.stk-vd-under a { color: var(--v-ink); font-weight: 700; text-underline-offset: 3px; }

@media (max-width: 900px) {
	.stk-vd-stage { top: calc(var(--wp-admin--admin-bar--height, 0px) + 64px); z-index: 5; margin: 0 -16px; padding: 8px 16px 10px; background: color-mix(in oklab, var(--wp--preset--color--base, #faf6f2) 96%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 18px -16px rgba(28, 19, 24, .45); }
	.stk-vd-canvas { padding: 10px; border-radius: 18px; max-width: 520px; margin: 0 auto; }
	.stk-vd-under { justify-content: center; margin-top: 6px; font-size: .8125rem; }
	.stk-vd-under span { display: none; }
}

.stk-vd-panel { display: grid; gap: 30px; }
.stk-vd-step { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 12px; }
.stk-vd-step > legend, .stk-vd-h { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; padding: 0; font-weight: 800; font-size: 1.0625rem; color: var(--v-ink); }
.stk-vd-step > legend b, .stk-vd-h b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--v-ink); color: #fff; font-size: .8125rem; }
.stk-vd-step > legend small { font-weight: 500; font-size: .875rem; color: var(--v-muted); }

/* designs */
.stk-vd-designs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 480px) { .stk-vd-designs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stk-vd-design { position: relative; display: grid; gap: 6px; margin: 0; padding: 0; border: 0; background: none; font: inherit; text-align: center; cursor: pointer; color: var(--v-text); }
.stk-vd-mini { display: block; overflow: hidden; border-radius: 10px; box-shadow: 0 0 0 1px var(--v-line); transition: box-shadow .15s, transform .15s; }
.stk-vd-mini img { display: block; width: 100%; aspect-ratio: 210 / 148; object-fit: cover; }
.stk-vd-mini .stkv { border-radius: 0; }
.stk-vd-design > span:last-child { font-size: .8125rem; font-weight: 600; }
.stk-vd-design:hover .stk-vd-mini { transform: translateY(-2px); }
.stk-vd-design[aria-checked="true"] .stk-vd-mini { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--v-ink); }
.stk-vd-design[aria-checked="true"]::after {
	content: "";
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 1;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--v-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.2 4.2L19 7'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.stk-vd-design:focus-visible { outline: none; }
.stk-vd-design:focus-visible .stk-vd-mini { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--v-rose-deep); }

/* chips */
.stk-vd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stk-vd-chip { position: relative; cursor: pointer; }
.stk-vd-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.stk-vd-chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--v-line); border-radius: 99px; background: #fff; font-weight: 600; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.stk-vd-chip input:checked + span { border-color: var(--v-ink); background: var(--v-ink); color: #fff; }
.stk-vd-chip input:focus-visible + span { outline: 2px solid var(--v-rose-deep); outline-offset: 2px; }

/* fonts */
.stk-vd-fonts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stk-vd-font { position: relative; cursor: pointer; }
.stk-vd-font input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.stk-vd-font span { display: grid; place-items: center; gap: 2px; min-height: 86px; padding: 10px 8px; border: 1px solid var(--v-line); border-radius: 16px; background: #fff; text-align: center; }
.stk-vd-font i { font-style: normal; font-size: 1.75rem; line-height: 1.1; color: var(--v-ink); white-space: nowrap; }
.stk-vd-font small { font-size: .75rem; font-weight: 600; letter-spacing: .04em; color: var(--v-muted); }
.stk-vd-font.is-serif i { font-family: var(--v-serif); font-weight: 600; }
.stk-vd-font.is-script i { font-family: var(--v-script); font-size: 2rem; }
.stk-vd-font.is-sans i { font-family: var(--v-sans); font-weight: 700; font-size: 1.3rem; }
.stk-vd-font input:checked + span { border-color: var(--v-ink); box-shadow: inset 0 0 0 1px var(--v-ink); }
.stk-vd-font input:focus-visible + span { outline: 2px solid var(--v-rose-deep); outline-offset: 2px; }

/* fields */
.stk-vch .stk-f { display: grid; gap: 6px; font-weight: 700; font-size: .9375rem; }
.stk-vch .stk-f small { font-weight: 500; color: var(--v-muted); }
.stk-vch .stk-f input, .stk-vch .stk-f textarea {
	width: 100%;
	min-height: 50px;
	padding: 12px 14px;
	border: 1px solid var(--v-line);
	border-radius: 14px;
	background: #fff;
	color: var(--v-ink);
	font: inherit;
	font-weight: 400;
	font-size: 16px;
}
.stk-vch .stk-f textarea { resize: vertical; min-height: 84px; }
.stk-vch .stk-f input:focus, .stk-vch .stk-f textarea:focus { outline: 2px solid var(--v-ink); outline-offset: 1px; }
.stk-vd-count { justify-self: end; margin-top: -2px; font-size: .75rem; font-weight: 500; color: var(--v-muted); font-variant-numeric: tabular-nums; }
.stk-vd-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .stk-vd-two { grid-template-columns: 1fr; } }

.stk-vch-terms { padding: 12px 16px; border-radius: 14px; background: var(--v-soft); font-size: .9375rem; }
.stk-vch-terms summary { cursor: pointer; font-weight: 700; }
.stk-vch-terms ul { margin: 10px 0 2px; padding-left: 1.2em; color: var(--v-muted); line-height: 1.5; }
.stk-vch-terms li + li { margin-top: 6px; }
.stk-vch .stk-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem; line-height: 1.45; cursor: pointer; }
.stk-vch .stk-consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--v-ink); }
.stk-vch .stk-co-error { margin: 0; padding: 10px 14px; border-radius: 12px; background: #fbe6e0; color: #8a3b24; font-weight: 600; font-size: .9375rem; }
.stk-vch .stk-co-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 58px; padding: 0 26px; border: 0; border-radius: 99px; background: var(--v-ink); color: #fff; font: inherit; font-weight: 800; font-size: 1.0625rem; text-decoration: none; cursor: pointer; }
.stk-vch .stk-co-btn.is-auto { width: auto; }
.stk-vch .stk-co-btn[disabled] { opacity: .6; cursor: default; }
.stk-vch .stk-co-btn:focus-visible { outline: 2px solid var(--v-rose-deep); outline-offset: 3px; }
.stk-vch .stk-co-small { margin: -10px 0 0; text-align: center; color: var(--v-muted); font-size: .8125rem; }
.stk-vch-closed { margin: 0; padding: 18px 20px; border-radius: 18px; background: var(--v-soft); }

/* status after payment */
.stk-vch-status { margin: 0 0 32px; padding: clamp(20px, 4vw, 32px); border-radius: 24px; background: var(--v-soft); scroll-margin-top: 100px; }
.stk-vch-status.is-ok { background: #e8f3ec; }
.stk-vch-status.is-bad { background: #fbe9e3; }
.stk-vch-status h2 { margin: 0 0 8px; font-family: var(--v-serif); font-weight: 600; font-size: 2rem; line-height: 1.1; }
.stk-vch-status p { margin: 0 0 12px; }
.stk-vch-status p:last-child { margin-bottom: 0; }
.stk-vch-done { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
@media (max-width: 760px) { .stk-vch-done { grid-template-columns: 1fr; } }
.stk-vch-done .stkv { box-shadow: 0 20px 40px -24px rgba(28, 19, 24, .5); }
.stk-vch-code { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 18px 0 !important; padding: 14px 18px; border-radius: 14px; background: #fff; }
.stk-vch-code span { flex-basis: 100%; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--v-muted); }
.stk-vch-code b { font-family: Menlo, Consolas, monospace; font-size: 1.375rem; letter-spacing: .06em; }
.stk-vch-code em { font-style: normal; font-weight: 700; color: var(--v-muted); }

/* balance */
.stk-vch-balance { margin-top: clamp(40px, 7vw, 72px); padding-top: 28px; border-top: 1px solid var(--v-line); max-width: 520px; }
.stk-vch-balance h2 { margin: 0 0 12px; font-family: var(--v-serif); font-weight: 600; font-size: 1.625rem; line-height: 1.1; }
.stk-vch-bal-form { display: flex; gap: 8px; }
.stk-vch-bal-form .stk-f { flex: 1; }
.stk-vch-bal-form input { text-transform: uppercase; font-family: Menlo, Consolas, monospace !important; letter-spacing: .04em; }
.stk-vch-bal-btn { flex: none; min-height: 50px; padding: 0 20px; border: 1px solid var(--v-ink); border-radius: 14px; background: #fff; color: var(--v-ink); font: inherit; font-weight: 700; cursor: pointer; }
.stk-vch-bal-out { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--v-soft); }
.stk-vch-bal-out.is-ok { background: #e8f3ec; }
.stk-vch-bal-out.is-bad { background: #fbe9e3; }

@media (prefers-reduced-motion: reduce) { .stk-vd-mini { transition: none; } .stk-vd-design:hover .stk-vd-mini { transform: none; } }
@media (max-width: 480px) { .stk-vd-font i { font-size: 1.3rem; } .stk-vd-font.is-script i { font-size: 1.55rem; } .stk-vd-font.is-sans i { font-size: 1rem; } .stk-vd-font span { min-height: 74px; padding: 8px 4px; } }
