/*
 * Ravenflair: one machine's page (a used machine, a new machine). The photos, the summary
 * beside them, the key numbers, the spec table, and on a phone the bar that stays at the
 * bottom. Loaded only on those pages. Reads only the tokens in base.css.
 */

.rf-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 8px;
	margin-bottom: 14px;
	color: var(--rf-steel);
	font-size: 0.875rem;
}

.rf-crumbs__link {
	color: var(--rf-ink-2);
}

.rf-crumbs__link + .rf-crumbs__link::before,
.rf-crumbs__here::before {
	display: inline-block;
	margin-inline-end: 8px;
	color: var(--rf-steel);
	content: "/";
}

.rf-machine__top {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px 40px;
}

@media (min-width: 900px) {
	.rf-machine__top {
		grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
		align-items: start;
	}

	.rf-machine__sum {
		position: sticky;
		top: 16px;
	}
}

/* The photos. The box keeps one shape (4:3) and every photo fills it. */
.rf-gal {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
}

.rf-gal__stage {
	position: relative;
	overflow: hidden;
	border-radius: var(--rf-radius);
	background: var(--rf-slate);
}

.rf-gal--none .rf-gal__stage {
	aspect-ratio: 4 / 3;
}

.rf-gal__strip {
	display: flex;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	list-style: none;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.rf-gal__strip::-webkit-scrollbar {
	display: none;
}

.rf-gal__strip:focus-visible {
	outline-offset: -3px;
}

.rf-gal__slide {
	position: relative;
	flex: 0 0 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	scroll-snap-align: center;
	scroll-snap-stop: always;
}

.rf-gal__open.rf-ph {
	position: absolute;
	inset: 0;
	width: auto;
	height: auto;
	background: var(--rf-slate);
	cursor: zoom-in;
}

.rf-gal__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rf-gal__nav {
	display: inline-flex;
	position: absolute;
	top: 50%;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	border-radius: 999px;
	background: rgb(0 0 0 / 0.62);
	color: #fff;
	cursor: pointer;
}

.rf-gal__nav--prev {
	left: 10px;
}

.rf-gal__nav--next {
	right: 10px;
}

.rf-gal__nav[disabled] {
	visibility: hidden;
}

.rf-gal__nav:focus-visible,
.rf-lb__btn:focus-visible {
	outline-color: #fff;
}

.rf-gal__count {
	position: absolute;
	right: 10px;
	bottom: 10px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgb(0 0 0 / 0.68);
	color: #fff;
	font-size: 0.8125rem;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	pointer-events: none;
}

.rf-gal__thumbs {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 2px 2px 6px;
	overflow-x: auto;
	list-style: none;
}

.rf-gal__thumb {
	flex: 0 0 auto;
}

.rf-gal__pick.rf-ph {
	width: 84px;
	height: auto;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: 4px;
}

.rf-gal__pick[aria-current="true"] {
	border-color: var(--rf-accent);
}

.rf-gal__thumb-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* The full-size view. The page stays behind it, darkened and blurred (Adonny, Nov 21:
   not a black screen). The view covers the whole screen, so the blur is its own. */
.rf-lb {
	width: 100vw;
	max-width: none;
	height: 100vh;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgb(0 0 0 / 0.6);
	color: #fff;
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}

.rf-lb::backdrop {
	background: transparent;
}

.rf-lb__img {
	display: block;
	position: absolute;
	top: 60px;
	left: 0;
	width: 100%;
	height: calc(100% - 68px);
	object-fit: contain;
}

.rf-lb__n {
	position: absolute;
	top: 12px;
	left: 12px;
	margin: 0;
	padding: 0 12px;
	border-radius: 999px;
	background: rgb(0 0 0 / 0.72);
	font: 700 0.9375rem/36px var(--rf-font-body);
	font-variant-numeric: tabular-nums;
}

.rf-lb__btn {
	display: inline-flex;
	position: absolute;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border: 0;
	border-radius: 999px;
	background: rgb(0 0 0 / 0.72);
	color: #fff;
	font: 700 0.9375rem/1 var(--rf-font-body);
	cursor: pointer;
}

.rf-lb__btn--x {
	top: 8px;
	right: 12px;
}

.rf-lb__btn--prev,
.rf-lb__btn--next {
	top: 50%;
	width: 44px;
	padding: 0;
	transform: translateY(-50%);
}

.rf-lb__btn--prev {
	left: 12px;
}

.rf-lb__btn--next {
	right: 12px;
}

.rf-lb__btn[disabled] {
	visibility: hidden;
}

/* The summary beside the photos. */
.rf-machine__kicker {
	margin: 0 0 6px;
	color: var(--rf-steel);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.rf-machine__title {
	margin: 0;
	font: 800 clamp(1.75rem, 4.5vw, 2.5rem)/1.08 var(--rf-font-head);
	letter-spacing: -0.02em;
}

.rf-machine__price {
	margin: 12px 0 0;
	font: 800 clamp(1.5rem, 4vw, 2rem)/1.1 var(--rf-font-head);
	font-variant-numeric: tabular-nums;
}

.rf-machine__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 12px 0 0;
}

.rf-machine__sum .rf-keys {
	margin-top: 20px;
}

.rf-facts {
	margin: 20px 0 0;
	border-top: 1px solid var(--rf-rule);
}

.rf-facts__row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 0;
	border-bottom: 1px solid var(--rf-rule);
}

