/*
 * Thailand Cars country hub composition (Vehicles 0.2.91, ADR-242; 0.2.97 visual refinement).
 * Loaded only on a country Cars route whose composition applies, after the 0.2.80 hub rules.
 * Mobile-first; no fixed widths wider than the viewport; no animation beyond colour/border transitions.
 */

/* ---------------------------------------------------------------- Hero
 * The shared rental hero rules (this plugin's stylesheet and the Visual Rebrand public shell) centre the hero copy with
 * `!important`; these overrides are scoped to the composition hero only (`.sch-country-cars-hero`), so every other
 * rental hero is untouched. H = the hero layout, C = its copy column.
 *
 * 0.2.97 full bleed: the stored hero group (`.sch-rental-hero`) already spans the page; only its inner container is
 * narrowed by the shell. That container is released only when it holds this composition hero (`:has()`), so the photo
 * runs edge to edge without any viewport unit (no scrollbar overflow) and every other hero keeps its rail. A browser
 * without `:has()` keeps the 0.2.96 rounded card. The copy stays on the page's 1200px content rail.
 */

body .sch-rental-page.sch-rental-page--request .sch-rental-hero.wp-block-group > .wp-block-group__inner-container:has(> .sch-rental-hero__layout.sch-country-cars-hero) {
	display: block !important;
	box-sizing: border-box;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

body .sch-rental-page.sch-rental-page--request .sch-rental-hero.wp-block-group > .wp-block-group__inner-container:has(> .sch-rental-hero__layout.sch-country-cars-hero) > .sch-rental-hero__layout.sch-country-cars-hero {
	max-width: none !important;
	padding-right: max(16px, calc((100% - 1200px) / 2)) !important;
	padding-left: max(16px, calc((100% - 1200px) / 2)) !important;
	border-radius: 0;
}

body .sch-rental-page--request .sch-rental-hero .sch-rental-hero__layout.sch-country-cars-hero {
	position: relative;
	isolation: isolate;
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	justify-content: flex-end !important;
	gap: 0 !important;
	box-sizing: border-box;
	width: 100% !important;
	max-width: 1200px !important;
	min-height: 580px;
	margin: 0 auto !important;
	padding: 28px 20px !important;
	overflow: hidden;
	border-radius: 16px;
	background: #0b1f3a;
	color: #ffffff;
}

.sch-country-cars-hero__media {
	position: absolute;
	inset: 0;
	z-index: -2;
	display: block;
	margin: 0;
}

body .sch-country-cars-hero .sch-country-cars-hero__media img.sch-country-cars-hero__image {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	border-radius: 0;
	object-fit: cover;
	object-position: 50% 28%;
}

.sch-country-cars-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(0deg, rgba(11, 31, 58, 0.96) 0%, rgba(11, 31, 58, 0.9) 54%, rgba(11, 31, 58, 0.72) 70%, rgba(11, 31, 58, 0) 92%);
	pointer-events: none;
}

body .sch-rental-page--request .sch-rental-hero .sch-rental-hero__layout.sch-country-cars-hero .sch-rental-hero__copy {
	position: relative;
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	gap: 12px !important;
	width: 100% !important;
	max-width: 600px !important;
	margin: 0 !important;
	padding: 0 !important;
	text-align: left !important;
}

body .sch-rental-page--request .sch-rental-hero .sch-rental-hero__layout.sch-country-cars-hero .sch-rental-kicker {
	order: 1 !important;
	max-width: none !important;
	margin: 0 !important;
	color: #a8e063 !important;
	font-size: 0.95rem !important;
	font-weight: 700;
	letter-spacing: 0;
	text-align: left !important;
}

body .sch-rental-page--request .sch-rental-hero .sch-rental-hero__layout.sch-country-cars-hero .sch-rental-hero__copy h1 {
	order: 2 !important;
	max-width: none !important;
	margin: 0 !important;
	color: #ffffff !important;
	font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem) !important;
	font-weight: 800;
	line-height: 1.08 !important;
	letter-spacing: 0;
	text-align: left !important;
	text-wrap: balance;
	overflow-wrap: anywhere;
}

