/**
 * Hi Car Match v157 — global marketplace intent, brand and mobile UX.
 * This is the final reconciliation layer for the legacy responsive sheets.
 */
:root {
	--hicm-mobile-header-h: 60px;
	--hicm-v157-ink: #14171d;
	--hicm-v157-red: #e3222d;
	--hicm-v157-red-dark: #b91420;
	--hicm-v157-soft: #f4f6f8;
}

/* Brand lockups */
.gab-logo-icon {
	background: transparent !important;
	box-shadow: none !important;
}

.gab-logo-icon .hicm-logo-mark {
	width: 48px;
	height: 48px;
	object-fit: contain;
}

.gab-drawer-logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--hicm-v157-ink);
	text-decoration: none;
}

.gab-drawer-logo-mark {
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
}

/* The first screen is a clear marketplace gateway, not a marketing carousel. */
.hicm-intent-rail {
	position: relative;
	z-index: 4;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 26px 0 18px;
}

.hicm-intent {
	position: relative;
	display: grid;
	grid-template-columns: 68px minmax(0, 1fr) 30px;
	align-items: center;
	min-height: 104px;
	padding: 14px 16px 14px 10px;
	overflow: hidden;
	border: 1px solid rgba(20, 23, 29, .12);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 12px 32px rgba(20, 23, 29, .09);
	color: var(--hicm-v157-ink);
	text-decoration: none;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.hicm-intent:hover,
.hicm-intent:focus-visible {
	z-index: 2;
	transform: translateY(-3px);
	border-color: rgba(227, 34, 45, .42);
	box-shadow: 0 18px 42px rgba(20, 23, 29, .14);
	outline: none;
}

.hicm-intent-media {
	align-self: end;
	width: 68px;
	height: 76px;
	margin-bottom: -14px;
	overflow: hidden;
}

.hicm-intent-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: bottom center;
}

.hicm-intent-copy {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 4px;
}

