/**
 * WORDthy Builder front-end styles.
 * Scoped under .wb so nothing here leaks into the rest of the theme.
 */

.wb {
	--wb-ink: #131a1e;
	--wb-ink-2: #3a4850;
	--wb-muted: #65777f;
	--wb-line: #d2dce1;
	--wb-surface: #fff;
	--wb-surface-2: #e7edf0;
	--wb-blue: #069;
	--wb-blue-deep: #004e75;
	--wb-blue-soft: #e2eff6;
	--wb-bad: #c41e3a;
	--wb-radius: 14px;

	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 44px;
	align-items: start;
	color: var(--wb-ink);
	font-size: 16px;
	line-height: 1.55;
}

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

.wb > * {
	min-width: 0;
}

@media (max-width: 960px) {
	.wb {
		grid-template-columns: 1fr;
		gap: 26px;
	}
}

.wb button {
	font: inherit;
	color: inherit;
	background: none;
	border: none;
	cursor: pointer;
	margin: 0;
}

.wb :focus-visible {
	outline: 3px solid var(--wb-blue);
	outline-offset: 2px;
	border-radius: 4px;
}

.wb h3 {
	font-size: 15px;
	font-weight: 700;
	margin: 0;
	line-height: 1.3;
}

.wb p {
	margin: 0;
}

/* ---------- stage ---------- */

.wb-stage-col {
	position: sticky;
	top: 24px;
}

@media (max-width: 960px) {
	.wb-stage-col {
		position: static;
	}
}

.wb-frame {
	background: var(--wb-surface);
	border: 1px solid var(--wb-line);
	border-radius: 20px;
	padding: 10px;
	position: relative;
	box-shadow: 0 1px 2px rgba(19, 26, 30, .06), 0 8px 24px -12px rgba(19, 26, 30, .18);
}

.wb-art {
	border-radius: 13px;
	overflow: hidden;
	position: relative;
}

.wb-mock {
	position: relative;
	aspect-ratio: 400 / 494;
	width: 100%;
}

.wb-mock svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	filter: drop-shadow(0 7px 16px rgba(0, 0, 0, .22));
}

.wb-print {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.wb-print img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.wb-pm {
	width: 100%;
	height: 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.wb-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 99px;
	background: var(--wb-surface);
	border: 1px solid var(--wb-line);
	display: grid;
	place-items: center;
	font-size: 22px;
	line-height: 1;
	z-index: 3;
	box-shadow: 0 1px 2px rgba(19, 26, 30, .06), 0 8px 24px -12px rgba(19, 26, 30, .18);
}

.wb-nav:hover {
	background: var(--wb-ink);
	color: #fff;
	border-color: var(--wb-ink);
}

.wb-prev {
	left: -16px;
}

.wb-next {
	right: -16px;
}

@media (max-width: 960px) {
	.wb-prev {
		left: 4px;
	}

	.wb-next {
		right: 4px;
	}
}

.wb-cap {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 14px 8px 4px;
	flex-wrap: wrap;
}

.wb-cap strong {
	font-size: 17px;
	font-weight: 800;
	letter-spacing: -.02em;
}

.wb-mono,
.wb-num {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	color: var(--wb-muted);
}

.wb-num {
	padding: 0 8px;
	font-size: 11px;
	letter-spacing: .08em;
}

/* ---------- steps ---------- */

.wb-step {
	border-top: 1px solid var(--wb-line);
	padding-block: 22px;
	min-width: 0;
}

.wb-step:first-child {
	border-top: none;
	padding-top: 0;
}

.wb-head {
	display: flex;
	align-items: center;
	gap: 11px;
	margin-bottom: 14px;
}

.wb-n {
	width: 23px;
	height: 23px;
	border-radius: 99px;
	background: var(--wb-ink);
	color: #fff;
	display: grid;
	place-items: center;
	font-family: ui-monospace, Menlo, monospace;
	font-size: 11.5px;
	flex: none;
}

.wb-pick {
	margin-left: auto;
	font-family: ui-monospace, Menlo, monospace;
	font-size: 12.5px;
	color: var(--wb-blue);
	text-align: right;
}

.wb-filt {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 12px;
	align-items: center;
}

.wb-fchip {
	padding: 6px 13px;
	border-radius: 99px;
	border: 1.5px solid var(--wb-line);
	font-size: 13px;
	font-weight: 600;
	color: var(--wb-ink-2);
	background: var(--wb-surface);
}

.wb-fchip:hover {
	border-color: var(--wb-ink);
}

.wb-fchip[aria-pressed="true"] {
	background: var(--wb-ink);
	color: #fff;
	border-color: var(--wb-ink);
}

.wb-search {
	flex: 1;
	min-width: 150px;
	padding: 8px 13px;
	border: 1.5px solid var(--wb-line);
	border-radius: 99px;
	background: var(--wb-surface);
	color: var(--wb-ink);
	font: inherit;
	font-size: 13.5px;
}

.wb-search:focus {
	outline: none;
	border-color: var(--wb-blue);
	box-shadow: 0 0 0 3px var(--wb-blue-soft);
}

.wb-rail {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 2px 4px 10px;
	margin-inline: -4px;
	max-width: 100%;
}

.wb-chip {
	flex: none;
	width: 98px;
	scroll-snap-align: start;
	border: 2px solid var(--wb-line);
	border-radius: 12px;
	background: var(--wb-surface);
	padding: 6px;
	color: var(--wb-ink);
}

.wb-chip:hover {
	border-color: var(--wb-blue-deep);
}

.wb-chip[aria-pressed="true"] {
	border-color: var(--wb-blue);
	box-shadow: 0 0 0 3px var(--wb-blue-soft);
}

.wb-thumb {
	aspect-ratio: 1 / 1;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 7px;
	background: var(--wb-surface-2);
	overflow: hidden;
}

.wb-thumb img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	object-fit: contain;
	display: block;
}

