/* TKS Színpaletta – frontend
   -------------------------------------------------- */

/* "Színek" blokk a termékoldalon */
.tksp-szinek {
	margin: 28px 0;
}

.tksp-szinek__cim {
	margin: 0 0 14px;
	font-size: 20px;
	line-height: 1.2;
	font-weight: 700;
	color: #4a4a4a;
}

.tksp-szinek__sor {
	display: flex;
	align-items: center;
	gap: 22px;
	flex-wrap: wrap;
}

/* Egymást átfedő kör alakú előnézetek */
.tksp-korok {
	display: flex;
	align-items: center;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.tksp-kor {
	display: block;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background-color: #cfcfcf;
	background-size: cover;
	background-position: center;
	box-shadow: 0 0 0 2px #fff;
	margin-left: -18px;
	flex: 0 0 auto;
}

.tksp-kor:first-child {
	margin-left: 0;
}

/* Zöld link */
.tksp-link {
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	font-family: inherit;
	font-size: 17px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--bricks-color-cufemv, #2e8b3d);
	text-align: left;
}

.tksp-link:hover,
.tksp-link:focus-visible {
	text-decoration: underline;
}

/* Popup
   -------------------------------------------------- */
.tksp-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.tksp-modal[hidden] {
	display: none;
}

.tksp-modal__hatter {
	position: absolute;
	inset: 0;
	background: rgba(250, 250, 250, 0.88);
}

.tksp-modal__doboz {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1120px;
	max-height: min(88vh, 940px);
	overflow-y: auto;
	background: #fff;
	border: 1px solid #3a3a3a;
	border-radius: 14px;
	padding: 44px 56px 56px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
	-webkit-overflow-scrolling: touch;
}

.tksp-modal__bezar {
	position: absolute;
	top: 16px;
	right: 20px;
	border: 0;
	background: none;
	padding: 6px 10px;
	font-size: 34px;
	line-height: 1;
	color: #222;
	cursor: pointer;
}

.tksp-modal__bezar:hover,
.tksp-modal__bezar:focus-visible {
	color: #000;
}

.tksp-modal__cim {
	margin: 0 0 22px;
	font-size: 30px;
	line-height: 1.2;
	font-weight: 800;
	color: #222;
}

.tksp-modal__bevezeto {
	margin: 0 0 32px;
	padding-bottom: 22px;
	border-bottom: 1px solid #ddd;
	font-size: 17px;
	line-height: 1.65;
	color: #333;
}

.tksp-modal__bevezeto p {
	margin: 0 0 8px;
}

.tksp-modal__bevezeto p:last-child {
	margin-bottom: 0;
}

/* Színminta rács */
.tksp-modal__racs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 44px 28px;
}

.tksp-minta {
	margin: 0;
	text-align: center;
}

.tksp-minta img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.tksp-minta figcaption {
	margin-top: 12px;
	font-size: 17px;
	font-weight: 700;
	color: #222;
}

/* Nyitott popup alatt ne görögjön az oldal */
body.tksp-modal-nyitva {
	overflow: hidden;
}

/* Mobil */
@media (max-width: 767px) {
	.tksp-modal {
		padding: 12px;
	}

	.tksp-modal__doboz {
		padding: 32px 18px 36px;
		max-height: 92vh;
	}

	.tksp-modal__cim {
		font-size: 24px;
	}

	.tksp-modal__racs {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
		gap: 28px 16px;
	}

	.tksp-kor {
		width: 42px;
		height: 42px;
		margin-left: -15px;
	}
}

/* Csökkentett mozgás preferencia tisztelete */
@media (prefers-reduced-motion: no-preference) {
	.tksp-modal__doboz {
		animation: tksp-be 0.18s ease-out;
	}

	@keyframes tksp-be {
		from {
			opacity: 0;
			transform: translateY(8px) scale(0.985);
		}
		to {
			opacity: 1;
			transform: none;
		}
	}
}
