/**
 * Konfigurator na stronie. Kolory, kroje i przyciski z motywu (theme.json),
 * z wartościami zapasowymi dla innych motywów.
 */
.ren-konf-public {
	--rk-green: var(--wp--preset--color--green, #0a3a2d);
	--rk-deep: var(--wp--preset--color--deep, #062319);
	--rk-cream: var(--wp--preset--color--cream, #f6f3ec);
	--rk-paper: var(--wp--preset--color--paper, #fcfbf7);
	--rk-sand: var(--wp--preset--color--sand, #ece6d9);
	--rk-gold: var(--wp--preset--color--gold, #ceab6a);
	--rk-gold-dark: var(--wp--preset--color--gold-dark, #8a6a2e);
	--rk-moss: var(--wp--preset--color--moss, #56695e);
	--rk-line: var(--wp--preset--color--line, #ddd5c5);
	--rk-serif: var(--wp--preset--font-family--serif, Georgia, serif);
	--rk-radius: 14px;

	display: grid;

	/* Szerokie treści (pasek wizualizacji) nie rozpychają kolumny. */
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
	scroll-margin-top: 100px;
	align-content: start; /* wiersze bez rozciągania przy animacji */
}

/* Wymiary 100% razem z paddingiem i ramką (pole uwag, historia). */
.ren-konf-public,
.ren-konf-public *,
.ren-konf-public *::before,
.ren-konf-public *::after {
	box-sizing: border-box;
}

/*
 * Szybkie stuknięcia (strzałki, próbki) bez przybliżania strony podwójnym
 * stuknięciem na telefonie. Przybliżanie dwoma palcami działa dalej.
 */
.ren-konf-public :is(button, a, label, summary, .rk-swatch),
.rk-lightbox button,
.rk-lightbox__stage,
.rk-toast__close {
	touch-action: manipulation;
}

/* Bez paddingu i ramki, jak dotąd (przycisk typu mebla, spinner). */
.ren-konf-public .rk-chip,
.ren-konf-public .wp-element-button.is-busy::before,
.ren-konf-public .rk-busy-button__busy::before {
	box-sizing: content-box;
}

.ren-konf-public > * {
	margin: 0;
}

.ren-konf-public--preview {
	padding: 2rem;
	border: 1px dashed var(--rk-line);
	border-radius: var(--rk-radius);
	text-align: center;
}

/* Komunikaty */

.rk-alert {
	padding: 1rem 1.25rem;
	border-left: 3px solid var(--rk-line);
	border-radius: 8px;
	background: var(--rk-paper);
	font-size: 0.9375rem;
	animation: rk-fade-in 0.35s ease-out;
}

/* Pojawianie się komunikatów i elementów podmienionych w tle (assets/public.js). */
@keyframes rk-fade-in {

	from {
		opacity: 0;
		transform: translateY(8px);
	}
}

@media (prefers-reduced-motion: reduce) {

	.rk-alert {
		animation: none;
	}
}

/*
 * Powiadomienia po akcjach — przyklejone pod nagłówkiem, nad treścią
 * (bez przesuwania jej). Kontener z serwera (w bloku) i stały kontener
 * public.js (w <body>) wyglądają tak samo.
 */
.rk-toasts {
	position: fixed;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--ren-header, 84px) + env(safe-area-inset-top) + 0.75rem);
	left: 50%;
	z-index: 60;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;

	/* Szerokość treści strony — jak blok konfiguratora. */
	--rk-toasts-max: var(--wp--style--global--content-size, 1280px);
	width: min(var(--rk-toasts-max), calc(100% - 2 * var(--ren-gutter, 1rem)));
	transform: translateX(-50%);
	pointer-events: none;
}

.rk-toasts:empty {
	display: none;
}

.rk-toast {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	box-sizing: border-box;
	padding: 0.875rem 0.75rem 0.875rem 1.125rem;
	border-left: 3px solid var(--wp--preset--color--green, #0a3a2d);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 10px 30px rgb(6 35 25 / 16%), 0 2px 6px rgb(6 35 25 / 8%);
	color: var(--wp--preset--color--ink, #1c211e);
	font-size: 0.9375rem;
	line-height: 1.45;
	pointer-events: auto;
	animation: rk-toast-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.rk-toast.is-error {
	border-left-color: #a33a2c;
	background: #fdf3f1;
	color: #7d2a1f;
}

.rk-toast p {
	flex: 1;
	margin: 0;
}

.rk-toast__close {
	flex: none;
	width: 1.75rem;
	height: 1.75rem;
	margin: -0.25rem 0 -0.25rem 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 1.125rem;
	line-height: 1;
	opacity: 0.6;
	cursor: pointer;
}

.rk-toast__close:hover,
.rk-toast__close:focus-visible {
	background: rgb(0 0 0 / 6%);
	opacity: 1;
}

@keyframes rk-toast-in {

	from {
		opacity: 0;
		transform: translateY(-12px);
	}
}

@media (prefers-reduced-motion: reduce) {

	.rk-toast {
		animation: none;
	}
}

.rk-alert.is-ok {
	border-color: var(--rk-green);
	background: #eef3ee;
}

.rk-alert.is-error {
	border-color: #a33a2c;
	background: #f9ece9;
	color: #7d2a1f;
}

.rk-alert.is-warn {
	border-color: var(--rk-gold);
	background: #fbf5e7;
}

/* Karty i nagłówki kroków */

.rk-card {
	padding: clamp(1.5rem, 3vw, 2.5rem);
	border: 1px solid var(--rk-line);
	border-radius: var(--rk-radius);
	background: var(--rk-paper);
}

.rk-card h2 {
	margin: 0;
	color: var(--rk-green);
	font-family: var(--rk-serif);
	font-size: clamp(1.625rem, 2.4vw, 2.125rem);
	font-weight: 500;
	line-height: 1.15;
}

.rk-step {
	display: flex;
	align-items: baseline;
	gap: 0.875rem;
}

.rk-step span {
	color: var(--rk-gold-dark);
	font-size: 0.75em;
}

.rk-eyebrow {
	margin: 0 0 0.75rem;
	color: var(--rk-gold-dark);
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.rk-muted {
	color: var(--rk-moss);
	font-size: 0.9375rem;
}

.rk-card > .rk-muted {
	margin: 0.5rem 0 0;
}

/* Przyciski: wp-element-button z motywu + wariant obrysowy */

.ren-konf-public .wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	text-decoration: none;
}

.ren-konf-public .wp-element-button.is-busy:not(.rk-busy-button) {
	white-space: nowrap;
}

/* Przycisk w trakcie pracy w pełnym kolorze (pozostałe zablokowane są wyszarzone). */
.ren-konf-public .wp-element-button.is-busy:disabled {
	cursor: progress;
	opacity: 1;
}

.ren-konf-public .wp-element-button:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.ren-konf-public .wp-element-button.is-outline {
	border: 1px solid currentcolor;
	background: transparent;
	color: var(--rk-green);
}

.ren-konf-public .wp-element-button.is-outline:hover {
	background: var(--rk-green);
	color: var(--rk-cream);
}

.rk-link {
	padding: 0;
	border: 0;
	border-bottom: 1px solid currentcolor;
	background: none;
	color: var(--rk-green);
	font: inherit;
	font-size: 0.875rem;
	cursor: pointer;
}

.rk-link:hover {
	color: var(--rk-gold-dark);
}

/* Dostęp */

.rk-access {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	align-items: end;
	gap: 2rem 4rem;
}

.rk-access__copy p:not(.rk-eyebrow) {
	margin: 1rem 0 0;
	color: var(--rk-moss);
}

.rk-access .rk-access__problem {
	padding-left: 0.875rem;
	border-left: 2px solid #a33a2c;
	color: #7d2a1f;
}

/* Po wygenerowaniu: pod przyklejonym nagłówkiem (scroll-padding-top motywu) zostaje odstęp
   równy odstępowi między sekcjami. */
#rk-wynik {
	scroll-margin-top: 1.25rem;
}

.rk-access__form {
	display: grid;
	gap: 0.75rem;
}

.rk-access__form label {
	color: var(--rk-moss);
	font-size: 0.875rem;
}

.rk-access__form input {
	padding: 0.95rem 1.1rem;
	border: 1px solid var(--rk-line);
	border-radius: 10px;
	background: #fff;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 1.0625rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.rk-access__form input:focus {
	border-color: var(--rk-green);
	outline: 2px solid var(--rk-gold);
	outline-offset: 1px;
}

/* Kontakt przy kluczu dostępu */

.rk-contact {
	padding-top: 1.25rem;
	border-top: 1px solid var(--rk-line);
}

/* Komputer: pod tekstem po lewej, formularz po prawej; telefon: pod formularzem. */
@media (min-width: 781px) {

	.rk-access > .rk-contact {
		grid-column: 1;
		grid-row: 2;
	}

	.rk-access > .rk-access__form {
		grid-column: 2;
		grid-row: 1 / span 2;
	}
}

.rk-contact p {
	margin: 0;
}

.rk-contact__title {
	color: var(--rk-green);
	font-weight: 600;
}

.rk-contact .rk-contact__lead {
	margin: 0.25rem 0 0.75rem;
	color: var(--rk-moss);
	font-size: 0.9375rem;
}

.rk-contact__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	align-items: baseline;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rk-contact__list a {
	color: var(--rk-green);
}

.rk-contact__list a:hover {
	color: var(--rk-gold-dark);
}

.rk-contact__phone {
	font-family: var(--rk-serif);
	font-size: 1.5rem;
	text-decoration: none;
	white-space: nowrap;
}

/* Pasek stanu dostępu */

.rk-bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1rem 2rem;
	padding: 1rem 1.5rem;
	border-radius: var(--rk-radius);
	background: var(--rk-green);
	color: var(--rk-cream);
}

.rk-bar__status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
}

.rk-bar__status strong {
	font-family: var(--rk-serif);
	font-size: 1.375rem;
	font-weight: 500;
}

.rk-bar__status span {
	opacity: 0.8;
	font-size: 0.875rem;
}

.rk-dots {
	display: inline-flex;
	flex-wrap: wrap; /* duży limit wizualizacji — kropki w kilku liniach zamiast poza ekranem */
	gap: 6px;
}

.rk-dots i {
	width: 12px;
	height: 12px;
	border: 1px solid var(--rk-gold);
	border-radius: 50%;
}

.rk-dots i.is-left {
	background: var(--rk-gold);
}

.rk-bar__actions {
	display: flex;
	gap: 1.5rem;
}

.rk-bar__actions form {
	margin: 0;
}

.rk-bar .rk-link {
	color: var(--rk-cream);
}

.rk-bar .rk-link:hover {
	color: var(--rk-gold);
}

/* Zdjęcie */

.rk-privacy {
	margin: 0.75rem 0 0;
	color: var(--rk-moss);
	font-size: 0.8125rem;
}

.rk-privacy a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.rk-upload {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.rk-file {
	position: relative;
	flex: 1 1 280px;
	padding: 0.95rem 1.1rem;
	border: 1px dashed var(--rk-line);
	border-radius: 10px;
	background: #fff;
	color: var(--rk-moss);
	cursor: pointer;
}

.rk-file:hover,
.rk-file:focus-within {
	border-color: var(--rk-green);
}

.rk-file input {
	position: absolute;
	inset: 0;
	width: 100%;
	opacity: 0;
	cursor: pointer;
}

.rk-preview {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 1.5rem;
	margin-top: 1.5rem;
	transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Wgrywanie nowego zdjęcia: poprzednie zdjęcie z opisem wyszarzone do czasu podmiany. */
.rk-card:has(.rk-upload[aria-busy="true"]) .rk-preview {
	opacity: 0.45;
	filter: grayscale(1);
}

/* Generowanie nowej wizualizacji (nie „Wgraj”): poprzedni wynik wyszarzony do czasu podmiany. */
#rk-wynik {
	transition: opacity 0.3s ease, filter 0.3s ease;
}

.ren-konf-public:has(.rk-config[aria-busy="true"]:not([data-submitter="own_upload"])) #rk-wynik {
	opacity: 0.45;
	filter: grayscale(1);
}

.rk-preview img {
	width: min(320px, 100%);
	aspect-ratio: 4 / 3;
	border-radius: 10px;
	background: var(--rk-sand);
	object-fit: cover;
}

.rk-preview p {
	flex: 1 1 240px;
	margin: 0;
}

.rk-badge {
	padding: 0.1rem 0.6rem;
	border-radius: 999px;
	background: var(--rk-sand);
	color: var(--rk-gold-dark);
	font-size: 0.8125rem;
	font-weight: 500;
}

/* Typ produktu */

.rk-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1.5rem;
}

.rk-chip {
	min-height: 44px;
	padding: 0.5rem 1.25rem;
	border: 1px solid var(--rk-line);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 500;
	cursor: pointer;
}

.rk-chip:hover {
	border-color: var(--rk-green);
}

.rk-chip.is-active {
	border-color: var(--rk-green);
	background: var(--rk-green);
	color: var(--rk-cream);
}

/* Materiały */

.rk-config {
	display: grid;
	gap: 1rem;
	margin-top: 1.5rem;
	align-content: start; /* wiersze bez rozciągania przy animacji */
}

.rk-element {
	margin: 0;
	padding: 1.25rem 1.25rem 1.5rem;
	border: 1px solid var(--rk-line);
	border-radius: 12px;
	background: #fff;
}

.rk-element legend {
	padding: 0 0.5rem;
	color: var(--rk-green);
	font-family: var(--rk-serif);
	font-size: 1.375rem;
	font-weight: 500;
}

/* Uwagi klienta */

.rk-notes {
	display: grid;
	gap: 0.5rem;
}

.rk-notes label {
	color: var(--rk-green);
	font-family: var(--rk-serif);
	font-size: 1.375rem;
}

.rk-notes label .rk-muted {
	font-family: var(--wp--preset--font-family--sans, sans-serif);
	font-size: 0.875rem;
}

.rk-notes textarea {
	width: 100%;
	min-height: 6rem;
	padding: 0.875rem 1rem;
	border: 1px solid var(--rk-line);
	border-radius: 10px;
	background: #fff;
	font: inherit;
	font-size: 1rem; /* 16px — iOS nie przybliża strony przy pisaniu */
	resize: vertical;
}

.rk-notes textarea:focus {
	border-color: var(--rk-green);
	outline: 2px solid var(--rk-gold);
	outline-offset: 1px;
}

.rk-notes > .rk-muted {
	margin: 0;
	font-size: 0.8125rem;
}

.rk-result-notes {
	margin: 0.75rem 0 0;
	font-size: 0.9375rem;
}

.rk-result-notes .rk-eyebrow {
	margin: 0 0.5rem 0 0;
}

/* Wnętrze mebla: metoda renowacji */

.rk-method > .rk-muted {
	margin: 0 0 0.875rem;
	font-size: 0.875rem;
}

.rk-method__option {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	padding: 0.75rem 1rem;
	border: 1px solid var(--rk-line);
	border-radius: 10px;
	cursor: pointer;
}

.rk-method__option + .rk-method__option {
	margin-top: 0.5rem;
}

.rk-method__option:has(input:checked) {
	border-color: var(--rk-gold);
	background: var(--rk-paper);
	box-shadow: inset 0 0 0 1px var(--rk-gold);
}

.rk-method__option input {
	margin-top: 0.3rem;
	accent-color: var(--rk-green);
}

.rk-method__option strong {
	display: block;
	color: var(--rk-green);
}

.rk-method__option .rk-muted {
	font-size: 0.875rem;
}

.rk-swatches {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	gap: 0.875rem;
	align-content: start; /* wiersze bez rozciągania przy animacji */
}

.rk-swatch {
	position: relative;
	text-align: center;
	cursor: pointer;
}

.rk-swatch input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.rk-swatch__thumb {
	display: grid;
	place-items: center;
	width: 100%;
	aspect-ratio: 5 / 4;
	border: 1px solid var(--rk-line);
	border-radius: 10px;
	object-fit: cover;
	transition: box-shadow 0.15s, border-color 0.15s;
}

.rk-swatch__price {
	display: block;
	margin-top: 0.15rem;
	color: var(--rk-gold-dark);
	font-size: 0.6875rem;
	font-weight: 500;
	white-space: nowrap;
}

.rk-hex {
	display: block;
}

.rk-summary .rk-hex {
	width: 36px;
	height: 28px;
	border-radius: 6px;
}

/* Numer referencyjny */

.rk-ref {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem 1rem;
	margin-top: 1rem;
	padding: 0.875rem 1.25rem;
	border: 1px dashed var(--rk-gold);
	border-radius: 10px;
}

.rk-ref .rk-eyebrow {
	margin: 0;
}

.rk-ref__code {
	color: var(--rk-green);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 1.125rem;
	letter-spacing: 0.06em;
}

.rk-ref .rk-muted {
	flex-basis: 100%;
	font-size: 0.8125rem;
}

/* Wycena */

.rk-estimate {
	margin-top: 1.5rem;
	padding: 1.5rem;
	border-radius: 12px;
	background: var(--rk-sand);
}

.rk-estimate .rk-eyebrow {
	margin-bottom: 0.25rem;
}

.rk-estimate__total {
	margin: 0;
	color: var(--rk-green);
	font-family: var(--rk-serif);
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 500;
	line-height: 1.1;
}

.rk-estimate__excluded {
	margin: 0.5rem 0 0;
	color: var(--rk-green);
	font-weight: 500;
}

.rk-estimate > .rk-muted {
	margin: 0.75rem 0 0;
}

.rk-estimate__details {
	margin-top: 1rem;
}

.rk-estimate__details summary {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--rk-green);
	font-weight: 500;
	list-style: none;
	cursor: pointer;
}

.rk-estimate__details summary::-webkit-details-marker {
	display: none;
}

/* Trójkąt obracany w dół po rozwinięciu (is-closing — przy zwijaniu). */
.rk-estimate__arrow {
	width: 0;
	height: 0;
	border-top: 0.3em solid transparent;
	border-bottom: 0.3em solid transparent;
	border-left: 0.45em solid currentcolor;
	transition: transform 0.25s ease;
}

.rk-estimate__details[open]:not(.is-closing) .rk-estimate__arrow {
	transform: rotate(90deg);
}

.rk-estimate__details .rk-details__body {
	padding-top: 0.75rem;
}

.rk-estimate__details table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.rk-estimate__details th,
.rk-estimate__details td {
	padding: 0.5rem 0.5rem 0.5rem 0;
	border-bottom: 1px solid var(--rk-line);
	text-align: left;
	vertical-align: top;
}

.rk-estimate__details th {
	color: var(--rk-moss);
	font-weight: 500;
}

.rk-estimate__details td:last-child,
.rk-estimate__details th:last-child {
	text-align: right;
	white-space: nowrap;
}

.rk-estimate__details tr.is-hidden td,
.rk-estimate__details tr.is-labour td {
	color: var(--rk-moss);
}

.rk-tag {
	margin-left: 0.35rem;
	padding: 0.05rem 0.45rem;
	border-radius: 999px;
	background: var(--rk-paper);
	color: var(--rk-gold-dark);
	font-size: 0.6875rem;
	white-space: nowrap;
}

.rk-estimate__disclaimer {
	margin: 1rem 0 0;
	color: var(--rk-moss);
	font-size: 0.8125rem;
	line-height: 1.6;
}

.rk-swatch.is-none .rk-swatch__thumb {
	border-style: dashed;
	color: var(--rk-moss);
	font-size: 0.75rem;
	line-height: 1.2;
}

.rk-default-submit {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	padding: 0;
}

.rk-own {
	margin-top: 0.875rem;
}

.rk-own summary {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--rk-green);
	font-size: 0.9375rem;
	font-weight: 500;
	list-style: none;
	cursor: pointer;
}

.rk-own summary::-webkit-details-marker {
	display: none;
}

/* Plus z dwóch kresek; po rozwinięciu obie obracają się do poziomu („−”). */
.rk-own__icon {
	position: relative;
	flex: none;
	width: 0.75rem;
	height: 0.75rem;
}

.rk-own__icon::before,
.rk-own__icon::after {
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	margin-top: -1px;
	border-radius: 1px;
	background: currentcolor;
	content: "";
	transition: transform 0.25s ease;
}

.rk-own__icon::after {
	transform: rotate(90deg);
}

.rk-own[open]:not(.is-closing) .rk-own__icon::before {
	transform: rotate(180deg);
}

.rk-own[open]:not(.is-closing) .rk-own__icon::after {
	transform: rotate(180deg);
}

.rk-own__body {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	box-sizing: border-box;
	padding-top: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
	.rk-own__icon::before,
	.rk-own__icon::after,
	.rk-estimate__arrow {
		transition: none;
	}
}

.rk-own__url {
	display: grid;
	flex: 1 1 100%;
	gap: 0.35rem;
	color: var(--rk-moss);
	font-size: 0.8125rem;
}

.rk-own__url input {
	width: 100%;
	padding: 0.85rem 1.1rem;
	border: 1px solid var(--rk-line);
	border-radius: 10px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 0.9375rem;
}

.rk-own__url input:focus {
	border-color: var(--rk-green);
	outline: 2px solid var(--rk-gold);
	outline-offset: 1px;
}

.rk-own__body .rk-muted {
	flex: 1 1 100%;
	margin: 0;
	font-size: 0.8125rem;
}

.rk-swatch__label {
	display: block;
	margin-top: 0.4rem;
	color: var(--rk-moss);
	font-size: 0.75rem;
	line-height: 1.3;
}

.rk-swatch:hover .rk-swatch__thumb,
.rk-swatch input:focus-visible + .rk-swatch__thumb {
	border-color: var(--rk-green);
}

.rk-swatch.is-checked .rk-swatch__thumb {
	border-color: var(--rk-green);
	box-shadow: 0 0 0 2px var(--rk-paper), 0 0 0 4px var(--rk-gold);
}

.rk-swatch.is-checked .rk-swatch__label {
	color: var(--rk-green);
	font-weight: 500;
}

.rk-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
	margin-top: 0.5rem;
}

.rk-actions form {
	margin: 0;
}

/*
 * Przycisk z dwoma napisami (idle / busy) w jednej komórce siatki — szerokość
 * to szerszy z nich, więc nie zmienia się po kliknięciu.
 */
.ren-konf-public .rk-busy-button {
	display: inline-grid;
	place-items: center;
	text-align: center;
}

.rk-busy-button > span {
	grid-area: 1 / 1;
}

.rk-busy-button__busy {
	display: inline-flex;
	align-items: center;
	visibility: hidden;
}

.rk-busy-button.is-busy .rk-busy-button__idle {
	visibility: hidden;
}

.rk-busy-button.is-busy .rk-busy-button__busy {
	visibility: visible;
}

/* Spinner na przycisku, który właśnie wysyła formularz (public.js: is-busy). */
.ren-konf-public .wp-element-button.is-busy:not(.rk-busy-button)::before,
.rk-busy-button__busy::before {
	flex: none;
	content: "";
	width: 1em;
	height: 1em;
	margin-right: 0.6em;
	border: 2px solid currentcolor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: rk-spin 0.8s linear infinite;
}

@keyframes rk-spin {

	to {
		transform: rotate(360deg);
	}
}

/* Wynik */

.rk-compare {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.25rem;
	margin-top: 1.5rem;
}

.rk-compare figure {
	margin: 0;
}

.rk-compare img {
	display: block;
	width: 100%;
	border-radius: 12px;
	background: var(--rk-sand);
}

.rk-zoom {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: none;
	cursor: zoom-in;
}

.rk-zoom img {
	transition: filter 0.2s ease;
}

.rk-zoom:hover img {
	filter: brightness(1.05);
}

.rk-zoom:focus-visible {
	outline: 2px solid var(--rk-gold);
	outline-offset: 3px;
}

/* Powiększone zdjęcie (public.js) — poza blokiem, przetrwa jego podmianę.
   inset, nie 100vw — 100vw obejmuje pasek przewijania. */
.rk-lightbox {
	inset: 0;
	width: auto;
	max-width: none;
	height: auto;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgb(6 20 15 / 94%); /* na dialogu (nie ::backdrop) — wygasa z nim */
	color: #fff;
	overflow: hidden;
}

.rk-lightbox::backdrop {
	background: transparent;
}

.rk-lightbox__stage {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	padding: clamp(3.5rem, 6vw, 4.5rem) clamp(0.75rem, 5vw, 5rem);
	box-sizing: border-box;
	cursor: zoom-out;
}

.rk-lightbox__image {
	max-width: 100%;
	max-height: calc(100dvh - 9rem);
	border-radius: 10px;
	box-shadow: 0 20px 60px rgb(0 0 0 / 35%);
	object-fit: contain;
	cursor: default;
}

.rk-lightbox__caption {
	position: absolute;
	bottom: calc(1.25rem + env(safe-area-inset-bottom));
	left: 50%;
	transform: translateX(-50%);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	opacity: 0.85;
}

.rk-lightbox button {
	position: absolute;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid rgb(255 255 255 / 35%);
	border-radius: 50%;
	background: rgb(0 0 0 / 30%);
	color: #fff;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease;
}

.rk-lightbox button:hover,
.rk-lightbox button:focus-visible {
	background: rgb(0 0 0 / 55%);
	outline: none;
	border-color: #fff;
}

.rk-lightbox__close {
	top: calc(0.875rem + env(safe-area-inset-top));
	right: calc(0.875rem + env(safe-area-inset-right));
}

.rk-lightbox__prev,
.rk-lightbox__next {
	top: 50%;
	transform: translateY(-50%);
}

.rk-lightbox__prev {
	left: calc(0.875rem + env(safe-area-inset-left));
}

.rk-lightbox__next {
	right: calc(0.875rem + env(safe-area-inset-right));
}

.rk-compare figcaption {
	margin-top: 0.5rem;
	color: var(--rk-gold-dark);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.rk-summary {
	display: grid;
	gap: 0.5rem;
	margin: 1.5rem 0;
	padding: 0;
	list-style: none;
}

.rk-summary li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.rk-summary img {
	width: 36px;
	height: 28px;
	border-radius: 6px;
	object-fit: cover;
}

/* Wcześniejsze wizualizacje — jeden rząd przewijany w poziomie (public.js). */
.rk-carousel {
	position: relative;
	margin-top: 1rem;
}

.rk-history {
	display: flex;
	gap: 1rem;
	margin: 0;
	padding: 0.25rem 0.125rem 0.5rem;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 0.125rem; /* jak padding — bez przesunięcia o 2 px na starcie */
	scrollbar-width: none;
	list-style: none;
}

.rk-history::-webkit-scrollbar {
	display: none;
}

.rk-history:focus-visible {
	outline: 2px solid var(--rk-gold);
	outline-offset: 3px;
	border-radius: 10px;
}

.rk-history li {
	flex: 0 0 min(200px, 70%);
	scroll-snap-align: start;
}

.rk-carousel.can-prev .rk-history {
	mask-image: linear-gradient(to right, transparent, #000 3rem);
}

.rk-carousel.can-next .rk-history {
	mask-image: linear-gradient(to left, transparent, #000 3rem);
}

.rk-carousel.can-prev.can-next .rk-history {
	mask-image: linear-gradient(to right, transparent, #000 3rem, #000 calc(100% - 3rem), transparent);
}

.rk-carousel__prev,
.rk-carousel__next {
	position: absolute;
	top: calc(50% - 1.375rem);
	z-index: 1;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid var(--rk-line);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 4px 14px rgb(6 35 25 / 14%);
	color: var(--rk-green);
	font-size: 1.375rem;
	line-height: 1;
	cursor: pointer;
	transition: opacity 0.2s ease, border-color 0.15s ease;
}

.rk-carousel__prev {
	left: -0.75rem;
}

.rk-carousel__next {
	right: -0.75rem;
}

.rk-carousel__prev:hover,
.rk-carousel__next:hover,
.rk-carousel__prev:focus-visible,
.rk-carousel__next:focus-visible {
	border-color: var(--rk-green);
	outline: none;
}

.rk-carousel__prev:disabled,
.rk-carousel__next:disabled {
	opacity: 0;
	pointer-events: none;
}

.rk-carousel__prev[hidden],
.rk-carousel__next[hidden] {
	display: none;
}

.rk-history a {
	display: grid;
	align-content: start; /* numer i opis na tej samej wysokości w każdym kafelku */
	gap: 0.2rem;
	height: 100%;
	padding: 0.5rem 0.5rem 0.75rem;
	border: 1px solid var(--rk-line);
	border-radius: 10px;
	background: #fff;
	color: inherit;
	text-decoration: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.rk-history a:hover,
.rk-history a:focus-visible {
	border-color: var(--rk-gold);
	box-shadow: 0 4px 14px rgb(6 35 25 / 8%);
}

.rk-history img {
	width: 100%;
	aspect-ratio: 4 / 3;
	margin-bottom: 0.35rem;
	border-radius: 6px;
	object-fit: cover;
}

.rk-history__ref {
	color: var(--rk-green);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
}

.rk-history__meta,
.rk-history__changes {
	color: var(--rk-moss);
	font-size: 0.8125rem;
	line-height: 1.35;
}

.rk-back {
	margin: 0 0 1rem;
}

.rk-back a {
	color: var(--rk-green);
}

@media (max-width: 780px) {

	.rk-access {
		grid-template-columns: 1fr;
	}

	.rk-bar {
		padding: 1rem 1.25rem;
	}
}