.wb-chip > span:last-child {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 10.5px;
	line-height: 1.28;
	font-weight: 600;
	margin-top: 5px;
	text-align: center;
	color: var(--wb-ink-2);
	min-height: 27px;
}

.wb-opts {
	display: flex;
	gap: 9px;
	flex-wrap: wrap;
}

.wb-opt {
	border: 1.5px solid var(--wb-line);
	background: var(--wb-surface);
	border-radius: 11px;
	padding: 10px 14px;
	text-align: left;
	min-width: 104px;
}

.wb-opt:hover {
	border-color: var(--wb-ink);
}

.wb-opt[aria-pressed="true"] {
	border-color: var(--wb-blue);
	background: var(--wb-blue-soft);
	box-shadow: inset 0 0 0 1px var(--wb-blue);
}

.wb-opt b {
	display: block;
	font-size: 13.5px;
}

.wb-opt span {
	font-family: ui-monospace, Menlo, monospace;
	font-size: 11.5px;
	color: var(--wb-muted);
}

.wb-sw {
	display: flex;
	gap: 9px;
	flex-wrap: wrap;
}

.wb-swatch {
	width: 36px;
	height: 36px;
	border-radius: 99px;
	position: relative;
	border: 2px solid var(--wb-line);
	padding: 0;
}

.wb-swatch i {
	position: absolute;
	inset: 3px;
	border-radius: 99px;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16);
}

.wb-swatch[aria-pressed="true"] {
	border-color: var(--wb-blue);
	box-shadow: 0 0 0 3px var(--wb-blue-soft);
}

.wb-sizes {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.wb-size {
	min-width: 52px;
	height: 44px;
	padding: 0 10px;
	border-radius: 11px;
	border: 1.5px solid var(--wb-line);
	background: var(--wb-surface);
	font-family: ui-monospace, Menlo, monospace;
	font-size: 13.5px;
}

.wb-size:hover {
	border-color: var(--wb-ink);
}

.wb-size[aria-pressed="true"] {
	border-color: var(--wb-blue);
	background: var(--wb-blue);
	color: #fff;
}

.wb-qty {
	display: inline-flex;
	align-items: center;
	border: 1.5px solid var(--wb-line);
	border-radius: 11px;
	background: var(--wb-surface);
	overflow: hidden;
}

.wb-qty button {
	width: 40px;
	height: 42px;
	font-size: 18px;
	color: var(--wb-ink-2);
}

.wb-qty button:hover {
	background: var(--wb-surface-2);
}

.wb-qty span {
	width: 44px;
	text-align: center;
	font-family: ui-monospace, Menlo, monospace;
	font-size: 14.5px;
}

.wb-note {
	font-size: 13px;
	color: var(--wb-muted);
	line-height: 1.5;
	margin-top: 10px;
}

.wb-err {
	color: var(--wb-bad);
	font-weight: 600;
}

.wb-more {
	font-family: ui-monospace, Menlo, monospace;
	font-size: 11.5px;
	color: var(--wb-blue);
	text-decoration: underline;
	text-underline-offset: 3px;
	margin-top: 10px;
	padding: 0;
}

.wb-add {
	border-top: 1px solid var(--wb-line);
	padding-top: 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.wb-total {
	font-size: 29px;
	font-weight: 800;
	letter-spacing: -.03em;
	line-height: 1.1;
}

.wb-total small {
	font-family: ui-monospace, Menlo, monospace;
	font-size: 11.5px;
	color: var(--wb-muted);
	letter-spacing: .06em;
	display: block;
	text-transform: uppercase;
	font-weight: 400;
}

.wb-btn {
	flex: 1;
	min-width: 190px;
	background: var(--wb-blue);
	color: #fff;
	border-radius: 99px;
	padding: 14px 24px;
	font-weight: 700;
	font-size: 15px;
	text-align: center;
}

.wb-btn:hover:not([disabled]) {
	background: var(--wb-blue-deep);
}

.wb-btn[disabled] {
	opacity: .55;
	cursor: not-allowed;
}

/* Cart thumbnail injected into the WooCommerce cart table. */
.wb-cart-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	padding: 5px;
	aspect-ratio: 1 / 1;
}

.wb-cart-thumb img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
	.wb * {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}
