/**
 * Popup wyboru tekstury — karta produktu i konfigurator (wcp-texture-modal.js).
 * Ze strony dziedziczony jest wyłącznie font-family.
 */
.wcp-teaser-texture-modal,
.wcp-teaser-texture-modal *:not(img) {
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

.wcp-teaser-texture-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.wcp-teaser-texture-modal.is-open {
	display: flex;
}

.wcp-teaser-texture-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.wcp-teaser-texture-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(960px, 100%);
	max-height: min(92vh, 900px);
	overflow: auto;
	margin: 0;
	padding: 56px 56px 28px 28px;
	border-radius: 5px;
	background: #fff;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	box-sizing: border-box;
	font-size: 14px;
	font-weight: 400;
	font-style: normal;
	line-height: 1.5;
	color: #111;
	text-align: left;
}

.wcp-teaser-texture-modal__close {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 4px;
	background: #f0f0f0;
	background-color: #f0f0f0;
	color: #111;
	font-size: 28px;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
	text-decoration: none;
}

.wcp-teaser-texture-modal__close:hover,
.wcp-teaser-texture-modal__close:focus {
	background: #111;
	background-color: #111;
	color: #fff;
}

.wcp-teaser-texture-modal__close:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
	background: #111;
	background-color: #111;
	color: #fff;
}

.wcp-teaser-texture-modal__main {
	display: grid;
	grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
	gap: 20px 32px;
	align-items: start;
	margin-bottom: 20px;
	max-width: 100%;
}

.wcp-teaser-texture-modal__list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wcp-teaser-texture-modal__list-btn {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	margin: 0;
	padding: 10px 18px;
	border: 1px solid #e2e2e2;
	border-radius: 5px;
	background: #f5f5f5;
	background-color: #f5f5f5;
	color: #111;
	font-size: 15px;
	font-weight: 400;
	font-style: normal;
	line-height: 1.3;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
	box-shadow: none;
	transition:
		border-color 0.12s ease,
		background-color 0.12s ease,
		color 0.12s ease;
}

.wcp-teaser-texture-modal__list-btn:hover,
.wcp-teaser-texture-modal__list-btn.is-selected {
	border-color: #111;
	background: #111;
	background-color: #111;
	color: #fff;
	box-shadow: none;
}

.wcp-teaser-texture-modal__list-btn:focus {
	outline: none;
}

.wcp-teaser-texture-modal__list-btn:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

.wcp-teaser-texture-modal__preview-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	width: 100%;
	min-width: 0;
	justify-self: center;
}

.wcp-teaser-texture-modal__preview {
	display: flex;
	align-items: center;
	justify-content: center;
	width: max-content;
	max-width: 100%;
	min-height: 0;
	margin: 0 auto;
	padding: 0;
	background: #f3f5f8;
	border-radius: 4px;
	overflow: hidden;
	line-height: 0;
}

.wcp-teaser-texture-modal__confirm {
	-webkit-appearance: none;
	appearance: none;
	display: inline-block;
	margin: 0;
	padding: 12px 28px;
	border: 1px solid #111;
	border-radius: 5px;
	background: #111;
	background-color: #111;
	color: #fff;
	font-size: 15px;
	font-weight: 400;
	font-style: normal;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
	box-shadow: none;
	transition:
		border-color 0.12s ease,
		background-color 0.12s ease,
		color 0.12s ease;
}

.wcp-teaser-texture-modal__confirm:hover,
.wcp-teaser-texture-modal__confirm:focus {
	border-color: #111;
	background: #111;
	background-color: #111;
	color: #fff;
}

.wcp-teaser-texture-modal__confirm:focus {
	outline: none;
}

.wcp-teaser-texture-modal__confirm:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

.wcp-teaser-texture-modal__preview-img {
	display: block;
	width: auto;
	max-width: min(100%, calc(960px - 280px));
	height: auto;
	max-height: min(52vh, 480px);
	margin: 0 auto;
	object-fit: contain;
}

.wcp-teaser-texture-modal__details {
	margin: 0;
	padding: 0;
}

