/* Number Plate Maker – plate builder */
.npm-builder {
	--npm-ink: var(--wp--preset--color--ink, #0e1013);
	--npm-yellow: var(--wp--preset--color--plate-yellow, #ffd736);
	--npm-line: var(--wp--preset--color--line, #e4e7eb);
	--npm-mist: var(--wp--preset--color--mist, #f4f5f7);
	--npm-muted: #5d6673;
	--npm-ok: #138a43;
	--npm-bad: #c81e1e;
	--npm-radius: 18px;
	font-size: 15px;
	color: var(--npm-ink);
	margin-block: 0 2rem;
}
.npm-builder *, .npm-builder *::before, .npm-builder *::after { box-sizing: border-box; }
.npm-builder [hidden] { display: none !important; }
.npm-builder__ssr .npm-stage { background: #111318; border-radius: var(--npm-radius); padding: 32px; display: grid; gap: 18px; }
.npm-builder__ssr svg { width: 100%; height: auto; }
.npm-builder__loading { color: var(--npm-muted); font-size: 14px; }

.npm-b { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(340px, 1fr); gap: 28px; align-items: start; }

/* Stage */
.npm-b__stage { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + 88px); }
.npm-b__stage-inner {
	position: relative; overflow: hidden; border-radius: 22px; padding: 64px 36px 28px; min-height: 440px;
	display: flex; flex-direction: column; justify-content: center;
	background:
		radial-gradient(120% 80% at 25% 0%, rgba(255, 215, 54, .10) 0%, rgba(255, 215, 54, 0) 45%),
		radial-gradient(90% 70% at 80% 100%, rgba(80, 120, 255, .10) 0%, rgba(80, 120, 255, 0) 55%),
		linear-gradient(160deg, #1b1f26 0%, #0c0d10 70%);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 30px 60px -30px rgba(0, 0, 0, .55);
}
.npm-b__stage-inner::before {
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
	background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
	background-size: 28px 28px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.npm-b__plates { position: relative; display: grid; gap: 30px; justify-items: center; }
.npm-b__plate { margin: 0; width: 100%; display: grid; justify-items: center; gap: 10px; }
.npm-b__svg { width: 100%; transition: width .25s ease; }
.npm-b__svg svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 22px 22px rgba(0, 0, 0, .5)); }
.npm-b__plate figcaption { color: #9ea6b2; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.npm-b__plate.is-warn figcaption { color: #fca5a5; }
.npm-b__status { position: absolute; top: 18px; left: 18px; z-index: 2; display: inline-flex; gap: 8px; align-items: center; font-size: 12px; padding: 7px 12px; border-radius: 999px; color: #e5e7eb; background: rgba(255, 255, 255, .08); backdrop-filter: blur(6px); }
.npm-b__status b { font-weight: 800; letter-spacing: .02em; }
.npm-b__status.is-legal { background: rgba(19, 138, 67, .22); color: #bbf7d0; }
.npm-b__status.is-show { background: rgba(255, 215, 54, .16); color: #fde68a; }
.npm-b__stage-foot { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; color: #8b94a1; font-size: 12px; }
.npm-b__share { background: rgba(255, 255, 255, .08); color: #f3f4f6; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; padding: 8px 14px; font-size: 12px; font-weight: 600; cursor: pointer; }
.npm-b__share:hover { background: rgba(255, 255, 255, .16); }

/* Panel */
.npm-b__panel { background: #fff; border: 1px solid var(--npm-line); border-radius: 22px; padding: 6px 24px 0; box-shadow: 0 20px 40px -32px rgba(15, 23, 42, .35); }
.npm-step { padding: 22px 0; border-bottom: 1px solid #eef0f3; }
.npm-step__title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; }
.npm-step__title span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--npm-yellow); color: #111; font-size: 13px; font-weight: 800; flex: none; }
.npm-note { margin: 10px 0 0; color: var(--npm-muted); font-size: 13px; line-height: 1.45; }
.npm-note:empty { display: none; }
.npm-field-label { margin: 14px 0 8px; font-size: 13px; font-weight: 700; color: var(--npm-muted); text-transform: uppercase; letter-spacing: .06em; }

/* Segmented controls */
.npm-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--npm-mist); border-radius: 12px; margin-bottom: 14px; }
.npm-seg__btn { appearance: none; border: 0; background: transparent; padding: 11px 10px; border-radius: 9px; font: inherit; font-weight: 700; font-size: 14px; color: #3a414b; cursor: pointer; transition: background .15s, color .15s; }
.npm-seg__btn:hover { background: rgba(0, 0, 0, .05); }
.npm-seg__btn.is-on { background: var(--npm-ink); color: #fff; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .6); }

/* Registration input styled as a plate */
.npm-reg { display: flex; align-items: stretch; height: 76px; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #ffe066, var(--npm-yellow)); box-shadow: inset 0 0 0 3px var(--npm-ink), 0 8px 18px -10px rgba(0, 0, 0, .45); }
.npm-builder.is-show .npm-reg { background: linear-gradient(180deg, #fff, #eef0f3); }
.npm-reg__badge { display: grid; place-items: end center; width: 46px; padding-bottom: 12px; margin: 3px 0 3px 3px; border-radius: 9px 0 0 9px; background: #0b4ea2; color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .04em; }
.npm-reg__input { flex: 1; min-width: 0; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; text-align: center; text-transform: uppercase; font-family: "Barlow Condensed", "Archivo Narrow", "Arial Narrow", Arial, sans-serif; font-weight: 800; font-size: clamp(30px, 4.4vw, 42px); letter-spacing: .08em; color: #0b0b0c; padding: 0 12px; }
.npm-reg__input::placeholder { color: rgba(0, 0, 0, .28); }
.npm-reg:focus-within { box-shadow: inset 0 0 0 3px var(--npm-ink), 0 0 0 4px rgba(11, 78, 162, .25); }
.npm-reg__msg { margin: 10px 2px 0; font-size: 13px; color: var(--npm-muted); min-height: 1.4em; }
.npm-reg__msg.is-ok { color: var(--npm-ok); font-weight: 600; }
.npm-reg__msg.is-bad { color: var(--npm-bad); }
.npm-link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; font-weight: 700; }

/* Fields */
.npm-sizes, .npm-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.npm-custom { margin-top: 12px; }
.npm-field { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: #3a414b; }
.npm-field select, .npm-field input { width: 100%; height: 46px; border: 1.5px solid #d5d9df; border-radius: 10px; padding: 0 12px; font: inherit; font-weight: 500; font-size: 15px; background: #fff; color: var(--npm-ink); }
.npm-field select:focus, .npm-field input:focus { border-color: var(--npm-ink); outline: 2px solid rgba(11, 78, 162, .25); outline-offset: 1px; }
.npm-step .npm-field + .npm-field { margin-top: 0; }
.npm-step--show .npm-field { margin-top: 14px; }

/* Style cards */
.npm-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.npm-style { position: relative; display: grid; gap: 4px; align-content: start; text-align: left; padding: 10px 12px 12px; border: 1.5px solid #e1e4e8; border-radius: 14px; background: #fff; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.npm-style:hover { border-color: #b9bfc8; transform: translateY(-1px); }
.npm-style.is-on { border-color: var(--npm-ink); box-shadow: 0 0 0 1.5px var(--npm-ink); background: #fffcf0; }
.npm-style:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.npm-style__mini { display: block; height: 38px; margin-bottom: 4px; }
.npm-style__mini svg { height: 100%; width: auto; max-width: 100%; }
.npm-style__name { font-weight: 800; font-size: 14px; }
.npm-style__desc { font-size: 12px; color: var(--npm-muted); line-height: 1.35; }
.npm-style__price { font-weight: 800; font-size: 13px; margin-top: 2px; }
.npm-tag { position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: #fde68a; color: #6b4e00; padding: 3px 6px; border-radius: 6px; }

/* Chips & swatches */
.npm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.npm-chip { display: inline-flex; align-items: center; gap: 7px; appearance: none; border: 1.5px solid #dfe2e6; background: #fff; border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 700; font-size: 13.5px; color: #2b3138; cursor: pointer; transition: all .15s; }
.npm-chip:hover { border-color: #aeb4bd; }
.npm-chip.is-on { background: var(--npm-ink); border-color: var(--npm-ink); color: #fff; }
.npm-chip:disabled { opacity: .38; cursor: not-allowed; }
.npm-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .7); }
.npm-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.npm-swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; background: var(--sw); box-shadow: 0 0 0 1.5px #cfd3d8; cursor: pointer; padding: 0; }
.npm-swatch.is-on { box-shadow: 0 0 0 2.5px var(--npm-ink); }
.npm-toggle { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.npm-toggle input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--npm-ink); flex: none; }

/* Checks */
.npm-checks { margin: 20px 0 0; padding: 16px 18px; background: var(--npm-mist); border-radius: 14px; font-size: 13.5px; }
.npm-checks__title { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 8px; font-weight: 800; }
.npm-checks__title a, .npm-checks__docs a { font-weight: 600; color: inherit; }
.npm-checks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.npm-checks li { position: relative; padding-left: 24px; }
.npm-checks li::before { position: absolute; left: 0; top: 0; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.npm-checks li.ok::before { content: "✓"; background: #dcfce7; color: var(--npm-ok); }
.npm-checks li.no::before { content: "!"; background: #fee2e2; color: var(--npm-bad); }
.npm-checks li.no { color: var(--npm-bad); font-weight: 600; }
.npm-checks__docs { margin: 10px 0 0; color: var(--npm-muted); }
.npm-checks__show { margin: 0; color: #6b4e00; }
.npm-builder.is-show .npm-checks { background: #fff8db; }

/* Summary */
.npm-summary { position: static; background: #fff; margin: 18px -24px 0; padding: 16px 24px 20px; border-top: 1px solid var(--npm-line); border-radius: 0 0 22px 22px; z-index: 3; }
.npm-breakdown { font-size: 13px; margin-bottom: 10px; }
.npm-breakdown summary { cursor: pointer; color: var(--npm-muted); font-weight: 600; }
.npm-breakdown ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.npm-breakdown li { display: flex; justify-content: space-between; gap: 12px; }
.npm-summary__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.npm-summary__label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--npm-muted); font-weight: 700; }
.npm-summary__total { font-size: 32px; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; }
.npm-summary__small { margin: 10px 0 0; font-size: 12px; color: var(--npm-muted); }
.npm-btn { appearance: none; border: 0; border-radius: 12px; background: var(--npm-ink); color: var(--npm-yellow); padding: 16px 26px; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; transition: transform .15s, box-shadow .15s; box-shadow: 0 10px 20px -12px rgba(0, 0, 0, .7); }
.npm-btn:hover { transform: translateY(-1px); }
.npm-btn.is-disabled { opacity: .55; }
.npm-btn.is-busy { opacity: .7; pointer-events: none; }
.npm-errors { list-style: none; margin: 10px 0 0; padding: 0; color: var(--npm-bad); font-size: 13.5px; font-weight: 600; }
.npm-errors:empty { display: none; }
.npm-bar { display: none; }
@media (min-width: 961px) and (min-height: 780px) { .npm-summary { position: sticky; bottom: 0; } }

@media (max-width: 960px) {
	.npm-b { grid-template-columns: 1fr; gap: 16px; }
	.npm-b__stage { position: relative; top: 0; }
	.npm-b__stage-inner { min-height: 0; padding: 56px 18px 18px; border-radius: 18px; }
	.npm-b__plates { gap: 18px; }
	.npm-b__panel { padding: 0 16px; border-radius: 18px; }
	.npm-summary { position: static; margin: 16px -16px 0; padding: 16px; }
	.npm-builder { padding-bottom: 76px; }
	.npm-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(14, 16, 19, .96); color: #fff; backdrop-filter: blur(8px); }
	.npm-bar span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #9ca3af; }
	.npm-bar strong { font-size: 22px; font-weight: 900; }
	.npm-bar .npm-btn { background: var(--npm-yellow); color: #111; padding: 13px 20px; }
}
@media (max-width: 520px) {
	.npm-sizes, .npm-custom { grid-template-columns: 1fr; }
	.npm-styles { grid-template-columns: 1fr 1fr; }
	.npm-reg { height: 66px; }
	.npm-seg__btn { font-size: 13px; padding: 10px 6px; }
}
