/* Thank-you & packaging sticker packs (/sticker-packs/, assets/js/sticker-packs.js). */

.yp-sp {
	--sp-ink: #161B2C;
	--sp-muted: #5B6275;
	--sp-line: #E3E6EE;
	--sp-card: #FFFFFF;
	--sp-soft: #F4F5F8;
	--sp-accent: #E6007E;
	--sp-head: var(--wp--preset--font-family--heading, 'Geist', 'Inter', sans-serif);
	color: var(--sp-ink);
	padding-block: 2rem 4rem;
}

.yp-sp__title {
	font-family: var(--sp-head);
	font-size: clamp(2rem, 4vw, 2.75rem);
	line-height: 1.1;
	margin: 0.25rem 0 0.5rem;
}

.yp-sp__lede {
	max-width: 46rem;
	color: var(--sp-muted);
	font-size: 1.0625rem;
	line-height: 1.5;
	margin: 0 0 2rem;
}

.yp-sp__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
	gap: 2rem;
	align-items: start;
}

.yp-sp__layout[hidden] {
	display: none;
}

.yp-sp__h {
	font-family: var(--sp-head);
	font-size: 1.125rem;
	margin: 0 0 0.75rem;
}

.yp-sp__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 0.875rem;
}

.yp-sp__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.375rem;
	padding: 1rem 0.75rem 0.875rem;
	background: var(--sp-card);
	border: 2px solid var(--sp-line);
	border-radius: 14px;
	cursor: pointer;
	font: inherit;
	color: inherit;
	text-align: center;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.yp-sp__card:hover {
	border-color: #C9CEDB;
	transform: translateY(-1px);
}

.yp-sp__card[aria-checked="true"] {
	border-color: var(--sp-accent);
	box-shadow: 0 0 0 3px rgba(230, 0, 126, 0.15);
}

.yp-sp__card:focus-visible,
.yp-sp__chip:focus-visible {
	outline: 3px solid #2E5BD8;
	outline-offset: 2px;
}

.yp-sp__card canvas {
	width: 112px;
	height: 112px;
	object-fit: contain;
	filter: drop-shadow(0 2px 4px rgba(22, 27, 44, 0.18));
}

.yp-sp__card-name {
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1.25;
}

.yp-sp__card-meta {
	font-size: 0.8125rem;
	color: var(--sp-muted);
}

.yp-sp__panel {
	position: sticky;
	top: 1.5rem;
	background: var(--sp-card);
	border: 1px solid var(--sp-line);
	border-radius: 16px;
	padding: 1.25rem;
	box-shadow: 0 4px 18px rgba(22, 27, 44, 0.06);
}

.yp-sp__preview {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 1.25rem 0.5rem 0.75rem;
	margin: -0.25rem -0.25rem 1.25rem;
	background: var(--sp-soft);
	border-radius: 12px;
}

.yp-sp__preview canvas {
	max-width: 100%;
	height: auto;
	filter: drop-shadow(0 4px 10px rgba(22, 27, 44, 0.22));
}

.yp-sp__size {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--sp-muted);
	text-align: center;
}

.yp-sp__fields {
	display: grid;
	gap: 0.875rem;
	margin-bottom: 1.25rem;
}

.yp-sp__field[hidden] {
	display: none;
}

.yp-sp__field label {
	display: block;
	font-weight: 600;
	font-size: 0.875rem;
	margin-bottom: 0.25rem;
}

.yp-sp__field input[type="text"],
.yp-sp__field input[type="url"],
.yp-sp__field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.625rem 0.75rem;
	border: 1px solid #C9CEDB;
	border-radius: 10px;
	font: inherit;
	font-size: 1rem;
}

.yp-sp__field input[type="file"] {
	font-size: 0.875rem;
	max-width: 100%;
}

.yp-sp__hint {
	margin: 0.25rem 0 0;
	font-size: 0.8125rem;
	color: var(--sp-muted);
	line-height: 1.4;
}

.yp-sp__hint:empty {
	display: none;
}

.yp-sp__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}