.wcp-teaser-texture-modal__detail-name {
	margin: 10px 0 10px;
	padding: 0;
	font-size: 22px;
	font-weight: 500;
	font-style: normal;
	line-height: 26px;
	color: #111;
}

.wcp-teaser-texture-modal__detail-desc {
	margin: 0 0 14px;
	padding: 0;
	font-size: 16px;
	font-weight: 400;
	font-style: normal;
	line-height: 22px;
	color: #333;
}

.wcp-teaser-texture-modal__detail-desc:empty {
	display: none;
	margin: 0;
}

.wcp-teaser-texture-modal__detail-eco {
	margin: 0 0 14px;
	padding: 0;
}

.wcp-teaser-texture-modal__detail-eco[hidden] {
	display: none;
}

.wcp-teaser-texture-modal__eco-img {
	display: block;
	max-width: 120px;
	height: auto;
}

.wcp-teaser-texture-modal__detail-params[hidden] {
	display: none;
}

.wcp-teaser-texture-modal__params-title {
	margin: 0 0 8px;
	padding: 0;
	font-size: 14px;
	font-weight: 700;
	font-style: normal;
	line-height: 1.4;
	color: #555;
}

.wcp-teaser-texture-modal__params-list {
	margin: 0;
	padding: 0 0 0 1.2em;
	font-size: 14px;
	font-weight: 400;
	font-style: normal;
	line-height: 1.5;
	color: #333;
	list-style: disc;
}

.wcp-teaser-texture-modal__params-list li {
	margin: 0 0 4px;
	padding: 0;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	color: #333;
}

@media (max-width: 767px) {
	.wcp-teaser-texture-modal {
		align-items: stretch;
		justify-content: flex-end;
		padding: 0;
	}

	.wcp-teaser-texture-modal__dialog {
		width: 100%;
		max-width: 100%;
		max-height: 100vh;
		max-height: 100dvh;
		margin: 0;
		padding:
			max(12px, env(safe-area-inset-top, 0px))
			16px
			max(16px, env(safe-area-inset-bottom, 0px))
			16px;
		padding-top: max(48px, calc(12px + env(safe-area-inset-top, 0px)));
		border-radius: 12px 12px 0 0;
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.wcp-teaser-texture-modal__close {
		top: max(10px, env(safe-area-inset-top, 0px));
		right: max(10px, env(safe-area-inset-right, 0px));
		width: 44px;
		height: 44px;
		font-size: 26px;
	}

	.wcp-teaser-texture-modal__main {
		grid-template-columns: 1fr;
		gap: 20px;
		margin-bottom: 16px;
	}

	.wcp-teaser-texture-modal__list {
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 8px;
		width: 100% !important;
		min-width: 0 !important;
		max-width: 100%;
	}

	.wcp-teaser-texture-modal__list-btn {
		width: 100% !important;
		min-width: 0 !important;
		max-width: none !important;
		padding: 12px 16px;
		font-size: 16px;
		text-align: center;
	}

	.wcp-teaser-texture-modal__preview-col {
		align-items: stretch;
		gap: 12px;
		width: 100%;
	}

	.wcp-teaser-texture-modal__preview {
		width: 100%;
		max-width: 100%;
		margin: 0;
	}

	.wcp-teaser-texture-modal__preview-img {
		width: 100%;
		max-width: 100%;
		max-height: min(38vh, 320px);
	}

	.wcp-teaser-texture-modal__confirm {
		display: block;
		width: 100%;
		max-width: 100%;
		padding: 14px 20px;
		font-size: 16px;
	}

	.wcp-teaser-texture-modal__detail-name {
		font-size: 20px;
		line-height: 1.25;
		text-align: center;
	}

	.wcp-teaser-texture-modal__detail-desc {
		font-size: 15px;
		line-height: 1.45;
	}

	.wcp-teaser-texture-modal__detail-eco {
		text-align: center;
	}

	.wcp-teaser-texture-modal__eco-img {
		margin-inline: auto;
	}

	.wcp-teaser-texture-modal__params-title,
	.wcp-teaser-texture-modal__params-list {
		font-size: 14px;
	}
}
