/**
 * The Nerio Green model page.
 *
 * Two sections and nothing else: the twelve-photograph album, and the
 * specification table under it. Every value here — size, colour, radius,
 * breakpoint — is the reference's, kept as given rather than pulled back to this
 * site's 14/15/16 type scale, for the reason assets/css/models/vf2.css states at
 * length.
 *
 * Everything is scoped under `.nerio`, the wrapper each element prints. The
 * reference styles bare `section`, `img`, `p`, `ul` and `label` — loose on a page
 * that is nothing else, ruinous on a WordPress install where those selectors
 * would reach the header, the footer and every other page on the site.
 *
 * **Two of the reference's class names had to be given up, and the rest were
 * counted before being kept.** `.container` and `.row` are Flatsome's — 12 and 25
 * rules in flatsome.css — and scoping does not save them: `.nerio .row` wins only
 * on the properties it names, so Flatsome's negative margins and flex-wrap would
 * still land. They are one `.nerio-container` here, the same fix vfmpv7.css
 * records. `.album`, `.album-block`, `.album-swiper`, `.swiper-*`, `.parameter-*`,
 * `.infomation-wrap` and `.homePageVF5-spec` all score zero matches in
 * flatsome.css, so they transfer verbatim — checked, not assumed, the same check
 * VF 6 made of `.btn`.
 *
 * Loaded only where a nerio_* element is on the page, and everywhere inside the
 * builder — see vf_model_in_use() in inc/models/setup.php.
 */

/* ===================================================================== base */

.nerio {
	--nerio-blue: #1464f4;
	--nerio-ink: #1f2125;
	--nerio-body: #3c3c3c;
	--nerio-rule: #84a3b6;

	font-family: 'Mulish', sans-serif;
	color: var(--nerio-ink);
}

.nerio section {
	position: relative;
	padding: 96px 0;
}

.nerio img {
	max-width: 100%;
	height: auto;
}

.nerio p {
	margin: 0 0 1rem;
	line-height: 1.5;
}

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

.nerio ul {
	margin: 0;
}

/**
 * Flatsome styles the bare `button` tag, and every control on this page is one.
 *
 * Its rule carries `min-height:2.5em; min-width:24px; margin-right:1em;
 * padding:0 1.2em; line-height:2.4em; text-transform:uppercase`, and the two
 * `min-*` are the dangerous half: a minimum beats the `height` and `width` a
 * later, more specific rule sets, so the 48px arrows and the 8px bullets below
 * would come out at whatever the font size makes 2.5em. The controls are
 * `<button>`s rather than the reference's `<div>`s on purpose — a div cannot be
 * focused, cannot be pressed from a keyboard and has no name — so the tag is
 * reset once here rather than fought in four places. Measured in the browser,
 * not read off the rules, as minio.css records at length.
 */
.nerio button {
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	font-size: inherit;
	line-height: inherit;
	letter-spacing: normal;
	text-transform: none;
}

/**
 * Off-screen, not display:none.
 *
 * The arrows and the bullets are buttons whose whole label is an icon, so the
 * name has to stay readable to a screen reader while being invisible on the
 * page. Flatsome ships `.screen-reader-text` but only inside its own scope.
 */
.nerio .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* -------------------------------------------------------------- buttons */

/* Both are hidden on the reference; these are what they look like when the site
   owner types a label and turns one on. See inc/models/nerio/specs.php. */
.nerio .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	min-height: 0;
	min-width: 204px;
	margin: 0;
	padding: 1rem;
	border-radius: 0;
	font-weight: 700;
	font-size: 12px;
	line-height: 15px;
	letter-spacing: 0.1rem;
	text-align: center;
	text-transform: uppercase;
	transition: background 0.35s ease, color 0.35s ease;
}

.nerio .btn--border--blue {
	border: 1px solid var(--nerio-blue);
}

.nerio .btn--primary--blue {
	background: var(--nerio-blue);
	color: #fff;
}

.nerio .btn--primary--blue:hover {
	background: #fff;
	color: var(--nerio-blue);
}

.nerio .btn--primary--white {
	background: #fff;
	color: var(--nerio-blue);
}

.nerio .btn--primary--white:hover {
	background: var(--nerio-blue);
	color: #fff;
}