body .sch-rental-page--request .sch-rental-hero .sch-rental-hero__layout.sch-country-cars-hero .sch-country-cars-hero__lead {
	order: 3 !important;
	display: block !important;
	max-width: 30rem !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: visible !important;
	color: #ffffff !important;
	font-size: 1.0625rem !important;
	font-weight: 500;
	line-height: 1.5 !important;
	text-align: left !important;
	text-shadow: 0 1px 2px rgba(11, 31, 58, 0.55);
	-webkit-line-clamp: none;
}

body .sch-rental-page--request .sch-rental-hero .sch-rental-hero__layout.sch-country-cars-hero .sch-rental-kind-switch {
	order: 4 !important;
	justify-content: flex-start !important;
	gap: 8px;
	margin: 6px 0 0 !important;
}

body .sch-rental-page--request .sch-rental-hero .sch-rental-hero__layout.sch-country-cars-hero .sch-rental-kind-switch .sch-rental-kind-switch__item {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 18px;
	border: 1.5px solid rgba(255, 255, 255, 0.85) !important;
	background: rgba(11, 31, 58, 0.45) !important;
	color: #ffffff !important;
}

body .sch-rental-page--request .sch-rental-hero .sch-rental-hero__layout.sch-country-cars-hero .sch-rental-kind-switch .sch-rental-kind-switch__item.is-current {
	border-color: #ffffff !important;
	background: #ffffff !important;
	color: #0b1f3a !important;
}

body .sch-rental-page--request .sch-rental-hero .sch-rental-hero__layout.sch-country-cars-hero .sch-rental-kind-switch a.sch-rental-kind-switch__item:hover {
	background: rgba(255, 255, 255, 0.18) !important;
	color: #ffffff !important;
}

body .sch-rental-page--request .sch-rental-hero .sch-rental-hero__layout.sch-country-cars-hero .sch-country-cars-hero__cta {
	order: 5 !important;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	margin: 6px 0 0;
	padding: 12px 22px;
	border-radius: 8px;
	background: #1bae9f;
	color: #0b1f3a !important;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none !important;
	transition: background-color 0.15s ease;
}

body .sch-rental-page--request .sch-rental-hero .sch-rental-hero__layout.sch-country-cars-hero .sch-country-cars-hero__cta:hover {
	background: #3cc4b5;
}

.sch-country-cars-hero__cta .sch-country-cars-icon {
	display: block;
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
}

body .sch-country-cars-hero a:focus-visible {
	outline: 3px solid #ffffff !important;
	outline-offset: 3px;
	box-shadow: 0 0 0 6px #0b1f3a;
}

@media (min-width: 768px) {
	body .sch-rental-page--request .sch-rental-hero .sch-rental-hero__layout.sch-country-cars-hero {
		justify-content: center !important;
		min-height: clamp(420px, 40vw, 500px);
		padding: 48px clamp(32px, 5vw, 64px) !important;
	}

	/* Full bleed: a little taller on wide screens, so the photo keeps the faces and the key in frame. */
	body .sch-rental-page.sch-rental-page--request .sch-rental-hero.wp-block-group > .wp-block-group__inner-container:has(> .sch-rental-hero__layout.sch-country-cars-hero) > .sch-rental-hero__layout.sch-country-cars-hero {
		min-height: clamp(420px, 34vw, 600px);
		padding-top: 48px !important;
		padding-bottom: 48px !important;
	}

	body .sch-country-cars-hero .sch-country-cars-hero__media img.sch-country-cars-hero__image {
		object-position: 66% 22%;
	}

	.sch-country-cars-hero::before {
		background: linear-gradient(90deg, rgba(11, 31, 58, 0.95) 0%, rgba(11, 31, 58, 0.88) 42%, rgba(11, 31, 58, 0.5) 64%, rgba(11, 31, 58, 0) 82%);
	}

	body .sch-rental-page--request .sch-rental-hero .sch-rental-hero__layout.sch-country-cars-hero .sch-rental-hero__copy {
		max-width: min(560px, 60%) !important;
	}
}

/* ---------------------------------------------------------------- Composition */

.sch-country-cars {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 36px;
	box-sizing: border-box;
	width: min(100% - 32px, 1200px);
	max-width: 100%;
	margin: 28px auto 32px;
	color: #102033;
}

@media (min-width: 768px) {
	.sch-country-cars {
		gap: 44px;
		margin-top: 36px;
		margin-bottom: 40px;
	}
}