.rf-facts__label {
	color: var(--rf-steel);
}

.rf-facts__value {
	margin: 0;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	text-align: right;
}

.rf-machine__cta {
	margin: 20px 0 0;
}

.rf-machine__call {
	width: 100%;
}

.rf-machine__ask {
	margin: 10px 0 0;
	color: var(--rf-steel);
	font-size: 0.875rem;
}

/* Under the photos: key numbers, what comes with it, the text, the specs. */
.rf-machine__more {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 36px;
	max-width: 820px;
	margin-top: 40px;
}

.rf-block__title {
	margin: 0 0 14px;
	font: 800 1.375rem/1.2 var(--rf-font-head);
	letter-spacing: -0.01em;
}

.rf-block__text {
	max-width: 68ch;
	margin: 0;
	color: var(--rf-ink-2);
}

.rf-keys {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
	gap: 12px;
	margin: 0;
}

.rf-keys__item {
	min-width: 0;
	padding: 14px 16px;
	border: 1px solid var(--rf-rule);
	border-radius: var(--rf-radius);
	background: var(--rf-tint);
}

.rf-keys__label {
	color: var(--rf-steel);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.25;
	text-transform: uppercase;
}

.rf-keys__value {
	margin: 4px 0 0;
	font: 800 1.25rem/1.15 var(--rf-font-head);
	font-variant-numeric: tabular-nums;
}

.rf-ticks {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rf-ticks__item {
	position: relative;
	padding-inline-start: 22px;
}

.rf-ticks__item::before {
	position: absolute;
	top: 0.55em;
	left: 2px;
	width: 8px;
	height: 8px;
	background: var(--rf-accent);
	content: "";
}

/* The spec table. */
.rf-specs__scroll {
	overflow-x: auto;
}

.rf-specs__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.rf-specs__head {
	padding: 18px 0 8px;
	border-bottom: 2px solid var(--rf-ink);
	font: 800 1rem/1.2 var(--rf-font-head);
	text-align: left;
}

.rf-specs__group:first-child .rf-specs__head {
	padding-top: 0;
}

.rf-specs__label {
	width: 52%;
	padding: 10px 16px 10px 0;
	border-bottom: 1px solid var(--rf-rule);
	color: var(--rf-ink-2);
	font-weight: 500;
	text-align: left;
}

.rf-specs__value {
	padding: 10px 0 10px 12px;
	border-bottom: 1px solid var(--rf-rule);
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	text-align: right;
}

.rf-specs__col {
	padding: 0 0 8px 12px;
	border-bottom: 2px solid var(--rf-ink);
	font-size: 0.8125rem;
	font-weight: 700;
	text-align: right;
	vertical-align: bottom;
}

.rf-specs__corner {
	border-bottom: 2px solid var(--rf-ink);
}

.rf-specs__none {
	color: var(--rf-steel);
	font-weight: 500;
}

.rf-specs__more {
	margin-top: 16px;
}

.rf-specs__all {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 20px;
	border: 2px solid var(--rf-ink);
	border-radius: var(--rf-radius);
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.rf-specs__all::-webkit-details-marker {
	display: none;
}

.rf-specs__more[open] .rf-specs__all {
	margin-bottom: 20px;
}

.rf-specs__more[open] .rf-specs__all-open,
.rf-specs__more:not([open]) .rf-specs__all-close {
	display: none;
}

.rf-machine__new {
	margin: 0;
}

/* The bar at the bottom of a phone's screen. It stays put while the page scrolls. */
.rf-callbar {
	display: none;
}

@media (max-width: 899px) {
	/* The photos run edge to edge. */
	.rf-machine__photos {
		margin-inline: calc(var(--rf-gut) * -1);
	}

	.rf-gal__stage {
		border-radius: 0;
	}

	.rf-gal__thumbs {
		padding-inline: var(--rf-gut);
	}

	.rf-machine {
		padding-bottom: 0;
	}

	.rf-machine > .rf-wrap {
		padding-bottom: 40px;
	}

	.rf-callbar {
		display: flex;
		position: sticky;
		z-index: 20;
		bottom: 0;
		gap: 10px;
		padding: 10px var(--rf-gut) calc(10px + env(safe-area-inset-bottom, 0px));
		border-top: 1px solid var(--rf-rule);
		background: var(--rf-paper);
		box-shadow: 0 -6px 18px rgb(0 0 0 / 0.08);
	}

	.rf-callbar__call {
		flex: 1;
	}

	/* The same button is in the bar. */
	.rf-machine__cta {
		display: none;
	}
}