/* ==================================================================== album */

.nerio--album .album-block {
	padding: 0;
}

.nerio--album .album {
	max-width: 1440px;
	margin: 0 auto;
}

/**
 * The viewport, and what it looks like before the script arrives.
 *
 * Unscripted, the track is a row of photographs that scrolls sideways — every
 * slide reachable, nothing hidden, which is the readable baseline. The script
 * adds `is-ready`, and only then does the box stop scrolling and start being
 * moved by a transform. The arrows and the dots stay hidden until that happens:
 * unscripted they are four controls that do nothing, which is worse than four
 * controls that are not there.
 */
.nerio--album .album-swiper {
	position: relative;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.nerio--album .album-swiper.is-ready {
	overflow: hidden;
	scroll-snap-type: none;
}

/**
 * The track is the viewport's width, and the slides overflow it.
 *
 * `flex: 0 0 100%` is the obvious spelling and the wrong one: flex-basis beats
 * the pixel width the script sets on each slide, so the track would be moved by
 * a measurement nothing was laid out to. `width` with `flex-shrink: 0` is what
 * Swiper itself does, and it leaves the script's measurement in charge.
 */
.nerio--album .swiper-wrapper {
	display: flex;
	align-items: flex-start;
	width: 100%;
}

.nerio--album .album-swiper.is-ready .swiper-wrapper {
	transition: transform 0.5s ease;
	will-change: transform;
}

.nerio--album .swiper-slide {
	flex-shrink: 0;
	width: 100%;
	scroll-snap-align: start;
}

.nerio--album .swiper-slide picture {
	display: block;
}

.nerio--album .album-img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

/* A drag must not also select the photograph underneath it. */
.nerio--album .album-swiper.is-ready .swiper-wrapper {
	user-select: none;
	-webkit-user-drag: none;
}

/* -------------------------------------------------------------- controls */

.nerio--album .swiper-button-prev,
.nerio--album .swiper-button-next,
.nerio--album .swiper-pagination {
	display: none;
}

.nerio--album .album-swiper.is-ready .swiper-button-prev,
.nerio--album .album-swiper.is-ready .swiper-button-next {
	position: absolute;
	bottom: 20px;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(129, 127, 127, 0.459);
	box-shadow: 1px 0 5px 0 rgba(0, 0, 0, 0.5);
	color: #fff;
	cursor: pointer;
}

.nerio--album .swiper-button-prev {
	left: 40px;
}

.nerio--album .swiper-button-next {
	right: 40px;
}

.nerio--album .swiper-button-prev svg,
.nerio--album .swiper-button-next svg {
	width: 20px;
	height: 20px;
}

.nerio--album .album-swiper.is-ready .swiper-pagination {
	position: absolute;
	bottom: 33px;
	left: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
}

/**
 * White dots that can be found on a white photograph.
 *
 * The reference draws these as `background:#fff` with `opacity:.2` inactive and
 * `1` active — and eight of its twelve slides are a studio shot of the car on
 * plain white, so on those the whole pagination is invisible. Measured, not
 * guessed: a crop of that strip of the rendered page is 600×120 pixels of pure
 * #ffffff. Twelve controls nobody can see or aim at is a defect, not a style, so
 * it is fixed rather than copied — the same call VF 8's `undefined` thumbnail and
 * VF 9's unreachable third slide got.
 *
 * The fix is the reference's own idiom, not a new one: its arrows are a pale
 * grey circle that would vanish on the same photograph, and it keeps them
 * legible with `box-shadow: 1px 0 5px rgba(0,0,0,.5)`. So the bullets get a
 * shadow too. The dim/bright difference moves from `opacity` to the fill,
 * because opacity fades a box-shadow along with the box — a 20% shadow is no
 * more visible than the 20% dot it was drawn for.
 */
.nerio--album .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.45);
	cursor: pointer;
	transition: background 0.3s ease;
}

.nerio--album .swiper-pagination-bullet.is-active {
	background: #fff;
}

/* ==================================================================== specs */

.nerio--specs .homePageVF5-spec {
	padding-bottom: 96px;
}

/* The reference's `.container` + `.row` + the wrap inside them, in one box. */
.nerio--specs .nerio-container {
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 30px;
}