.sch-country-cars *,
.sch-country-cars *::before,
.sch-country-cars *::after {
	box-sizing: border-box;
}

.sch-country-cars h2,
.sch-country-cars .sch-country-hub--tiles .sch-country-hub__title {
	margin: 0 0 8px;
	color: #0b1f3a;
	font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2rem);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0;
	overflow-wrap: anywhere;
}

.sch-country-cars h3 {
	margin: 0 0 6px;
	color: #0b1f3a;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	overflow-wrap: anywhere;
}

.sch-country-cars p {
	margin: 0;
	line-height: 1.55;
}

/* `body` outranks the theme's `.single-content ul, .single-content ol { padding-left: 2em }`, which loads later and
   had shifted the tiles, steps and notes off the headings' left edge. */
body .sch-country-cars ul,
body .sch-country-cars ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sch-country-cars li {
	margin: 0;
	padding: 0;
}

.sch-country-cars li::before,
.sch-country-cars li::marker {
	content: none;
}

.sch-country-cars .sch-country-cars-icon {
	display: block;
	width: 24px;
	height: 24px;
}

body .sch-country-cars a:focus-visible {
	outline: 3px solid #0d7f77;
	outline-offset: 3px;
}

/* ---------------------------------------------------------------- Destinations */

.sch-country-cars .sch-country-hub.sch-country-hub--tiles {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.sch-country-cars .sch-country-hub--tiles .sch-country-hub__lead {
	max-width: 62ch;
	margin: 0 0 20px;
	color: #536273;
}

.sch-country-cars__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}

.sch-country-cars .sch-country-hub--tiles .sch-country-cars__tiles {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
}

.sch-country-cars .sch-country-hub--tiles .sch-country-cars-tile {
	min-width: 0;
}

.sch-country-cars .sch-country-hub--tiles .sch-country-cars-tile__link {
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr) 24px;
	align-items: center;
	gap: 14px;
	height: 100%;
	min-height: 0;
	padding: 10px 12px 10px 10px;
	border: 1px solid #dbe3ea;
	border-radius: 12px;
	background: #ffffff;
	color: #102033;
	text-decoration: none;
	overflow-wrap: anywhere;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sch-country-cars .sch-country-hub--tiles .sch-country-cars-tile__link:hover {
	border-color: #0d7f77;
	box-shadow: 0 6px 18px rgba(11, 31, 58, 0.08);
	color: #102033;
}

.sch-country-cars-tile__media {
	display: block;
	grid-column: 1;
	width: 104px;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 8px;
	background: #e3f1ef;
}

.sch-country-cars-tile__media img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.sch-country-cars-tile__body {
	display: flex;
	grid-column: 2;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.sch-country-cars .sch-country-hub--tiles .sch-country-cars-tile__name {
	color: #0b1f3a;
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.25;
}

.sch-country-cars-tile__desc {
	color: #536273;
	font-size: 0.875rem;
	line-height: 1.4;
}

.sch-country-cars .sch-country-hub--tiles .sch-country-cars-tile__state {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 3px;
	color: #536273;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
}

.sch-country-cars-tile__state::before {
	content: "";
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #9aa5b1;
}

.sch-country-cars-tile[data-sch-state="published"] .sch-country-cars-tile__state {
	color: #0d7f77;
}

.sch-country-cars-tile[data-sch-state="published"] .sch-country-cars-tile__state::before {
	background: #1bae9f;
}

.sch-country-cars-tile__go {
	display: flex;
	grid-column: 3;
	align-items: center;
	justify-content: center;
	color: #0d7f77;
}

.sch-country-cars-tile__go .sch-country-cars-icon {
	width: 20px;
	height: 20px;
}

/* A tile without an approved image keeps the same grid: the body starts in the first column. */
.sch-country-cars-tile__link > .sch-country-cars-tile__body:first-child {
	grid-column: 1 / 3;
}

@media (min-width: 600px) {
	.sch-country-cars .sch-country-hub--tiles .sch-country-cars__tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}

	.sch-country-cars .sch-country-hub--tiles .sch-country-cars-tile__link {
		grid-template-columns: minmax(0, 1fr) 24px;
		grid-template-rows: auto 1fr;
		align-items: end;
		gap: 0 8px;
		padding: 0 14px 14px 0;
		overflow: hidden;
	}

	.sch-country-cars-tile__media {
		grid-column: 1 / -1;
		grid-row: 1;
		width: auto;
		margin: 0 -14px 12px 0;
		aspect-ratio: 16 / 9;
		border-radius: 0;
	}

	.sch-country-cars-tile__body {
		grid-column: 1;
		grid-row: 2;
		align-self: start;
		padding-left: 14px;
	}

	.sch-country-cars-tile__go {
		grid-column: 2;
		grid-row: 2;
		align-self: end;
	}

	.sch-country-cars-tile__link > .sch-country-cars-tile__body:first-child {
		grid-column: 1;
		padding-top: 14px;
	}
}