.yp-sp__chip {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	padding: 0.5rem 0.875rem;
	border: 2px solid var(--sp-line);
	border-radius: 10px;
	background: #fff;
	font: inherit;
	font-size: 0.875rem;
	color: inherit;
	cursor: pointer;
}

.yp-sp__chip small {
	font-size: 0.6875rem;
	color: var(--sp-muted);
}

.yp-sp__chip b {
	font-size: 1rem;
}

.yp-sp__chip[aria-checked="true"] {
	border-color: var(--sp-accent);
	background: #FFF2F8;
}

.yp-sp__chips--packs .yp-sp__chip {
	flex: 1 1 0;
	min-width: 0;
}

.yp-sp__total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	border-top: 1px solid var(--sp-line);
	padding-top: 0.875rem;
	font-size: 1rem;
}

.yp-sp__total strong {
	font-family: var(--sp-head);
	font-size: 1.5rem;
}

.yp-sp__each {
	margin: 0.125rem 0 1rem;
	font-size: 0.8125rem;
	color: var(--sp-muted);
}

.yp-sp__add {
	width: 100%;
	justify-content: center;
}

.yp-sp__add[disabled] {
	opacity: 0.6;
	cursor: wait;
}

.yp-sp__note {
	margin-top: 0.75rem;
	font-size: 0.875rem;
	line-height: 1.4;
}

.yp-sp__note.is-error {
	color: #B42318;
}

@media (max-width: 860px) {
	.yp-sp__layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.yp-sp__panel {
		position: static;
	}

	.yp-sp__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.625rem;
	}

	.yp-sp__card canvas {
		width: 96px;
		height: 96px;
	}
}

/* Collections as tabs: thank-you, vial tops, candle & jar. */
.yp-sp__tabs {
	display: flex;
	gap: 0.375rem;
	flex-wrap: wrap;
	margin: 0.75rem 0 1rem;
	padding: 0.3rem;
	background: var(--sp-soft);
	border-radius: 14px;
	width: fit-content;
	max-width: 100%;
}

.yp-sp__tabs[hidden] {
	display: none;
}

.yp-sp__tab {
	border: 0;
	background: transparent;
	border-radius: 10px;
	padding: 0.55rem 1rem;
	font: inherit;
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--sp-muted);
	cursor: pointer;
}

.yp-sp__tab[aria-selected="true"] {
	background: #fff;
	color: var(--sp-ink);
	box-shadow: 0 1px 4px rgba(22, 27, 44, 0.12);
}

.yp-sp__tab:focus-visible,
.yp-sp__swatch:focus-visible {
	outline: 3px solid #2E5BD8;
	outline-offset: 2px;
}

.yp-sp__card-fits {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--sp-accent);
}

.yp-sp__chip--pack small {
	font-size: 0.6875rem;
	color: var(--sp-muted);
}

.yp-sp__label {
	display: block;
	font-weight: 600;
	font-size: 0.875rem;
	margin-bottom: 0.375rem;
}

.yp-sp__swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.yp-sp__swatch {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 3px solid #fff;
	box-shadow: 0 0 0 1px #C9CEDB;
	cursor: pointer;
	padding: 0;
}

.yp-sp__swatch[aria-checked="true"] {
	box-shadow: 0 0 0 2px var(--sp-ink);
}

.yp-sp__field select {
	width: 100%;
	box-sizing: border-box;
	padding: 0.625rem 0.75rem;
	border: 1px solid #C9CEDB;
	border-radius: 10px;
	font: inherit;
	font-size: 1rem;
	background: #fff;
	margin-bottom: 0.5rem;
}

.yp-sp__field select[hidden],
.yp-sp__short-new[hidden] {
	display: none;
}

.yp-sp__short-new label {
	font-weight: 500;
}

.yp-sp__field textarea {
	resize: vertical;
	min-height: 9rem;
	line-height: 1.4;
	text-transform: uppercase;
}

/* Candle front: the matching bottom labels. */
.yp-sp__bundle {
	border: 1px dashed #C9CEDB;
	border-radius: 12px;
	padding: 0.75rem 0.875rem;
}

