/* Product configurator, layout of board G (stage 2b). Colours: the site's tokens, with fallbacks. */

.op-configurator {
	--op-cobalt: var(--wp--preset--color--primary, #1E4FD8);
	--op-cobalt-dark: var(--wp--preset--color--primary-dark, #1740B0);
	--op-cobalt-soft: var(--wp--preset--color--primary-soft, #E9EFFD);
	--op-yellow: var(--wp--preset--color--accent, #FFC529);
	--op-yellow-dark: var(--wp--preset--color--accent-dark, #F2B400);
	--op-ink: var(--wp--preset--color--ink, #0D1B3D);
	--op-text: var(--wp--preset--color--text, #1A2238);
	--op-display: var(--wp--preset--font-family--display, "Plus Jakarta Sans", sans-serif);
	--op-text-2: var(--wp--preset--color--text-2, #55607A);
	--op-text-3: var(--wp--preset--color--text-3, #55607A);
	--op-text-4: var(--wp--preset--color--text-4, #1A2238);
	--op-line: var(--wp--preset--color--line, #D8DFEE);
	--op-line-strong: var(--wp--preset--color--line-strong, #7C88A6);
	--op-surface: var(--wp--preset--color--surface, #E6EBF5);
	--op-base: var(--wp--preset--color--base, #F3F6FC);
	display: flex;
	flex-direction: column;
	gap: 22px;
	color: var(--op-text);
}

/* Zero specificity, so the weights and sizes below win. */
:where(.op-configurator) :where(button, input, textarea) {
	font: inherit;
}

.op-configurator :where(button, a, input, textarea, label):focus-visible,
.op-upload__input:focus-visible + .op-upload__button {
	outline: 2px solid var(--op-cobalt);
	outline-offset: 3px;
}

.op-block,
.op-positions {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.op-block[hidden] {
	display: none;
}

.op-field {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.op-legend {
	display: block;
	padding: 0;
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 700;
}

.op-note {
	margin: 8px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--op-text-2);
}

/* ---------- Price and date, under the first paragraph ---------- */

.op-pricebar {
	border-top: 1px solid var(--op-line);
	border-bottom: 1px solid var(--op-line);
	padding: 16px 0;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
}

.op-price,
.op-price__delivery {
	margin: 0;
}

.op-price__value {
	font-family: var(--op-display);
	font-size: 34px;
	font-weight: 800;
	line-height: 1.1;
	color: var(--op-ink);
	font-variant-numeric: tabular-nums;
}

.op-price__sub {
	font-size: 15px;
	color: var(--op-text-2);
}

.op-price__delivery {
	font-size: 15px;
	line-height: 1.45;
	flex: 1 1 260px;
}

/* ---------- Choices ---------- */

.op-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.op-swatch {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1.5px solid var(--op-line-strong);
	box-shadow: inset 0 0 0 3px var(--op-base);
	padding: 0;
	cursor: pointer;
	transition: border-color 160ms ease;
}

.op-swatch.is-on {
	border: 2px solid var(--op-cobalt);
}

.op-chips {
	display: grid;
	gap: 6px;
}

.op-chips--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.op-chips--auto {
	grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.op-chips--qty {
	grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
}

.op-chip {
	min-height: 52px;
	padding: 6px 12px;
	text-align: left;
	border-radius: 10px;
	border: 1.5px solid var(--op-line-strong);
	background: #ffffff;
	color: var(--op-text);
	line-height: 1.25;
	cursor: pointer;
	transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.op-chip:hover {
	border-color: var(--op-cobalt);
}

.op-chip.is-on {
	background: var(--op-cobalt);
	border-color: var(--op-cobalt);
	color: #ffffff;
}

.op-chip--tall {
	min-height: 56px;
}

.op-chip--short {
	min-height: 44px;
	text-align: center;
	font-weight: 700;
	font-size: 15px;
}

.op-chip.is-blocked {
	opacity: 0.45;
	cursor: not-allowed;
}

.op-chip.is-blocked:hover {
	border-color: var(--op-line-strong);
}

.op-chip__name {
	display: block;
	font-weight: 600;
	font-size: 15px;
}

.op-chip__sub {
	display: block;
	font-size: 12px;
	opacity: 0.85;
}

/* ---------- Several colours and sizes in one configuration ---------- */

.op-more {
	align-self: flex-start;
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--op-cobalt);
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

.op-lineslist {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.op-lineslist li {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 4px 4px 4px 12px;
	border: 1px solid var(--op-line);
	border-radius: 10px;
	background: #ffffff;
}

.op-lineslist__dot {
	flex: none;
	display: inline-block;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(13, 27, 61, 0.25);
	vertical-align: middle;
	margin-right: 6px;
}

.op-lineslist__name {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 600;
}

.op-lineslist__stock,
.op-matrix__stock {
	font-size: 12px;
	color: var(--op-text-2);
	white-space: nowrap;
}

.op-cellqty {
	width: 84px;
	height: 44px;
	box-sizing: border-box;
	padding: 0 8px;
	border: 1.5px solid var(--op-line-strong);
	border-radius: 6px;
	background: #ffffff;
	text-align: right;
}

.op-lines-total {
	margin: 10px 0 0;
	font-weight: 700;
}

.op-matrix-wrap {
	overflow-x: auto;
}

/* Every size on one line, no scrolling (02.11.2026): equal columns that shrink with the panel. */
.op-matrix {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 13px;
	margin-top: 12px;
}

.op-matrix th,
.op-matrix td {
	padding: 5px 2px;
	text-align: center;
	vertical-align: top;
	border-bottom: 1px solid var(--op-surface);
}

.op-matrix thead th {
	font-weight: 600;
	color: var(--op-text-2);
}

.op-matrix th[scope="row"],
.op-matrix thead th:first-child {
	width: 7.5em;
	text-align: left;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.op-matrix td .op-matrix__stock {
	display: block;
	margin-top: 2px;
	font-size: 11px;
}

.op-matrix .op-cellqty {
	width: 100%;
	min-width: 0;
	height: 40px;
	padding: 0 2px;
	text-align: center;
	-moz-appearance: textfield;
}

.op-matrix .op-cellqty::-webkit-outer-spin-button,
.op-matrix .op-cellqty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.op-matrix__none {
	color: var(--op-text-2);
}

.op-matrix-phone {
	display: none;
}

.op-swatch.has-qty {
	box-shadow: inset 0 0 0 3px var(--op-base), 0 0 0 3px var(--op-cobalt-soft);
}

@media (max-width: 899px) {
	.op-matrix-wrap {
		display: none;
	}

	.op-matrix-phone {
		display: block;
	}

	.op-matrix-phone .op-legend {
		margin-top: 12px;
		display: flex;
		align-items: center;
	}
}

/* ---------- Your positions ---------- */

.op-yours {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.op-yours .op-legend {
	margin: 0;
}

.op-row {
	display: flex;
	align-items: center;
	gap: 6px;
	border: 1.5px solid var(--op-line-strong);
	background: #ffffff;
	border-radius: 10px;
	padding: 4px 4px 4px 12px;
}

.op-row.is-on {
	border-color: var(--op-cobalt);
	background: var(--op-cobalt-soft);
}

.op-row__pick {
	flex: 1;
	min-width: 0;
	min-height: 48px;
	padding: 0;
	text-align: left;
	background: transparent;
	border: 0;
	color: var(--op-text);
	line-height: 1.3;
	cursor: pointer;
}

.op-row__pick .op-chip__sub {
	color: var(--op-text-3);
	opacity: 1;
}

.op-row__remove {
	width: 44px;
	height: 44px;
	flex: none;
	border: 0;
	background: transparent;
	color: var(--op-text-2);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.op-add {
	min-height: 46px;
	border: 1.5px dashed var(--op-cobalt);
	border-radius: 10px;
	background: transparent;
	color: var(--op-cobalt);
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
}

.op-yours .op-note {
	margin: 0;
}

/* ---------- Quantity ---------- */

.op-qty {
	margin: 8px 0 0;
	font-size: 14px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
}

.op-qty label,
.op-qty__hint {
	color: var(--op-text-3);
}

.op-qty input {
	width: 110px;
	height: 44px;
	border: 1.5px solid var(--op-line-strong);
	border-radius: 6px;
	padding: 0 10px;
	box-sizing: border-box;
	background: #ffffff;
}

/* ---------- Notices ---------- */

.op-notice {
	margin: 10px 0 0;
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px 12px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--op-text);
	background: var(--wp--preset--color--primary-soft, #E9EFFD);
	border: 1px solid var(--wp--preset--color--primary-line, #C3D1F5);
}

.op-notice.is-warning {
	background: var(--wp--preset--color--warning-soft, #FFF6DB);
	border-color: var(--wp--preset--color--warning-line, #F5D77A);
}

.op-notice.is-error {
	background: var(--wp--preset--color--error-soft, #FDEDEB);
	border-color: var(--wp--preset--color--error-line, #F2C4BE);
	color: var(--wp--preset--color--error, #B42318);
	display: block;
}

/* Is the logo good for print (stage 2c): under the upload. */
.op-logocheck {
	margin: 8px 0 0;
	padding: 8px 12px;
	border: 1px solid var(--op-line);
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--op-text);
	background: var(--op-base);
}

.op-logocheck[hidden] {
	display: none;
}

.op-logocheck[data-tone="ok"] {
	background: var(--wp--preset--color--success-soft, #E7F4EC);
	border-color: var(--wp--preset--color--success-line, #A8D5BC);
}

.op-logocheck[data-tone="warning"] {
	background: var(--wp--preset--color--warning-soft, #FFF6DB);
	border-color: var(--wp--preset--color--warning-line, #F5D77A);
}

.op-logocheck[data-tone="error"] {
	background: var(--wp--preset--color--error-soft, #FDEDEB);
	border-color: var(--wp--preset--color--error-line, #F2C4BE);
}

.op-notice__mark {
	flex: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--wp--preset--color--warning-text, #7A5600);
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* ---------- Logo upload ---------- */

.op-upload {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
}

.op-upload__input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

.op-upload__button {
	min-height: 44px;
	padding: 0 18px;
	display: inline-flex;
	align-items: center;
	border: 1.5px dashed var(--op-cobalt);
	border-radius: 10px;
	color: var(--op-cobalt);
	font-weight: 700;
	cursor: pointer;
}

.op-upload .op-note {
	margin: 0;
	flex: 1 1 220px;
}

/* ---------- Summary ---------- */

.op-summary {
	background: #ffffff;
	border: 1px solid var(--op-line);
	border-radius: 10px;
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.op-summary p {
	margin: 0;
}

.op-summary__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 16px;
}

.op-summary__what {
	font-size: 15px;
	color: var(--op-text-3);
}

.op-summary__amount {
	font-family: var(--op-display);
	font-size: 26px;
	font-weight: 800;
	color: var(--op-ink);
	font-variant-numeric: tabular-nums;
}

.op-summary__vat {
	font-size: 14px;
	color: var(--op-text-2);
}

.op-breakdown {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	border-top: 1px solid var(--op-surface);
}

.op-breakdown li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid var(--op-surface);
	color: var(--op-text-4);
}

.op-breakdown__price {
	white-space: nowrap;
	font-weight: 600;
	color: var(--op-text);
	font-variant-numeric: tabular-nums;
}

.op-breakdown li.op-breakdown__total {
	border-bottom: 0;
	padding-bottom: 0;
	font-weight: 700;
	color: var(--op-text);
}

.op-breakdown__total .op-breakdown__price {
	color: var(--op-ink);
}

.op-summary__min {
	font-size: 14px;
	color: var(--op-text-3);
}

.op-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.op-cta {
	flex: 1 1 200px;
	min-height: 54px;
	padding: 0 16px;
	border-radius: 10px;
	font-family: var(--op-display);
	font-weight: 700;
	font-size: 16px;
	cursor: pointer;
	transition: background-color 200ms ease, transform 120ms ease;
}

.op-cta:active {
	transform: scale(0.98);
}

.op-cta[hidden] {
	display: none;
}

.op-cta--cart {
	border: 0;
	background: var(--op-yellow);
	color: var(--op-ink);
}

.op-cta--cart:hover {
	background: var(--op-yellow-dark);
	color: var(--op-ink);
}

.op-cta--cart.is-added {
	background: var(--wp--preset--color--success, #1C7C4A);
	color: #ffffff;
}

.op-cta[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}

.op-cta--line {
	flex: 1 1 160px;
	border: 1.5px solid var(--op-cobalt);
	background: transparent;
	color: var(--op-cobalt);
}

.op-cta--line:hover {
	background: var(--op-cobalt-soft);
}

.op-added {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 14px;
	padding: 10px 12px;
	border-radius: 10px;
	background: var(--wp--preset--color--success-soft, #E7F4EC);
	border: 1px solid var(--wp--preset--color--success-line, #A8D5BC);
	font-size: 14px;
	animation: op-apare 220ms ease;
}

.op-added strong {
	color: var(--wp--preset--color--success, #1C7C4A);
}

.op-added a {
	font-weight: 700;
	white-space: nowrap;
}

@keyframes op-apare {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: none; }
}

.op-ask {
	font-size: 14px;
}

.op-ask a {
	font-weight: 700;
}

/* ---------- Quote request ---------- */

.op-request-box[hidden] {
	display: none;
}

.op-request {
	background: #ffffff;
	border: 1px solid var(--op-line);
	border-radius: 10px;
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* In the column the CTA's flex basis (200px, meant for a row of buttons) became its height. */
.op-request .op-cta {
	flex: none;
}

/* The logo's row above "Trimite cererea" (03.11.2026). */
.op-request__logo {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 12px 14px;
	border-radius: 8px;
	background: var(--op-base, #f3f6fc);
}

.op-request__logo[hidden] {
	display: none;
}

.op-request__logo p {
	margin: 0;
}

.op-request__logo button.op-upload__button {
	background: #ffffff;
	font: inherit;
	font-weight: 700;
}

.op-linkbtn {
	padding: 0;
	border: 0;
	background: none;
	color: var(--op-cobalt);
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

.op-input label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 4px;
}

.op-input input,
.op-input textarea {
	width: 100%;
	box-sizing: border-box;
	min-height: 44px;
	padding: 8px 10px;
	border: 1.5px solid var(--op-line-strong);
	border-radius: 6px;
	background: #ffffff;
}

.op-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Mobile: total and cart button fixed at the bottom ---------- */

.op-sticky {
	display: none;
}

@media (max-width: 899px) {
	.op-sticky {
		position: fixed;
		z-index: 40;
		left: 0;
		right: 0;
		bottom: 0;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
		background: var(--op-base);
		border-top: 1px solid var(--op-line);
		box-shadow: 0 -6px 18px rgba(13, 27, 61, 0.08);
	}

	.op-sticky__sum {
		display: flex;
		flex-direction: column;
		min-width: 0;
	}

	.op-sticky__total {
		font-family: var(--op-display);
		font-size: 20px;
		font-weight: 800;
		color: var(--op-ink);
		font-variant-numeric: tabular-nums;
	}

	.op-sticky__what {
		font-size: 12px;
		color: var(--op-text-2);
	}

	.op-sticky .op-cta {
		flex: 0 0 auto;
		min-height: 48px;
	}

	.op-price__value {
		font-size: 30px;
	}

	/* Room for the fixed bar at the end of the page. */
	body:has(.op-sticky) {
		padding-bottom: 76px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.op-swatch,
	.op-chip,
	.op-cta,
	.op-added {
		transition: none;
		animation: none;
	}
}