@media (min-width: 1024px) {
	.sch-country-cars__grid {
		grid-template-columns: minmax(0, 1fr) 260px;
		gap: 28px;
	}

	.sch-country-cars .sch-country-hub--tiles .sch-country-cars__tiles {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1200px) {
	.sch-country-cars__grid {
		grid-template-columns: minmax(0, 1fr) 290px;
	}

	.sch-country-cars .sch-country-hub--tiles .sch-country-cars__tiles {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* ---------------------------------------------------------------- Static map
 * Phones and tablets: one full-width panel after the tiles, the outline on the left at its own proportions (viewBox,
 * `height: auto`, never stretched) and a north-to-south orientation beside it. From 1024px: the outline alone in the
 * column beside the tiles. Font sizes inside the SVG are user units, so the labels are enlarged where the outline is
 * drawn small.
 */

.sch-country-cars-map {
	display: grid;
	grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
	align-items: stretch;
	gap: 14px;
	width: 100%;
	margin: 0;
	padding: 16px 16px 16px 10px;
	border-radius: 14px;
	background: #eaf4f7;
}

.sch-country-cars-map__svg {
	display: block;
	grid-column: 1;
	width: 100%;
	max-width: 100%;
	height: auto;
	overflow: visible;
	align-self: center;
}

.sch-country-cars-map__land {
	fill: #d9ece6;
	stroke: #8fbfb4;
	stroke-width: 1.2;
	stroke-linejoin: round;
}

.sch-country-cars-map__sea {
	display: none;
	fill: #4f6f7f;
	font-size: 14px;
	font-style: italic;
}

.sch-country-cars-map__point circle {
	fill: #0b1f3a;
	stroke: #ffffff;
	stroke-width: 2.5;
}

.sch-country-cars-map__point text {
	fill: #0b1f3a;
	font-size: 27px;
	font-weight: 700;
	paint-order: stroke;
	stroke: #eaf4f7;
	stroke-width: 5px;
	stroke-linejoin: round;
}

.sch-country-cars-map__caption {
	display: flex;
	grid-column: 2;
	flex-direction: column;
	justify-content: space-between;
	gap: 16px;
	min-width: 0;
	margin: 0;
	color: #536273;
}

.sch-country-cars .sch-country-cars-map__regions {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	flex: 1 1 auto;
	gap: 14px;
}

.sch-country-cars .sch-country-cars-map__region {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-left: 10px;
	border-left: 2px solid #1bae9f;
}

.sch-country-cars-map__region-name {
	color: #536273;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.3;
}

.sch-country-cars-map__region-places {
	color: #0b1f3a;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.3;
}

.sch-country-cars-map__note {
	color: #536273;
	font-size: 0.8125rem;
	line-height: 1.4;
}

@media (min-width: 600px) {
	.sch-country-cars-map {
		grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
		gap: 32px;
		padding: 24px 32px 24px 20px;
	}

	.sch-country-cars-map__sea {
		display: inline;
	}

	.sch-country-cars-map__point circle {
		stroke-width: 2;
	}

	.sch-country-cars-map__point text {
		font-size: 17px;
		stroke-width: 3px;
	}

	.sch-country-cars-map__region-name {
		font-size: 0.875rem;
	}

	.sch-country-cars-map__region-places {
		font-size: 1.0625rem;
	}
}

@media (min-width: 1024px) {
	.sch-country-cars-map {
		display: block;
		padding: 10px 6px;
	}

	.sch-country-cars .sch-country-cars-map__regions {
		display: none;
	}

	.sch-country-cars-map__point text {
		font-size: 16px;
	}

	.sch-country-cars-map__caption {
		display: block;
		margin-top: 6px;
		text-align: center;
	}
}

/* ---------------------------------------------------------------- How car rental works */

.sch-country-cars-steps .sch-country-cars__h2 {
	margin-bottom: 18px;
}

.sch-country-cars-steps__list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 18px;
}

.sch-country-cars-steps__item {
	display: grid;
	grid-template-columns: 34px 28px minmax(0, 1fr);
	align-items: start;
	gap: 12px;
}

.sch-country-cars-steps__num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #0d7f77;
	color: #ffffff;
	font-weight: 800;
	line-height: 1;
}

.sch-country-cars-steps__icon {
	padding-top: 5px;
	color: #0b1f3a;
}

.sch-country-cars-steps__text {
	color: #3e4c5b;
}

/* From 900px the three steps share one row. Each column's share follows the length of its own copy (flex basis =
   the content's max-content width, shrunk in proportion), so the longer third step gets a wider column instead of a
   much taller one; bounds keep every column readable. The number and the icon sit above the heading. */
@media (min-width: 900px) {
	body .sch-country-cars .sch-country-cars-steps__list {
		display: flex;
		align-items: flex-start;
		gap: 32px;
	}

	.sch-country-cars .sch-country-cars-steps__item {
		flex: 1 1 auto;
		grid-template-columns: 34px 28px minmax(0, 1fr);
		grid-template-rows: auto auto;
		gap: 14px 12px;
		min-width: 24%;
		max-width: 42%;
	}

	.sch-country-cars-steps__body {
		grid-column: 1 / -1;
	}

	.sch-country-cars-steps__icon {
		align-self: center;
		padding-top: 0;
	}
}

/* ---------------------------------------------------------------- Practical notes and notice */

.sch-country-cars-notes .sch-country-cars__h2 {
	margin-bottom: 18px;
}

.sch-country-cars-notes__list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
}

