/* AQ Produkty – [aq_kolorystyka] cards + RAL swatch dialog */

.aq-kolory {
	--aq-k-teal: #445A65;
	--aq-k-ink: #1D2848;
	--aq-k-line: #C7C7C7;
	--aq-k-accent: #EC6726;
	--aq-k-badge: #F1F1F1;
	--aq-k-font: var(--e-global-typography-primary-font-family, "Poppins"), sans-serif;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	font-family: var(--aq-k-font);
}

/* Cards: scoped under .aq-kolory and reset explicitly, so theme / Elementor Kit
   button styles (background, colour, padding, uppercase, hover fills) cannot leak in. */
.aq-kolory .aq-kolory__card,
.aq-kolory button.aq-kolory__card,
.aq-kolory button.aq-kolory__card:hover,
.aq-kolory button.aq-kolory__card:focus,
.aq-kolory button.aq-kolory__card:active {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	min-height: 120px;
	margin: 0;
	padding: 20px 24px;
	background: #fff;
	background-image: none;
	border: 1px solid var(--aq-k-line);
	border-radius: 0;
	box-shadow: none;
	color: var(--aq-k-teal);
	font-family: var(--aq-k-font);
	font-size: 14px;
	font-weight: 400;
	line-height: 22px;
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	box-sizing: border-box;
	transform: none;
}

/* Card that opens the RAL dialog */
.aq-kolory button.aq-kolory__card {
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.aq-kolory button.aq-kolory__card:hover,
.aq-kolory button.aq-kolory__card:focus-visible {
	border-color: var(--aq-k-accent);
	box-shadow: 0 0 0 1px var(--aq-k-accent);
	outline: 0;
}

.aq-kolory .aq-kolory__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.aq-kolory .aq-kolory__name {
	color: var(--aq-k-teal);
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
}

.aq-kolory .aq-kolory__sub {
	color: var(--aq-k-teal);
	font-size: 14px;
	font-weight: 400;
	line-height: 22px;
}

.aq-kolory .aq-kolory__card--wzornik .aq-kolory__sub {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.aq-kolory .aq-kolory__models {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 8px;
}

.aq-kolory .aq-kolory__badge {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 4px 9px;
	background: var(--aq-k-badge);
	color: var(--aq-k-teal);
	font-size: 12px;
	font-weight: 700;
	line-height: 20px;
	box-sizing: border-box;
}

.aq-kolory .aq-kolory__icon {
	flex: 0 0 auto;
	width: 50px;
	height: auto;
	max-height: 96px;
	object-fit: contain;
}

@media (max-width: 1024px) {
	.aq-kolory {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.aq-kolory {
		grid-template-columns: minmax(0, 1fr);
	}

	.aq-kolory .aq-kolory__card,
	.aq-kolory button.aq-kolory__card {
		min-height: 100px;
		padding: 16px 20px;
	}
}

/* ---------- RAL dialog ---------- */
.aq-wzornik {
	width: min(720px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	margin: auto;
	padding: 0;
	border: 0;
	background: #fff;
	color: #445A65;
	font-family: var(--e-global-typography-primary-font-family, "Poppins"), sans-serif;
	box-shadow: 0 24px 60px rgba(29, 40, 72, 0.25);
}

.aq-wzornik::backdrop {
	background: rgba(29, 40, 72, 0.55);
}

.aq-wzornik[open] {
	animation: aq-wzornik-in 0.2s ease;
}

@keyframes aq-wzornik-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}

.aq-wzornik__box {
	padding: 40px;
}

.aq-wzornik__head {
	position: relative;
	margin-bottom: 32px;
	padding-right: 48px;
}

.aq-wzornik__eyebrow {
	margin: 0 0 8px;
	color: #EC6726;
	font-size: 12px;
	font-weight: 500;
	line-height: 20px;
	letter-spacing: 2.4px;
	text-transform: uppercase;
}

.aq-wzornik__title {
	margin: 0;
	color: #445A65;
	font-size: 28px;
	font-weight: 700;
	line-height: 36px;
}

/* Close button: scoped + explicit reset so theme / Elementor Kit button styles cannot recolour it */
.aq-wzornik .aq-wzornik__close,
.aq-wzornik button.aq-wzornik__close,
.aq-wzornik button.aq-wzornik__close:hover,
.aq-wzornik button.aq-wzornik__close:focus,
.aq-wzornik button.aq-wzornik__close:active {
	position: absolute;
	top: -8px;
	right: -8px;
	display: block;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	background-image: none;
	box-shadow: none;
	color: #445A65;
	font-family: inherit;
	font-size: 32px;
	font-weight: 400;
	line-height: 44px;
	letter-spacing: normal;
	text-align: center;
	text-transform: none;
	cursor: pointer;
	transition: color 0.2s ease;
}

.aq-wzornik button.aq-wzornik__close:hover,
.aq-wzornik button.aq-wzornik__close:focus-visible {
	color: #EC6726;
	outline: 0;
}

.aq-wzornik button.aq-wzornik__close:focus-visible {
	outline: 2px solid #EC6726;
	outline-offset: -4px;
}

.aq-wzornik__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 24px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.aq-wzornik__item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	margin: 0;
}

.aq-wzornik__swatch {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	margin-bottom: 8px;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.aq-wzornik__code {
	color: #445A65;
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
}

.aq-wzornik__name {
	color: #1D2848;
	font-size: 13px;
	line-height: 20px;
}

.aq-wzornik__note {
	margin: 32px 0 0;
	color: #7A8790;
	font-size: 12px;
	line-height: 18px;
}

@media (max-width: 767px) {
	.aq-wzornik__box {
		padding: 28px 20px;
	}

	.aq-wzornik__title {
		font-size: 22px;
		line-height: 30px;
	}

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

@media (prefers-reduced-motion: reduce) {
	.aq-wzornik[open] {
		animation: none;
	}
}