.yp-sp__field .yp-sp__check {
	display: flex;
	gap: 0.625rem;
	align-items: flex-start;
	font-weight: 600;
	margin: 0;
	cursor: pointer;
}

.yp-sp__check input {
	margin-top: 0.2rem;
	width: 1.125rem;
	height: 1.125rem;
	accent-color: #E6007E;
	flex: none;
}

.yp-sp__check b {
	color: #E6007E;
	margin-left: 0.25rem;
}

.yp-sp__check small {
	display: block;
	font-weight: 400;
	color: #5B6275;
	margin-top: 0.125rem;
}

.yp-sp__bundle-more {
	display: flex;
	gap: 0.875rem;
	align-items: flex-start;
	margin-top: 0.75rem;
}

.yp-sp__bundle-more[hidden] {
	display: none;
}

.yp-sp__bundle-more > div {
	flex: 1;
	min-width: 0;
}

.yp-sp__bundle-more label {
	font-weight: 500;
}

.yp-sp__bundle-more input {
	margin-bottom: 0.5rem;
}

.yp-sp__bundle-more canvas {
	flex: none;
	width: 110px;
	height: 110px;
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(22, 27, 44, 0.18);
}

/* ---------- Vial tab: "Match a label order" ---------- */

.yp-sp__match {
	margin: 0 0 1.5rem;
	max-width: 720px;
}

.yp-sp__match-order {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 700;
	font-size: var(--wp--preset--font-size--small);
	margin-bottom: 0.6rem;
}

.yp-sp__match-order select {
	font: inherit;
	padding: 0.3rem 0.5rem;
	border-radius: 8px;
	border: 1px solid #c9cedb;
}

.yp-sp__match-rows {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}

.yp-sp__match-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.45rem 0.6rem;
	border: 1px solid #e3e6ee;
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
}

.yp-sp__match-row svg {
	flex: none;
}

.yp-sp__match-row span {
	display: flex;
	flex-direction: column;
	min-width: 0;
	font-size: 0.9rem;
}

.yp-sp__match-row small {
	color: var(--wp--preset--color--charcoal);
	font-size: 0.75rem;
}

.yp-sp__match .yp-sp__match-modes {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.yp-sp__match-total {
	display: flex;
	justify-content: space-between;
	margin: 0.75rem 0 0.6rem;
	padding-top: 0.5rem;
	border-top: 1px solid #e3e6ee;
}

.yp-sp__match-total b {
	font-size: 1.15rem;
}

.yp-sp__match [data-sp-match-add][disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}

.yp-sp__match-note {
	margin: 0.5rem 0 0;
	font-size: var(--wp--preset--font-size--small);
}

.yp-sp__match-note.is-error {
	color: #b3261e;
}

/* ---------- Candle & jar designs: 3D preview ---------- */

.yp-sp__views {
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(22, 27, 44, 0.12);
}

.yp-sp__views[hidden] {
	display: none;
}

.yp-sp__views button {
	border: 0;
	border-radius: 999px;
	padding: 0.4rem 0.9rem;
	background: transparent;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--sp-muted);
	cursor: pointer;
}

.yp-sp__views button[aria-pressed="true"] {
	background: var(--wp--preset--color--near-black, #161b2c);
	color: #fff;
}

.yp-sp__stage {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	max-height: 440px;
	border-radius: 12px;
	overflow: hidden;
	background: linear-gradient(#eeebe5, #c9c4ba);
}

.yp-sp__stage[hidden],
.yp-sp__preview canvas[hidden] {
	display: none;
}

.yp-sp__stage .yp-vial3d__canvas {
	filter: none;
}

.yp-sp__glass {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	display: flex;
	gap: 6px;
	padding: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.yp-sp__glass[hidden] {
	display: none;
}

.yp-sp__glass button {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.18);
	padding: 0;
	cursor: pointer;
}

.yp-sp__glass button[aria-pressed="true"] {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #161b2c;
}