/* `.sch-country-cars li` resets list items; the note cards keep their own padding. */
.sch-country-cars .sch-country-cars-notes__item {
	display: grid;
	grid-template-columns: 28px minmax(0, 1fr);
	gap: 14px;
	padding: 18px;
	border: 1px solid #dbe3ea;
	border-radius: 12px;
	background: #ffffff;
}

.sch-country-cars-notes__icon {
	padding-top: 1px;
	color: #0d7f77;
}

.sch-country-cars-notes__text {
	color: #3e4c5b;
}

.sch-country-cars-notice {
	display: grid;
	grid-template-columns: 28px minmax(0, 1fr);
	gap: 14px;
	margin-top: 14px;
	padding: 18px;
	border-radius: 12px;
	background: #eaf4f7;
}

.sch-country-cars-notice__icon {
	padding-top: 1px;
	color: #0b1f3a;
}

.sch-country-cars-notice__text {
	color: #24384d;
}

@media (min-width: 900px) {
	.sch-country-cars-notes__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
	}

	.sch-country-cars .sch-country-cars-notes__item,
	.sch-country-cars-notice {
		padding: 22px;
	}
}

/* ---------------------------------------------------------------- FAQ and Support Center */

.sch-country-cars-faq .sch-country-cars__h2 {
	margin-bottom: 10px;
}

.sch-country-cars-faq__item {
	padding: 16px 0;
	border-bottom: 1px solid #dbe3ea;
}

.sch-country-cars-faq__a {
	color: #3e4c5b;
}

/* One quiet line after the fifth answer, in the normal flow (0.2.97; replaces the 0.2.91 side card). */
.sch-country-cars .sch-country-cars-help {
	margin: 14px 0 0;
	color: #3e4c5b;
	font-size: 0.9375rem;
}

.sch-country-cars .sch-country-cars-help__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	color: #0b5f59;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.sch-country-cars .sch-country-cars-help__link:hover {
	color: #0b1f3a;
}

.sch-country-cars-help__link .sch-country-cars-icon {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
}

@media (prefers-reduced-motion: reduce) {
	.sch-country-cars-hero__cta,
	.sch-country-cars .sch-country-hub--tiles .sch-country-cars-tile__link {
		transition: none;
	}

}
