/**
 * Mobility Rentals.
 *
 * Layout only. Every colour, radius and spacing value is a custom property,
 * so a Bricks class or a Core Framework token can override any of it without
 * editing this file or raising specificity.
 */

.mr-form {
	--mr-gap: 1rem;
	--mr-radius: 6px;
	--mr-border: #d7d7d7;
	--mr-bg-soft: #f7f7f7;
	--mr-text-muted: #5b5b5b;
	--mr-accent: #1f4e79;
	--mr-accent-text: #ffffff;
	--mr-error: #b00020;
	--mr-success: #1e6b34;

	display: flex;
	flex-direction: column;
	gap: var(--mr-gap);
	max-width: 34rem;
}

/* ---- Date fields ---- */

.mr-form__dates {
	display: grid;
	gap: var(--mr-gap);
}

.mr-form--side .mr-form__dates {
	grid-template-columns: 1fr 1fr;
}

.mr-form--stacked .mr-form__dates {
	grid-template-columns: 1fr;
}

@media (max-width: 480px) {
	.mr-form--side .mr-form__dates {
		grid-template-columns: 1fr;
	}
}

.mr-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0;
}

.mr-field label {
	font-weight: 600;
	font-size: 0.9375rem;
}

.mr-input {
	width: 100%;
	padding: 0.7rem 0.75rem;
	border: 1px solid var(--mr-border);
	border-radius: var(--mr-radius);
	font: inherit;
	/* 44px minimum touch target. */
	min-height: 44px;
}

.mr-input:focus-visible {
	outline: 3px solid var(--mr-accent);
	outline-offset: 2px;
}

/* ---- Running quote ---- */

.mr-form__quote {
	padding: 0.85rem 1rem;
	background: var(--mr-bg-soft);
	border-radius: var(--mr-radius);
}

.mr-form__quote p {
	margin: 0;
}

.mr-quote__prompt,
.mr-quote__checking {
	color: var(--mr-text-muted);
}

.mr-quote__error {
	color: var(--mr-error);
	font-weight: 600;
}

.mr-quote__length {
	font-weight: 600;
	margin-bottom: 0.5rem !important;
}

.mr-quote__lines {
	list-style: none;
	margin: 0 0 0.5rem;
	padding: 0;
}

.mr-quote__line {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.2rem 0;
	color: var(--mr-text-muted);
}

.mr-quote__total {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 0.5rem;
	border-top: 1px solid var(--mr-border);
	font-size: 1.0625rem;
}

/* ---- Stock warning ---- */

.mr-form__stock {
	margin: 0;
	font-weight: 600;
	color: var(--mr-error);
}

/* ---- Button ---- */

.mr-button {
	display: inline-block;
	padding: 0.85rem 1.5rem;
	min-height: 44px;
	border: 0;
	border-radius: var(--mr-radius);
	background: var(--mr-accent);
	color: var(--mr-accent-text);
	font: inherit;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.mr-button:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}

.mr-button[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}

/* ---- Terms link ---- */

.mr-form__terms {
	margin: 0;
	font-size: 0.875rem;
}

/* ---- Setup and unavailable states ---- */

.mr-form--setup {
	padding: 1rem;
	border: 2px dashed var(--mr-accent);
	border-radius: var(--mr-radius);
}

.mr-form--unavailable {
	padding: 1rem;
	background: var(--mr-bg-soft);
	border-radius: var(--mr-radius);
}

/* ---- Account table statuses ---- */

.mr-status {
	display: inline-block;
	padding: 0.15rem 0.6rem;
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
	background: #eee;
}

