/*
 * Single listing. The gallery switches photos with radio buttons.
 * Selectors below pair each checked input with the slide of the same
 * index, up to 60 photos. Thumbnails scroll in one row. No slider script.
 */

@layer components {
	.listing__back {
		margin: 0 0 var(--space-s);
		font-size: var(--text-s);
	}

	.listing__back a {
		color: var(--color-ink);
		text-decoration: none;
	}

	.listing__back a:hover {
		color: var(--color-accent-text);
	}

	.listing__statuses {
		display: flex;
		flex-wrap: wrap;
		gap: var(--space-2xs);
		margin: 0 0 var(--space-s);
	}

	.listing__status {
		display: inline-block;
		padding: 0.3rem 0.75rem;
		border-radius: 999px;
		background: var(--color-accent-text);
		color: var(--color-surface);
		font-size: var(--text-s);
		font-weight: 700;
		line-height: 1.3;
	}

	.listing__status--prodano,
	.listing__status--pronajato {
		background: var(--color-ink);
	}

	.listing__title {
		margin: 0;
		max-width: 28em;
		font-size: var(--text-xl);
		font-weight: 700;
		letter-spacing: -0.03em;
		line-height: var(--leading-heading);
		text-wrap: balance;
	}

	.listing__place {
		margin: var(--space-xs) 0 0;
		color: var(--color-muted);
		font-size: var(--text-m);
	}

	.listing__meta {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		gap: var(--space-xs) var(--space-m);
		margin: var(--space-s) 0 0;
	}

	.listing__price {
		font-size: var(--text-l);
		font-weight: 700;
		letter-spacing: -0.02em;
	}

	.listing__layout {
		color: var(--color-muted);
	}

	.listing-gallery {
		position: relative;
		margin-block-start: var(--space-l);
	}

	/*
	 * Fixed, so focusing a radio from its label never scrolls the page. An
	 * absolute radio sits at the top of the gallery and the browser would
	 * scroll back up to it on every thumbnail click.
	 */
	.listing-gallery__radio {
		position: fixed;
		inset-block-start: 0;
		inset-inline-start: 0;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.listing-gallery__slide {
		display: none;
		margin: 0;
	}

	.listing-gallery--single .listing-gallery__slide {
		display: block;
	}

	.listing-gallery__open {
		display: block;
		width: 100%;
		padding: 0;
		border: 0;
		background: none;
		cursor: zoom-in;
	}

	/* WebP plugins may move the class onto a wrapping <picture>. */
	picture.listing-gallery__photo {
		display: contents;
	}

	img.listing-gallery__photo,
	.listing-gallery__photo img {
		display: block;
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 3;
		object-fit: cover;
		border: 1px solid var(--color-line);
		border-radius: 1rem;
		background: var(--color-surface);
	}

	.listing-gallery__play {
		position: relative;
		display: block;
		min-height: 12rem;
		border-radius: 1rem;
		background: var(--color-ink);
		color: var(--color-ink);
		text-decoration: none;
	}

	.listing-gallery__play[hidden] {
		display: none;
	}

	.listing-gallery__play::after {
		content: "";
		position: absolute;
		inset: 0;
		border-radius: inherit;
		background: linear-gradient(to top, rgb(0 12 28 / 0.45), transparent 55%);
		pointer-events: none;
	}

	.listing-gallery__play-label {
		position: absolute;
		z-index: 1;
		inset-block-end: var(--space-s);
		inset-inline-start: var(--space-s);
		display: inline-flex;
		align-items: center;
		gap: 0.6rem;
		padding: 0.35rem 1rem 0.35rem 0.35rem;
		border-radius: 999px;
		background: var(--color-surface);
		font-size: var(--text-s);
		font-weight: 700;
		transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
	}

	.listing-gallery__play-icon {
		display: grid;
		place-items: center;
		width: 2.25rem;
		aspect-ratio: 1;
		border-radius: 50%;
		background: var(--color-accent);
		transition: scale 0.2s var(--ease-out);
	}

	.listing-gallery__play-icon::before {
		content: "";
		width: 0.8rem;
		aspect-ratio: 0.87;
		margin-inline-start: 0.2rem;
		background: var(--color-surface);
		clip-path: polygon(0 0, 100% 50%, 0 100%);
	}

	.listing-gallery__play:hover .listing-gallery__play-label,
	.listing-gallery__play:focus-visible .listing-gallery__play-label {
		background: var(--color-ink);
		color: var(--color-surface);
	}

	.listing-gallery__play:hover .listing-gallery__play-icon {
		scale: 1.03;
	}

	.listing-gallery__play:focus-visible {
		outline: 2px solid var(--color-focus);
		outline-offset: 3px;
	}

	.listing-gallery__video {
		display: block;
		width: 100%;
		aspect-ratio: 4 / 3;
		border: 0;
		border-radius: 1rem;
		background: #000;
	}

	@media (min-width: 48rem) {
		img.listing-gallery__photo,
		.listing-gallery__photo img,
		.listing-gallery__video {
			aspect-ratio: 16 / 9;
			max-height: 78vh;
		}

		.listing-gallery__play-label {
			inset-block-end: var(--space-l);
			inset-inline-start: var(--space-l);
			gap: 0.75rem;
			padding: 0.5rem 1.25rem 0.5rem 0.5rem;
			font-size: var(--text-m);
		}

		.listing-gallery__play-label .listing-gallery__play-icon {
			width: 2.75rem;
		}
	}

	.listing-lightbox {
		inset: 0;
		width: 100vw;
		height: 100dvh;
		max-width: none;
		max-height: none;
		margin: 0;
		padding: 4.5rem 1rem 1.25rem;
		border: 0;
		background: rgb(0 12 28 / 0.94);
		color: var(--color-surface);
	}

	.listing-lightbox:popover-open {
		display: grid;
		align-content: center;
		justify-items: center;
	}

	.listing-lightbox__figure {
		display: flex;
		align-items: center;
		justify-content: center;
		width: min(100%, 72rem);
		max-height: calc(100dvh - 6rem);
		margin: 0;
	}

	.listing-lightbox__photo {
		width: auto;
		max-width: 100%;
		height: auto;
		max-height: calc(100dvh - 6rem);
		object-fit: contain;
	}

	.listing-lightbox__close,
	.listing-lightbox__nav {
		position: absolute;
		z-index: 1;
		padding: 0.55rem 0.9rem;
		border: 0;
		border-radius: 999px;
		background: var(--color-surface);
		color: var(--color-ink);
		font: inherit;
		font-size: var(--text-s);
		font-weight: 600;
		cursor: pointer;
	}

	.listing-lightbox__nav[hidden] {
		display: none;
	}

	.listing-lightbox__close {
		top: 0.75rem;
		inset-inline-end: 0.75rem;
	}

	.listing-lightbox__nav {
		top: 50%;
		translate: 0 -50%;
	}

	.listing-lightbox__nav--prev {
		inset-inline-start: 0.75rem;
	}

	.listing-lightbox__nav--next {
		inset-inline-end: 0.75rem;
	}

	.listing-gallery__thumbs {
		display: flex;
		gap: 0.5rem;
		margin-block-start: 0.5rem;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-block-end: 0.25rem;
	}

	.listing-gallery__thumb {
		position: relative;
		display: block;
		flex: 0 0 5.5rem;
		height: 4rem;
		overflow: hidden;
		border: 2px solid transparent;
		border-radius: 0.5rem;
		cursor: pointer;
		scroll-snap-align: start;
	}

	.listing-gallery__thumb img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.listing-gallery__thumb--video {
		background: var(--color-ink);
	}

	.listing-gallery__thumb--video .listing-gallery__play-icon {
		position: absolute;
		inset: 0;
		width: 1.75rem;
		margin: auto;
	}

	.listing-gallery__thumb--video .listing-gallery__play-icon::before {
		width: 0.55rem;
		margin-inline-start: 0.15rem;
	}

	.listing-gallery__thumb-text {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}

	.listing__grid {
		display: grid;
		gap: var(--space-l);
		margin-block-start: var(--space-l);
	}

	.listing__specs-title {
		margin: 0 0 var(--space-s);
		font-size: var(--text-l);
	}

	.listing__facts {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
		gap: var(--space-s);
		margin: 0 0 var(--space-l);
	}

	.listing__fact {
		margin: 0;
		padding: var(--space-s);
		border-radius: 1rem;
		background: var(--color-surface);
	}

	.listing__fact dt {
		color: var(--color-muted);
		font-size: var(--text-s);
	}

	.listing__fact dd {
		margin: 0.2rem 0 0;
		font-weight: 700;
	}

	.listing__content {
		max-width: 42rem;
	}

	.listing__card {
		padding: var(--space-m);
		border: 1px solid color-mix(in srgb, var(--color-ink) 10%, transparent);
		border-radius: 1.5rem;
		background: var(--color-surface);
	}

	.listing__card-title {
		margin: 0;
		font-size: var(--text-l);
		line-height: var(--leading-heading);
	}

	.listing__card-lead {
		margin: var(--space-xs) 0 0;
		color: var(--color-muted);
	}

	.listing__channels {
		display: grid;
		gap: var(--space-xs);
		margin: var(--space-s) 0 0;
		padding: 0;
		list-style: none;
	}

	.listing__channels a {
		display: inline-flex;
		align-items: center;
		gap: 0.5rem;
		color: var(--color-ink);
		font-weight: 600;
		text-decoration: none;
		overflow-wrap: anywhere;
	}

	.listing__channels a:hover {
		color: var(--color-accent-text);
	}

	.listing__icon {
		flex: 0 0 auto;
		width: 1.25rem;
		height: 1.25rem;
	}

	.listing__card .btn {
		width: 100%;
		justify-content: center;
		margin-block-start: var(--space-m);
		cursor: pointer;
	}

	.listing__map {
		margin: var(--space-s) 0 0;
	}

	.listing__video-link {
		margin-block-start: var(--space-l);
	}


	.listing-gallery__radio:nth-of-type(1):checked ~ .listing-gallery__slide:nth-of-type(1),
	.listing-gallery__radio:nth-of-type(2):checked ~ .listing-gallery__slide:nth-of-type(2),
	.listing-gallery__radio:nth-of-type(3):checked ~ .listing-gallery__slide:nth-of-type(3),
	.listing-gallery__radio:nth-of-type(4):checked ~ .listing-gallery__slide:nth-of-type(4),
	.listing-gallery__radio:nth-of-type(5):checked ~ .listing-gallery__slide:nth-of-type(5),
	.listing-gallery__radio:nth-of-type(6):checked ~ .listing-gallery__slide:nth-of-type(6),
	.listing-gallery__radio:nth-of-type(7):checked ~ .listing-gallery__slide:nth-of-type(7),
	.listing-gallery__radio:nth-of-type(8):checked ~ .listing-gallery__slide:nth-of-type(8),
	.listing-gallery__radio:nth-of-type(9):checked ~ .listing-gallery__slide:nth-of-type(9),
	.listing-gallery__radio:nth-of-type(10):checked ~ .listing-gallery__slide:nth-of-type(10),
	.listing-gallery__radio:nth-of-type(11):checked ~ .listing-gallery__slide:nth-of-type(11),
	.listing-gallery__radio:nth-of-type(12):checked ~ .listing-gallery__slide:nth-of-type(12),
	.listing-gallery__radio:nth-of-type(13):checked ~ .listing-gallery__slide:nth-of-type(13),
	.listing-gallery__radio:nth-of-type(14):checked ~ .listing-gallery__slide:nth-of-type(14),
	.listing-gallery__radio:nth-of-type(15):checked ~ .listing-gallery__slide:nth-of-type(15),
	.listing-gallery__radio:nth-of-type(16):checked ~ .listing-gallery__slide:nth-of-type(16),
	.listing-gallery__radio:nth-of-type(17):checked ~ .listing-gallery__slide:nth-of-type(17),
	.listing-gallery__radio:nth-of-type(18):checked ~ .listing-gallery__slide:nth-of-type(18),
	.listing-gallery__radio:nth-of-type(19):checked ~ .listing-gallery__slide:nth-of-type(19),
	.listing-gallery__radio:nth-of-type(20):checked ~ .listing-gallery__slide:nth-of-type(20),
	.listing-gallery__radio:nth-of-type(21):checked ~ .listing-gallery__slide:nth-of-type(21),
	.listing-gallery__radio:nth-of-type(22):checked ~ .listing-gallery__slide:nth-of-type(22),
	.listing-gallery__radio:nth-of-type(23):checked ~ .listing-gallery__slide:nth-of-type(23),
	.listing-gallery__radio:nth-of-type(24):checked ~ .listing-gallery__slide:nth-of-type(24),
	.listing-gallery__radio:nth-of-type(25):checked ~ .listing-gallery__slide:nth-of-type(25),
	.listing-gallery__radio:nth-of-type(26):checked ~ .listing-gallery__slide:nth-of-type(26),
	.listing-gallery__radio:nth-of-type(27):checked ~ .listing-gallery__slide:nth-of-type(27),
	.listing-gallery__radio:nth-of-type(28):checked ~ .listing-gallery__slide:nth-of-type(28),
	.listing-gallery__radio:nth-of-type(29):checked ~ .listing-gallery__slide:nth-of-type(29),
	.listing-gallery__radio:nth-of-type(30):checked ~ .listing-gallery__slide:nth-of-type(30),
	.listing-gallery__radio:nth-of-type(31):checked ~ .listing-gallery__slide:nth-of-type(31),
	.listing-gallery__radio:nth-of-type(32):checked ~ .listing-gallery__slide:nth-of-type(32),
	.listing-gallery__radio:nth-of-type(33):checked ~ .listing-gallery__slide:nth-of-type(33),
	.listing-gallery__radio:nth-of-type(34):checked ~ .listing-gallery__slide:nth-of-type(34),
	.listing-gallery__radio:nth-of-type(35):checked ~ .listing-gallery__slide:nth-of-type(35),
	.listing-gallery__radio:nth-of-type(36):checked ~ .listing-gallery__slide:nth-of-type(36),
	.listing-gallery__radio:nth-of-type(37):checked ~ .listing-gallery__slide:nth-of-type(37),
	.listing-gallery__radio:nth-of-type(38):checked ~ .listing-gallery__slide:nth-of-type(38),
	.listing-gallery__radio:nth-of-type(39):checked ~ .listing-gallery__slide:nth-of-type(39),
	.listing-gallery__radio:nth-of-type(40):checked ~ .listing-gallery__slide:nth-of-type(40),
	.listing-gallery__radio:nth-of-type(41):checked ~ .listing-gallery__slide:nth-of-type(41),
	.listing-gallery__radio:nth-of-type(42):checked ~ .listing-gallery__slide:nth-of-type(42),
	.listing-gallery__radio:nth-of-type(43):checked ~ .listing-gallery__slide:nth-of-type(43),
	.listing-gallery__radio:nth-of-type(44):checked ~ .listing-gallery__slide:nth-of-type(44),
	.listing-gallery__radio:nth-of-type(45):checked ~ .listing-gallery__slide:nth-of-type(45),
	.listing-gallery__radio:nth-of-type(46):checked ~ .listing-gallery__slide:nth-of-type(46),
	.listing-gallery__radio:nth-of-type(47):checked ~ .listing-gallery__slide:nth-of-type(47),
	.listing-gallery__radio:nth-of-type(48):checked ~ .listing-gallery__slide:nth-of-type(48),
	.listing-gallery__radio:nth-of-type(49):checked ~ .listing-gallery__slide:nth-of-type(49),
	.listing-gallery__radio:nth-of-type(50):checked ~ .listing-gallery__slide:nth-of-type(50),
	.listing-gallery__radio:nth-of-type(51):checked ~ .listing-gallery__slide:nth-of-type(51),
	.listing-gallery__radio:nth-of-type(52):checked ~ .listing-gallery__slide:nth-of-type(52),
	.listing-gallery__radio:nth-of-type(53):checked ~ .listing-gallery__slide:nth-of-type(53),
	.listing-gallery__radio:nth-of-type(54):checked ~ .listing-gallery__slide:nth-of-type(54),
	.listing-gallery__radio:nth-of-type(55):checked ~ .listing-gallery__slide:nth-of-type(55),
	.listing-gallery__radio:nth-of-type(56):checked ~ .listing-gallery__slide:nth-of-type(56),
	.listing-gallery__radio:nth-of-type(57):checked ~ .listing-gallery__slide:nth-of-type(57),
	.listing-gallery__radio:nth-of-type(58):checked ~ .listing-gallery__slide:nth-of-type(58),
	.listing-gallery__radio:nth-of-type(59):checked ~ .listing-gallery__slide:nth-of-type(59),
	.listing-gallery__radio:nth-of-type(60):checked ~ .listing-gallery__slide:nth-of-type(60) {
		display: block;
	}

	.listing-gallery:has(.listing-gallery__radio:nth-of-type(1):checked) .listing-gallery__thumb:nth-child(1),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(2):checked) .listing-gallery__thumb:nth-child(2),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(3):checked) .listing-gallery__thumb:nth-child(3),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(4):checked) .listing-gallery__thumb:nth-child(4),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(5):checked) .listing-gallery__thumb:nth-child(5),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(6):checked) .listing-gallery__thumb:nth-child(6),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(7):checked) .listing-gallery__thumb:nth-child(7),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(8):checked) .listing-gallery__thumb:nth-child(8),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(9):checked) .listing-gallery__thumb:nth-child(9),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(10):checked) .listing-gallery__thumb:nth-child(10),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(11):checked) .listing-gallery__thumb:nth-child(11),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(12):checked) .listing-gallery__thumb:nth-child(12),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(13):checked) .listing-gallery__thumb:nth-child(13),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(14):checked) .listing-gallery__thumb:nth-child(14),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(15):checked) .listing-gallery__thumb:nth-child(15),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(16):checked) .listing-gallery__thumb:nth-child(16),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(17):checked) .listing-gallery__thumb:nth-child(17),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(18):checked) .listing-gallery__thumb:nth-child(18),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(19):checked) .listing-gallery__thumb:nth-child(19),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(20):checked) .listing-gallery__thumb:nth-child(20),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(21):checked) .listing-gallery__thumb:nth-child(21),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(22):checked) .listing-gallery__thumb:nth-child(22),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(23):checked) .listing-gallery__thumb:nth-child(23),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(24):checked) .listing-gallery__thumb:nth-child(24),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(25):checked) .listing-gallery__thumb:nth-child(25),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(26):checked) .listing-gallery__thumb:nth-child(26),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(27):checked) .listing-gallery__thumb:nth-child(27),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(28):checked) .listing-gallery__thumb:nth-child(28),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(29):checked) .listing-gallery__thumb:nth-child(29),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(30):checked) .listing-gallery__thumb:nth-child(30),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(31):checked) .listing-gallery__thumb:nth-child(31),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(32):checked) .listing-gallery__thumb:nth-child(32),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(33):checked) .listing-gallery__thumb:nth-child(33),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(34):checked) .listing-gallery__thumb:nth-child(34),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(35):checked) .listing-gallery__thumb:nth-child(35),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(36):checked) .listing-gallery__thumb:nth-child(36),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(37):checked) .listing-gallery__thumb:nth-child(37),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(38):checked) .listing-gallery__thumb:nth-child(38),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(39):checked) .listing-gallery__thumb:nth-child(39),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(40):checked) .listing-gallery__thumb:nth-child(40),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(41):checked) .listing-gallery__thumb:nth-child(41),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(42):checked) .listing-gallery__thumb:nth-child(42),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(43):checked) .listing-gallery__thumb:nth-child(43),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(44):checked) .listing-gallery__thumb:nth-child(44),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(45):checked) .listing-gallery__thumb:nth-child(45),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(46):checked) .listing-gallery__thumb:nth-child(46),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(47):checked) .listing-gallery__thumb:nth-child(47),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(48):checked) .listing-gallery__thumb:nth-child(48),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(49):checked) .listing-gallery__thumb:nth-child(49),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(50):checked) .listing-gallery__thumb:nth-child(50),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(51):checked) .listing-gallery__thumb:nth-child(51),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(52):checked) .listing-gallery__thumb:nth-child(52),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(53):checked) .listing-gallery__thumb:nth-child(53),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(54):checked) .listing-gallery__thumb:nth-child(54),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(55):checked) .listing-gallery__thumb:nth-child(55),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(56):checked) .listing-gallery__thumb:nth-child(56),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(57):checked) .listing-gallery__thumb:nth-child(57),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(58):checked) .listing-gallery__thumb:nth-child(58),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(59):checked) .listing-gallery__thumb:nth-child(59),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(60):checked) .listing-gallery__thumb:nth-child(60) {
		border-color: var(--color-accent);
	}

	.listing-gallery:has(.listing-gallery__radio:nth-of-type(1):focus-visible) .listing-gallery__thumb:nth-child(1),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(2):focus-visible) .listing-gallery__thumb:nth-child(2),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(3):focus-visible) .listing-gallery__thumb:nth-child(3),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(4):focus-visible) .listing-gallery__thumb:nth-child(4),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(5):focus-visible) .listing-gallery__thumb:nth-child(5),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(6):focus-visible) .listing-gallery__thumb:nth-child(6),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(7):focus-visible) .listing-gallery__thumb:nth-child(7),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(8):focus-visible) .listing-gallery__thumb:nth-child(8),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(9):focus-visible) .listing-gallery__thumb:nth-child(9),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(10):focus-visible) .listing-gallery__thumb:nth-child(10),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(11):focus-visible) .listing-gallery__thumb:nth-child(11),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(12):focus-visible) .listing-gallery__thumb:nth-child(12),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(13):focus-visible) .listing-gallery__thumb:nth-child(13),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(14):focus-visible) .listing-gallery__thumb:nth-child(14),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(15):focus-visible) .listing-gallery__thumb:nth-child(15),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(16):focus-visible) .listing-gallery__thumb:nth-child(16),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(17):focus-visible) .listing-gallery__thumb:nth-child(17),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(18):focus-visible) .listing-gallery__thumb:nth-child(18),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(19):focus-visible) .listing-gallery__thumb:nth-child(19),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(20):focus-visible) .listing-gallery__thumb:nth-child(20),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(21):focus-visible) .listing-gallery__thumb:nth-child(21),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(22):focus-visible) .listing-gallery__thumb:nth-child(22),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(23):focus-visible) .listing-gallery__thumb:nth-child(23),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(24):focus-visible) .listing-gallery__thumb:nth-child(24),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(25):focus-visible) .listing-gallery__thumb:nth-child(25),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(26):focus-visible) .listing-gallery__thumb:nth-child(26),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(27):focus-visible) .listing-gallery__thumb:nth-child(27),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(28):focus-visible) .listing-gallery__thumb:nth-child(28),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(29):focus-visible) .listing-gallery__thumb:nth-child(29),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(30):focus-visible) .listing-gallery__thumb:nth-child(30),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(31):focus-visible) .listing-gallery__thumb:nth-child(31),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(32):focus-visible) .listing-gallery__thumb:nth-child(32),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(33):focus-visible) .listing-gallery__thumb:nth-child(33),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(34):focus-visible) .listing-gallery__thumb:nth-child(34),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(35):focus-visible) .listing-gallery__thumb:nth-child(35),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(36):focus-visible) .listing-gallery__thumb:nth-child(36),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(37):focus-visible) .listing-gallery__thumb:nth-child(37),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(38):focus-visible) .listing-gallery__thumb:nth-child(38),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(39):focus-visible) .listing-gallery__thumb:nth-child(39),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(40):focus-visible) .listing-gallery__thumb:nth-child(40),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(41):focus-visible) .listing-gallery__thumb:nth-child(41),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(42):focus-visible) .listing-gallery__thumb:nth-child(42),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(43):focus-visible) .listing-gallery__thumb:nth-child(43),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(44):focus-visible) .listing-gallery__thumb:nth-child(44),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(45):focus-visible) .listing-gallery__thumb:nth-child(45),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(46):focus-visible) .listing-gallery__thumb:nth-child(46),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(47):focus-visible) .listing-gallery__thumb:nth-child(47),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(48):focus-visible) .listing-gallery__thumb:nth-child(48),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(49):focus-visible) .listing-gallery__thumb:nth-child(49),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(50):focus-visible) .listing-gallery__thumb:nth-child(50),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(51):focus-visible) .listing-gallery__thumb:nth-child(51),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(52):focus-visible) .listing-gallery__thumb:nth-child(52),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(53):focus-visible) .listing-gallery__thumb:nth-child(53),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(54):focus-visible) .listing-gallery__thumb:nth-child(54),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(55):focus-visible) .listing-gallery__thumb:nth-child(55),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(56):focus-visible) .listing-gallery__thumb:nth-child(56),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(57):focus-visible) .listing-gallery__thumb:nth-child(57),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(58):focus-visible) .listing-gallery__thumb:nth-child(58),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(59):focus-visible) .listing-gallery__thumb:nth-child(59),
	.listing-gallery:has(.listing-gallery__radio:nth-of-type(60):focus-visible) .listing-gallery__thumb:nth-child(60) {
		outline: 2px solid var(--color-focus);
		outline-offset: 3px;
	}

	@media (min-width: 64rem) {
		.listing__grid {
			grid-template-columns: minmax(0, 1fr) 22rem;
			align-items: start;
		}

		.listing__aside {
			position: sticky;
			top: 6.5rem;
		}
	}

	.listing-contact {
		width: min(calc(100vw - 2rem), 40rem);
		max-height: calc(100dvh - 2rem);
		margin: auto;
		padding: var(--space-m);
		border: 0;
		border-radius: 1.25rem;
		background: var(--color-surface);
		color: var(--color-ink);
		box-shadow: 0 1.5rem 4rem rgb(0 12 28 / 0.28);
	}

	.listing-contact::backdrop {
		background: rgb(0 12 28 / 0.72);
	}

	.listing-contact__head {
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		gap: var(--space-s);
	}

	.listing-contact__title {
		margin: 0;
		font-size: var(--text-l);
		line-height: var(--leading-heading);
	}

	.listing-contact__close {
		flex: none;
		padding: 0.4rem 0.75rem;
		border: 0;
		border-radius: 999px;
		background: var(--color-base);
		color: var(--color-ink);
		font: inherit;
		font-size: var(--text-s);
		font-weight: 600;
		cursor: pointer;
	}

	.listing-contact__close:hover {
		background: color-mix(in srgb, var(--color-ink) 8%, var(--color-base));
	}

	.listing-contact__property {
		margin: var(--space-xs) 0 0;
		color: var(--color-muted);
		font-weight: 600;
	}

	.listing-contact .contact-form__form {
		margin-block-start: var(--space-m);
	}

	.listing-contact .contact-form__grid {
		grid-template-columns: 1fr;
	}

	.listing-contact .btn {
		cursor: pointer;
	}
}