.nerio--specs .infomation-wrap {
	max-width: 1128px;
	margin: 0 auto;
}

.nerio--specs .parameter-header {
	margin-bottom: 16px;
}

.nerio--specs .parameter-logo {
	max-height: 20px;
	max-width: 100%;
	width: auto;
}

/* ---------------------------------------------------------------- the table */

.nerio--specs .parameter-content {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 30px;
	width: 100%;
}

.nerio--specs .parameter-list {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 30px;
	width: 100%;
}

.nerio--specs .parameter-item {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 8px;
	width: 100%;
	color: var(--nerio-body);
}

/**
 * A short row must not stretch its cells.
 *
 * The rows are chunks of four, so the last one is whatever is left over — one
 * figure, or two. `width:100%` on a flex child under `justify-content:
 * space-between` would spread those across the whole table and put the last
 * figure of a twenty-first-item list in a column the width of the page. The
 * flex-basis pins every cell to a quarter however many share the row.
 */
.nerio--specs .parameter-list > .parameter-item {
	flex: 0 1 calc((100% - 90px) / 4);
}

.nerio--specs .parameter-item label {
	display: block;
	margin: 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--nerio-body);
}

.nerio--specs .parameter-item span {
	display: block;
	font-size: 20px;
	font-weight: 600;
	line-height: 25px;
}

/* The reference draws these only from 992px up, where the table is rows. */
.nerio--specs .parameter-rule {
	display: none;
	width: 100%;
	margin: 0;
	border: 0;
	border-top: 1px solid var(--nerio-rule);
}

@media (min-width: 992px) {
	.nerio--specs .parameter-rule {
		display: block;
	}
}

/* ----------------------------------------------------------------- the foot */

.nerio--specs .parameter-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 3rem;
	text-align: center;
}

.nerio--specs .parameter-note {
	padding-top: 1.5rem;
	color: var(--nerio-body);
}

.nerio--specs .parameter-txt {
	margin-bottom: 0.5rem;
}

.nerio--specs .parameter-note-list {
	margin: 0;
	padding-left: 20px;
	list-style: disc;
	line-height: 1.5;
}

/* ============================================================ 991 and down */

@media (max-width: 991px) {
	.nerio--specs .nerio-container {
		padding: 0 15px;
	}
}

/**
 * The specification table stops being rows.
 *
 * The reference turns `.parameter-content` into a three-column grid whose items
 * are the five groups of four, so each group becomes a column read downwards —
 * then two columns at 575, then a single stack at 475. Reproduced as given: it
 * is what keeps twenty figures readable on a phone without twenty full-width
 * rows of whitespace, and it is why the grouping into fours is load-bearing
 * rather than decorative.
 */
@media (max-width: 767px) {
	.nerio section {
		padding: 30px 0;
	}

	.nerio--specs .homePageVF5-spec {
		padding-bottom: 48px;
	}

	.nerio--specs .parameter-content {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 15px;
	}

	.nerio--specs .parameter-list {
		flex-direction: column;
		gap: 24px;
	}

	/* Back to a plain cell: the row is a column now, so there is no quarter. */
	.nerio--specs .parameter-list > .parameter-item {
		flex: 0 0 auto;
	}

	.nerio--specs .parameter-item span {
		font-size: 16px;
	}

	.nerio--specs .btn {
		min-width: 0;
		flex: 1 1 100%;
	}
}

@media (max-width: 575px) {
	.nerio--specs .parameter-content {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 475px) {
	.nerio--specs .parameter-content {
		display: flex;
	}
}

/* ------------------------------------------------------------------ album */

@media (max-width: 768px) {
	.nerio--album .album-swiper.is-ready .swiper-button-prev,
	.nerio--album .album-swiper.is-ready .swiper-button-next {
		bottom: 10px;
		width: 32px;
		height: 32px;
	}

	.nerio--album .swiper-button-prev {
		left: 20px;
	}

	.nerio--album .swiper-button-next {
		right: 20px;
	}

	.nerio--album .swiper-button-prev svg,
	.nerio--album .swiper-button-next svg {
		width: 14px;
		height: 14px;
	}

	.nerio--album .album-swiper.is-ready .swiper-pagination {
		bottom: 16px;
	}
}
