/* WPLB Print Woo — кнопка «Печать» под ценой + модалка выбора места печати. */

.wpw-req {
	color: #c8102e;
}

/* Кнопка-лаунчер под ценой.
   Merchant: .summary-price-box { display:flex; align-items:center } без переноса,
   поэтому разрешаем перенос и делаем блок на всю ширину — он уходит под цену. */
.summary-price-box {
	flex-wrap: wrap;
}

.wpw-launch {
	display: block;
	clear: both;
	width: 100%;
	max-width: 100%;
	flex-basis: 100%;
	margin: 16px 0 20px;
}

.wpw-launch-btn {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	margin: 0;
	padding: 14px 18px;
	border: 1.5px solid rgba(0, 0, 0, .16);
	border-radius: 14px;
	background: #fff;
	cursor: pointer;
	text-align: left;
	line-height: 1.3;
	box-shadow: none;
	transition: border-color .15s, background .15s, box-shadow .15s;
}

.wpw-launch-btn:hover {
	border-color: #c8102e;
	box-shadow: 0 2px 12px rgba(200, 16, 46, .12);
}

.wpw-launch-btn.has-print {
	border-color: #c8102e;
	background: rgba(200, 16, 46, .05);
}

.wpw-launch-ico {
	flex: 0 0 auto;
	font-size: 26px;
	line-height: 1;
}

.wpw-launch-main {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1 1 auto;
	min-width: 0;
	text-align: left;
}

.wpw-launch-txt {
	display: block;
	margin: 0;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .08em;
	text-transform: uppercase;
	opacity: .5;
	color: var(--wpw-ink, #111);
}

.wpw-launch-val {
	display: block;
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--wpw-ink, #111);
	white-space: normal;
	overflow-wrap: anywhere;
}

.wpw-launch-edit {
	flex: 0 0 auto;
	align-self: center;
	font-size: 14px;
	font-weight: 600;
	color: #c8102e;
	white-space: nowrap;
}

/* Модалка */
body.wpw-modal-open {
	overflow: hidden;
}

.wpw-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.wpw-modal.is-open {
	display: flex;
}

.wpw-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .5);
}

.wpw-modal-box {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 460px;
	max-height: 90vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 16px;
	padding: 22px 22px 20px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

.wpw-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .06);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #333;
	padding: 0;
}

.wpw-modal-close:hover {
	background: rgba(0, 0, 0, .12);
}

.wpw-modal-box .wpw-title {
	font-size: 18px;
	font-weight: 600;
	color: var(--wpw-ink, #111);
	margin: 0 34px 16px 0;
}

.wpw-modal-done {
	display: block;
	width: 100%;
	margin-top: 16px;
	padding: 13px 16px;
	border: 0;
	border-radius: 12px;
	background: #c8102e;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.wpw-modal-done:hover {
	background: #a50d26;
}

/* Превью зон печати */
.wpw-preview {
	display: flex;
	gap: 22px;
	justify-content: center;
	align-items: flex-end;
	margin: 0 0 18px;
	padding: 14px 0;
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 12px;
	background: rgba(0, 0, 0, .015);
}

.wpw-shirt {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.wpw-shirt svg {
	width: 108px;
	height: auto;
	display: block;
}

.wpw-shirt-cap {
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	opacity: .55;
}

.wpw-body {
	fill: #fff;
	stroke: #2b2b2b;
	stroke-width: 4;
	stroke-linejoin: round;
}

.wpw-zone {
	fill: transparent;
	stroke: #b7b2a8;
	stroke-width: 3;
	stroke-dasharray: 6 6;
	opacity: .7;
	transition: fill .2s, stroke .2s, opacity .2s;
}

.wpw-zone.on {
	fill: rgba(200, 16, 46, .18);
	stroke: #c8102e;
	stroke-dasharray: none;
	opacity: 1;
}

.wpw-tiles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

@media (max-width: 480px) {
	.wpw-tiles { grid-template-columns: 1fr; }
}

.wpw-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 12px 14px 12px 40px;
	border: 1.5px solid rgba(0, 0, 0, .14);
	border-radius: 12px;
	cursor: pointer;
	background: #fff;
	transition: border-color .15s, background .15s;
}

.wpw-tile:hover {
	border-color: rgba(0, 0, 0, .4);
}

.wpw-tile input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.wpw-tile .wpw-tile-dot {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1.5px solid rgba(0, 0, 0, .25);
	transition: .15s;
}

.wpw-tile .wpw-tile-name {
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
}

.wpw-tile .wpw-tile-add {
	font-size: 13px;
	opacity: .7;
	font-variant-numeric: tabular-nums;
}

/* Выбранный вариант — через :has и через JS-фолбэк .is-checked */
.wpw-tile:has(input:checked),
.wpw-tile.is-checked {
	border-color: #c8102e;
	background: rgba(200, 16, 46, .08);
}

.wpw-tile:has(input:checked) .wpw-tile-dot,
.wpw-tile.is-checked .wpw-tile-dot {
	border-color: #c8102e;
	background: #c8102e;
	box-shadow: inset 0 0 0 3px #fff;
}

.wpw-tile:has(input:checked) .wpw-tile-add,
.wpw-tile.is-checked .wpw-tile-add {
	opacity: 1;
	color: #8a0a1f;
	font-weight: 600;
}

.wpw-tile:has(input:focus-visible),
.wpw-tile.is-focus {
	outline: 2px solid #c8102e;
	outline-offset: 2px;
}

/* Загрузка макета */
.wpw-upload {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid rgba(0, 0, 0, .1);
}

.wpw-upload.is-hidden {
	display: none;
}

.wpw-upload-head {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 10px;
	color: var(--wpw-ink, #111);
}

.wpw-upload-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 18px 14px;
	border: 1.5px dashed rgba(0, 0, 0, .25);
	border-radius: 12px;
	cursor: pointer;
	text-align: center;
	transition: border-color .15s, background .15s;
}

.wpw-upload-drop:hover {
	border-color: #c8102e;
	background: rgba(200, 16, 46, .04);
}

.wpw-upload .wpw-file {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

.wpw-upload-cta {
	font-weight: 600;
	font-size: 15px;
	color: #c8102e;
}

.wpw-upload-hint {
	font-size: 12px;
	opacity: .55;
}

.wpw-upload.has-file .wpw-upload-drop {
	border-style: solid;
	border-color: #c8102e;
	background: rgba(200, 16, 46, .05);
}

.wpw-upload.is-uploading .wpw-upload-cta::after {
	content: ' …';
}

.wpw-upload-result {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
	padding: 8px 10px;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 10px;
}

.wpw-upload-thumb {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 8px;
	flex: 0 0 auto;
}

.wpw-upload-name {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 14px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wpw-upload-remove {
	flex: 0 0 auto;
	border: 0;
	background: none;
	color: #c0392b;
	font-size: 13px;
	cursor: pointer;
	padding: 4px 6px;
}

.wpw-upload-remove:hover {
	text-decoration: underline;
}

.wpw-upload-error {
	margin-top: 8px;
	color: #c0392b;
	font-size: 13px;
}