.hicm-intent-copy small {
	overflow: hidden;
	color: #687080;
	font-size: 11px;
	font-weight: 750;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hicm-intent-copy strong {
	font-size: clamp(16px, 1.5vw, 20px);
	font-weight: 900;
	letter-spacing: -.035em;
	line-height: 1.2;
}

.hicm-intent > i {
	display: grid;
	width: 30px;
	height: 30px;
	place-items: center;
	border-radius: 50%;
	background: var(--hicm-v157-soft);
	color: var(--hicm-v157-ink);
	font-size: 15px;
}

.hicm-intent--browse {
	border-color: var(--hicm-v157-red);
	background: linear-gradient(135deg, #f02934, var(--hicm-v157-red-dark));
	color: #fff;
}

.hicm-intent--browse .hicm-intent-copy small {
	color: rgba(255, 255, 255, .82);
}

.hicm-intent--browse > i {
	background: #fff;
	color: var(--hicm-v157-red);
}

.hicm-intent--sell {
	border-color: var(--hicm-v157-ink);
	background: linear-gradient(135deg, #20242c, #0e1014);
	color: #fff;
}

.hicm-intent--sell .hicm-intent-copy small {
	color: rgba(255, 255, 255, .72);
}

.hicm-intent--sell > i {
	background: var(--hicm-v157-red);
	color: #fff;
}

/* Country and language flags remain crisp at every density. */
.gab-flag-svg,
.hicm-country-flag {
	display: inline-block;
	width: 1.42em;
	min-width: 1.42em;
	height: 1.02em;
	overflow: hidden;
	border: 1px solid rgba(20, 23, 29, .16);
	border-radius: 2px;
	background-color: #eef1f4;
	background-position: center;
	background-size: cover;
	box-shadow: 0 1px 2px rgba(20, 23, 29, .1);
	vertical-align: -.11em;
}

.hicm-country-code {
	display: inline-block;
	width: 28px;
	min-width: 28px;
	height: 21px;
	padding: 0;
	object-fit: cover;
	border-radius: 4px;
	letter-spacing: 0;
}

/* True all-country picker: native-select fallback stays usable without JS. */
.hicm-country-picker {
	position: relative;
}

.hicm-country-native {
	width: 100%;
}

.hicm-country-picker.is-enhanced .hicm-country-native {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	border: 0 !important;
	white-space: nowrap !important;
}

.hicm-country-picker-button {
	display: flex;
	width: 100%;
	min-height: 48px;
	align-items: center;
	gap: 10px;
	padding: 0 42px 0 13px;
	border: 1px solid #d8dde5;
	border-radius: 12px;
	background: #fff;
	color: var(--hicm-v157-ink);
	font: inherit;
	text-align: start;
}

.hicm-country-picker-button[hidden],
.hicm-country-picker-panel[hidden] {
	display: none !important;
}

[dir="rtl"] .hicm-country-picker-button {
	padding: 0 13px 0 42px;
}

.hicm-country-picker-button::after {
	position: absolute;
	inset-inline-end: 15px;
	content: "\F282";
	font-family: bootstrap-icons;
	font-size: 12px;
}

.hicm-country-picker.is-open .hicm-country-picker-button {
	border-color: var(--hicm-v157-red);
	box-shadow: 0 0 0 3px rgba(227, 34, 45, .12);
}

.hicm-country-picker-panel {
	position: absolute;
	z-index: 1450;
	inset: calc(100% + 6px) 0 auto;
	padding: 8px;
	border: 1px solid #d8dde5;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 18px 46px rgba(20, 23, 29, .18);
}

.hicm-country-picker-search {
	width: 100%;
	min-height: 44px;
	margin-bottom: 7px;
	padding: 0 12px;
	border: 1px solid #d8dde5;
	border-radius: 10px;
	font: inherit;
}

.hicm-country-picker-list {
	max-height: min(320px, 45vh);
	margin: 0;
	padding: 0;
	overflow: auto;
	overscroll-behavior: contain;
	list-style: none;
}

.hicm-country-picker-option {
	display: flex;
	width: 100%;
	min-height: 44px;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: var(--hicm-v157-ink);
	font: inherit;
	text-align: start;
}

.hicm-country-picker-option:hover,
.hicm-country-picker-option:focus-visible,
.hicm-country-picker-option[aria-selected="true"] {
	background: #fff0f1;
	color: #a9101b;
}

.hicm-country-picker-option:focus-visible {
	outline: 2px solid var(--hicm-v157-red);
	outline-offset: -2px;
}

.hicm-country-picker-option small {
	margin-inline-start: auto;
	color: #707887;
	direction: ltr;
}

.hicm-country-current-flag {
	display: inline-grid;
	min-width: 22px;
	place-items: center;
}

.hicm-country-current-label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hicm-country-current-dial {
	margin-inline-start: auto;
	color: #646d7c;
	font-size: 12px;
	font-weight: 800;
}

.hicm-country-picker-empty {
	margin: 0;
	padding: 18px 10px;
	color: #707887;
	text-align: center;
}

.hicm-all-country-filter {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e7eaf0;
}

.hicm-all-country-filter .gab-field {
	margin: 0;
}

.hicm-required {
	color: var(--hicm-v157-red);
}

/* Country picker integrations: signup, phone login, seller profile and home. */
.hicm-register-country,
.hicm-phone-country-picker,
.hicm-auth-country-picker,
.hicm-dealer-country-picker {
	margin: 0;
}

.hicm-register-country .gab-field__label,
.hicm-phone-country-picker .gab-field__label,
.hicm-auth-country-picker .gab-field__label,
.hicm-dealer-country-picker .gab-field__label {
	display: block;
	margin-bottom: 7px;
	color: #344054;
	font-size: 13px;
	font-weight: 750;
}

.hicm-phone-grid .hicm-phone-country-picker {
	align-self: end;
}

.hicm-phone-grid .hicm-country-picker-button,
.hicm-auth-country-picker .hicm-country-picker-button {
	min-height: 46px;
}

.hicm-auth-country-picker {
	margin-bottom: 18px;
}

.hicm-auth-country-picker .hicm-country-picker-panel {
	z-index: 1600;
}

.hicm-profile-settings .hicm-dealer-country-picker {
	min-width: 0;
}

.hicm-global-country-all {
	display: grid;
	grid-template-columns: minmax(260px, 1fr) auto;
	align-items: end;
	gap: 12px;
	max-width: 720px;
	margin: 16px 0 24px;
	padding: 14px;
	border: 1px solid #dfe4eb;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 9px 28px rgba(20, 23, 29, .06);
}

.hicm-global-country-all .gab-field {
	margin: 0;
}

.hicm-global-country-all .gab-field__label {
	display: block;
	margin-bottom: 7px;
	color: #344054;
	font-size: 13px;
	font-weight: 800;
}

/* Floating language remains available; detail pages keep only their real inquiry CTA. */
body.gab-has-mbar .hicm-platform-float .hicm-float-inquiry {
	display: none !important;
}

body.gab-has-mbar .hicm-platform-float {
	inset-block-end: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
}

/* Verified-dealer directory */
.gab-page-dealers .gab-page-hero {
	overflow: hidden;
	background:
		radial-gradient(circle at 82% 15%, rgba(227, 34, 45, .36), transparent 34%),
		linear-gradient(135deg, #171a20, #242a34);
	color: #fff;
}

.gab-page-dealers .gab-page-hero-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 230px;
	align-items: center;
	gap: 28px;
}

.gab-page-dealers .gab-page-hero-title,
.gab-page-dealers .gab-page-hero-desc {
	color: #fff;
}

.gab-page-dealers .gab-page-hero-desc {
	max-width: 760px;
	color: rgba(255, 255, 255, .78);
}

.hicm-dealer-hero-character {
	align-self: end;
	height: 210px;
	margin-bottom: calc(-1 * var(--gab-space-12));
}

.hicm-dealer-hero-character img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: bottom center;
}

.gab-page-dealers .gab-seller-card {
	padding: 20px;
	border: 1px solid #e2e6ec;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 9px 28px rgba(20, 23, 29, .07);
}

.gab-page-dealers .gab-seller-card:hover {
	border-color: rgba(227, 34, 45, .34);
	box-shadow: 0 15px 38px rgba(20, 23, 29, .11);
}

.gab-page-dealers .gab-seller-privacy {
	padding: 10px 12px;
	border-radius: 10px;
	background: #f5f7f9;
	color: #646d7c;
	font-size: 12px;
	line-height: 1.45;
}

/* Admin listing approval: every uploaded image is reviewed before activation. */
.hicm-admin-review-link {
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: inherit;
	text-align: start;
	text-decoration: underline;
	text-decoration-color: rgba(227, 34, 45, .35);
	text-underline-offset: 3px;
}

.hicm-admin-review-row[hidden] {
	display: none !important;
}

.hicm-admin-review-row > td {
	padding: 0 16px 18px !important;
	background: #f7f8fa;
}

.hicm-admin-media-review {
	padding: 18px;
	border: 1px solid #dfe3e9;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 14px 36px rgba(20, 23, 29, .09);
}

.hicm-admin-media-review > header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.hicm-admin-media-review > header span {
	color: var(--hicm-v157-red);
	font-size: 12px;
	font-weight: 850;
}

.hicm-admin-media-review > header h3 {
	margin: 4px 0;
	color: var(--hicm-v157-ink);
	font-size: 20px;
}

.hicm-admin-media-review > header p,
.hicm-admin-review-description {
	max-width: 900px;
	margin: 0;
	color: #626b7a;
	font-size: 13px;
	line-height: 1.6;
}

.hicm-admin-media-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

.hicm-admin-media-grid a {
	position: relative;
	display: block;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: 12px;
	background: #e9edf2;
	aspect-ratio: 4 / 3;
}

.hicm-admin-media-grid a:hover,
.hicm-admin-media-grid a:focus-visible {
	border-color: var(--hicm-v157-red);
	outline: none;
}

.hicm-admin-media-grid img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.hicm-admin-media-grid a span {
	position: absolute;
	inset: auto 6px 6px;
	padding: 5px 7px;
	border-radius: 7px;
	background: rgba(10, 12, 16, .78);
	color: #fff;
	font-size: 10px;
	font-weight: 750;
	text-align: center;
}

.hicm-admin-review-description {
	margin-top: 14px;
	padding: 12px;
	border-radius: 10px;
	background: #f5f7f9;
	white-space: pre-wrap;
}

.hicm-admin-media-confirm {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 16px;
	padding: 13px;
	border: 1px solid #f0c3c7;
	border-radius: 12px;
	background: #fff5f6;
	color: #8e1019;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.5;
}

.hicm-admin-media-confirm input {
	width: 18px;
	height: 18px;
	margin-top: 1px;
	accent-color: var(--hicm-v157-red);
}

.hicm-admin-media-actions {
	display: flex;
	gap: 8px;
	margin-top: 12px;
}

.hicm-admin-media-empty {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 18px;
	border-radius: 12px;
	background: #fff1f1;
	color: #9e1721;
}

@media (max-width: 1024px) {
	/* Resolve older sheets that hide and re-show this block at conflicting widths. */
	.gab-hx-assets {
		display: none !important;
	}

	.gab-hx-layout {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

@media (max-width: 768px) {
	.hicm-global-country-all {
		grid-template-columns: minmax(0, 1fr);
		max-width: none;
	}

	.hicm-global-country-all .gab-btn {
		width: 100%;
		justify-content: center;
	}

	.gab-page-dealers .gab-page-hero-inner {
		grid-template-columns: minmax(0, 1fr) 104px;
		gap: 8px;
	}

	.hicm-dealer-hero-character {
		height: 126px;
		margin-bottom: calc(-1 * var(--gab-space-12));
	}

	.hicm-country-picker-panel {
		position: fixed;
		inset: auto 8px calc(8px + env(safe-area-inset-bottom, 0px));
		max-height: min(68dvh, 620px);
		padding: 12px;
		border-radius: 20px;
		box-shadow: 0 24px 70px rgba(10, 12, 16, .32);
	}

	.hicm-country-picker-list {
		max-height: min(52dvh, 480px);
	}

	.hicm-admin-media-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hicm-admin-media-actions {
		flex-direction: column;
	}

	.hicm-admin-media-actions .gab-btn {
		width: 100%;
		justify-content: center;
	}

	.gab-main-header,
	.gab-main-header-inner {
		height: var(--hicm-mobile-header-h) !important;
	}

	.gab-main-header .gab-suggest {
		top: var(--hicm-mobile-header-h) !important;
		max-height: calc(100dvh - var(--hicm-mobile-header-h)) !important;
	}

	.gab-main-header .gab-logo {
		display: inline-flex;
		min-width: 0;
		align-items: center;
		gap: 7px;
	}

	.gab-main-header .gab-logo-icon {
		width: 40px !important;
		height: 40px !important;
		flex: 0 0 40px;
	}

	.gab-main-header .gab-logo-icon .hicm-logo-mark {
		width: 40px;
		height: 40px;
	}

	.gab-main-header .gab-logo-text {
		display: block !important;
		min-width: 0;
	}

	.gab-main-header .gab-logo-name {
		display: block;
		font-size: 14px;
		line-height: 1.05;
		white-space: nowrap;
	}

	.gab-main-header .gab-logo-tagline {
		display: none !important;
	}

	.gab-main-header .gab-btn-icon {
		display: none !important;
	}

	.hicm-intent-rail {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		margin: 18px 0 14px;
	}

	.hicm-intent {
		grid-template-columns: 48px minmax(0, 1fr) 24px;
		min-height: 88px;
		padding: 10px 10px 10px 6px;
		border-radius: 16px;
	}

	.hicm-intent--browse {
		grid-column: 1 / -1;
		grid-template-columns: 64px minmax(0, 1fr) 30px;
		min-height: 80px;
	}

	.hicm-intent-media {
		width: 48px;
		height: 62px;
		margin-bottom: -10px;
	}

	.hicm-intent--browse .hicm-intent-media {
		width: 64px;
		height: 68px;
	}

	.hicm-intent-copy small {
		font-size: 9.5px;
	}

	.hicm-intent-copy strong {
		font-size: 14px;
		line-height: 1.24;
	}

	/* Large-marketplace readability: image first, no 108px squeezed rows. */
	.gab-cars-grid .gab-car-card,
	.gab-cars-grid-3 .gab-car-card,
	.gab-cars-grid-4 .gab-car-card {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		min-height: 0 !important;
	}

	.gab-car-card-gallery {
		width: 100% !important;
		min-height: 0 !important;
		aspect-ratio: 16 / 9;
	}

	.gab-ccg-main {
		min-height: 0 !important;
		aspect-ratio: 16 / 9;
	}

	.gab-car-card-body {
		padding: 14px !important;
	}

	.gab-car-card-inquiry {
		width: auto !important;
		min-width: 0 !important;
		padding: 0 13px !important;
		overflow: visible !important;
		color: #a9101b !important;
		white-space: normal !important;
	}

	.gab-car-card-inquiry i {
		color: inherit !important;
	}
}

@media (max-width: 430px) {
	.gab-main-header-inner {
		gap: 6px !important;
	}

	.gab-main-header .gab-logo-text {
		max-width: 72px;
	}

	.gab-main-header .gab-header-search-form {
		padding-inline: 9px 4px !important;
	}

	.gab-main-header .gab-header-search-input {
		min-width: 0;
		font-size: 13px;
	}

	.hicm-float-inquiry-copy {
		max-width: 104px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
}

@media (max-width: 359px) {
	.gab-main-header .gab-logo-text {
		display: none !important;
	}
}

[dir="rtl"] .hicm-intent > i.bi-arrow-up-right {
	transform: scaleX(-1);
}

@media (prefers-reduced-motion: reduce) {
	.hicm-intent {
		transition: none;
	}
}