.mr-status--confirmed { background: #d6e4f0; color: #1f4e79; }
.mr-status--picked_up { background: #fcf0d4; color: #7a5b00; }
.mr-status--returned  { background: #d6f0dd; color: #135e2b; }
.mr-status--cancelled { background: #f0d6d6; color: #7a0000; }

/* ---- Product gallery ----
   Layout only. The big picture is as wide as its column; the look (borders,
   radius, colours, arrow shape) comes from the custom properties, which the
   site's own CSS sets. */

.mr-gallery {
	--mr-gallery-radius: 12px;
	--mr-gallery-bg: transparent;
	--mr-gallery-border: transparent;
	--mr-gallery-max-height: min(72vh, 640px);
	--mr-gallery-gap: 12px;
	--mr-gallery-arrow-size: 44px;
	--mr-gallery-arrow-bg: rgba(255, 255, 255, 0.92);
	--mr-gallery-arrow-color: #1f1f1f;
	--mr-gallery-arrow-border: rgba(0, 0, 0, 0.08);
	--mr-gallery-thumb-size: 84px;
	--mr-gallery-thumb-radius: 10px;
	--mr-gallery-thumb-border: rgba(0, 0, 0, 0.1);
	--mr-gallery-thumb-active: #1f4e79;
	--mr-gallery-count-bg: rgba(0, 0, 0, 0.55);
	--mr-gallery-count-color: #fff;

	display: flex;
	flex-direction: column;
	gap: var(--mr-gallery-gap);
	width: 100%;
	min-width: 0;
}

.mr-gallery__stage {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: var(--mr-gallery-radius);
	background: var(--mr-gallery-bg);
	border: 1px solid var(--mr-gallery-border);
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}

.mr-gallery__image {
	display: block;
	width: 100%;
	height: auto;
	max-height: var(--mr-gallery-max-height);
	object-fit: contain;
	border-radius: var(--mr-gallery-radius);
}

.mr-gallery__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--mr-gallery-arrow-size);
	height: var(--mr-gallery-arrow-size);
	padding: 0;
	margin: 0;
	border: 1px solid var(--mr-gallery-arrow-border);
	border-radius: 50%;
	background: var(--mr-gallery-arrow-bg);
	color: var(--mr-gallery-arrow-color);
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
	transition: transform 0.15s ease, background-color 0.15s ease;
}

.mr-gallery__arrow--prev { left: 12px; }
.mr-gallery__arrow--next { right: 12px; }

.mr-gallery__arrow:hover { transform: translateY(-50%) scale(1.06); }

.mr-gallery__arrow:focus-visible {
	outline: 3px solid var(--mr-gallery-thumb-active);
	outline-offset: 2px;
}

.mr-gallery__arrow svg { width: 24px; height: 24px; }

.mr-gallery__count {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 2;
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
	background: var(--mr-gallery-count-bg);
	color: var(--mr-gallery-count-color);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.4;
	pointer-events: none;
}

.mr-gallery__thumbs {
	display: flex;
	gap: var(--mr-gallery-gap);
	width: 100%;
	overflow-x: auto;
	scrollbar-width: thin;
	padding: 2px;
	scroll-snap-type: x proximity;
}

.mr-gallery__thumb {
	flex: 0 0 var(--mr-gallery-thumb-size);
	width: var(--mr-gallery-thumb-size);
	height: var(--mr-gallery-thumb-size);
	padding: 0;
	margin: 0;
	border: 2px solid var(--mr-gallery-thumb-border);
	border-radius: var(--mr-gallery-thumb-radius);
	background: var(--mr-gallery-bg);
	cursor: pointer;
	overflow: hidden;
	scroll-snap-align: start;
	opacity: 0.75;
	transition: opacity 0.15s ease, border-color 0.15s ease;
}

.mr-gallery__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.mr-gallery__thumb:hover { opacity: 1; }

.mr-gallery__thumb.is-active {
	opacity: 1;
	border-color: var(--mr-gallery-thumb-active);
}

.mr-gallery__thumb:focus-visible {
	outline: 3px solid var(--mr-gallery-thumb-active);
	outline-offset: 2px;
}

.mr-gallery--single .mr-gallery__arrow,
.mr-gallery--single .mr-gallery__count,
.mr-gallery--single .mr-gallery__thumbs,
.mr-gallery--one-visible .mr-gallery__arrow,
.mr-gallery--one-visible .mr-gallery__count { display: none; }

.mr-gallery__thumb[hidden] { display: none; }

@media (max-width: 600px) {
	.mr-gallery { --mr-gallery-arrow-size: 38px; --mr-gallery-thumb-size: 64px; }
	.mr-gallery__arrow--prev { left: 8px; }
	.mr-gallery__arrow--next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.mr-form *,
	.mr-gallery * {
		transition: none !important;
		animation: none !important;
	}
}

/* Damage Protection. Layout only; colours and type come from the theme. */
.mr-protection {
	margin: 12px 0 0;
}
.mr-protection__choice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	min-height: 44px;
	margin: 0;
	cursor: pointer;
}
.mr-protection--included .mr-protection__choice {
	cursor: default;
}
.mr-protection__input {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin: 1px 0 0;
	cursor: pointer;
}
.mr-protection__text {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 8px;
	align-items: baseline;
}
.mr-protection__label {
	font-weight: 700;
}
.mr-protection__help {
	margin: 4px 0 0 32px;
	font-size: 0.9em;
	opacity: 0.8;
}
.mr-protection--included .mr-protection__help {
	margin-left: 0;
}
