/* ==========================================================================
   Bali Jeep Sunrise Tour — OTA style layer (GYG / Klook / Viator inspired)
   Colors, type & spacing come from theme.json presets.
   ========================================================================== */

:root {
	--bjst-radius: 14px;
	--bjst-radius-sm: 10px;
	--bjst-shadow: 0 4px 20px rgba(26, 43, 73, 0.08);
	--bjst-shadow-hover: 0 10px 30px rgba(26, 43, 73, 0.16);
	--bjst-wa: #25D366;
	--bjst-wa-dark: #128C4A;
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
img { height: auto; }

/* ---------- Header ---------- */
.bjst-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: #fff;
	box-shadow: 0 1px 0 var(--wp--preset--color--border);
}
.admin-bar .bjst-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .bjst-header { top: 0; } }
.bjst-header .wp-block-site-title a { text-decoration: none; color: var(--wp--preset--color--secondary); }
.bjst-header .wp-block-site-title a span { color: var(--wp--preset--color--primary); }

/* Top announcement bar */
.bjst-topbar a { color: inherit; text-decoration: underline; }

/* ---------- Buttons ---------- */
.wp-block-button__link { transition: background-color .2s, transform .2s, box-shadow .2s; }
.wp-block-button__link:hover { transform: translateY(-1px); }
.wp-block-button.is-style-whatsapp .wp-block-button__link,
.bjst-btn--wa {
	background: var(--bjst-wa) !important;
	color: #fff !important;
}
.wp-block-button.is-style-whatsapp .wp-block-button__link:hover,
.bjst-btn--wa:hover { background: var(--bjst-wa-dark) !important; }
.wp-block-button.is-style-whatsapp .wp-block-button__link::before {
	content: "";
	display: inline-block;
	width: 1.1em; height: 1.1em;
	margin-right: .45em;
	vertical-align: -0.18em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2Zm4.5 12.1c-.2-.1-1.5-.7-1.7-.8-.2-.1-.4-.1-.6.1l-.8 1c-.1.2-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.3-.4.3-.4.7-1.4.1-.2 0-.3 0-.4l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2c0 1.3.9 2.5 1 2.7.1.2 1.8 2.8 4.4 3.9 1.6.7 2.3.8 3.1.6.5-.1 1.5-.6 1.7-1.2.2-.6.2-1.1.2-1.2-.1-.1-.2-.2-.4-.3Z'/%3E%3C/svg%3E") center/contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2Zm4.5 12.1c-.2-.1-1.5-.7-1.7-.8-.2-.1-.4-.1-.6.1l-.8 1c-.1.2-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.3-.4.3-.4.7-1.4.1-.2 0-.3 0-.4l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2c0 1.3.9 2.5 1 2.7.1.2 1.8 2.8 4.4 3.9 1.6.7 2.3.8 3.1.6.5-.1 1.5-.6 1.7-1.2.2-.6.2-1.1.2-1.2-.1-.1-.2-.2-.4-.3Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.wp-block-button.is-style-outline .wp-block-button__link { border-width: 2px; }

.bjst-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	width: 100%;
	padding: .9rem 1.2rem;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s;
}
.bjst-btn:hover { background: var(--wp--preset--color--primary-dark); color: #fff; }

/* ---------- Card style (Group → Styles → Card) ---------- */
.wp-block-group.is-style-card {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--bjst-radius);
	box-shadow: var(--bjst-shadow);
	overflow: hidden;
}

/* ---------- Tour cards (OTA grid) ---------- */
.bjst-tour-card {
	position: relative;
	height: 100%;
	transition: transform .2s, box-shadow .2s;
}
.bjst-tour-card:hover { transform: translateY(-3px); box-shadow: var(--bjst-shadow-hover); }
.bjst-tour-card .wp-block-image { margin: 0; }
.bjst-tour-card .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; display: block; }
.bjst-tour-card .bjst-tour-card__body { padding: 1rem 1.1rem 1.25rem; }
.bjst-tour-card h3 { margin: .25rem 0 .5rem; font-size: 1.15rem; }
.bjst-tour-card h3 a { color: var(--wp--preset--color--secondary); text-decoration: none; }
.bjst-tour-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.bjst-tour-card .bjst-eyebrow { margin: 0; }
.bjst-tour-card .bjst-card-meta { margin: 0; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--x-small); }
.bjst-card-price { margin: .75rem 0 0; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.bjst-card-price strong { font-size: 1.2rem; color: var(--wp--preset--color--secondary); }

.bjst-badge {
	position: absolute;
	top: 12px; left: 12px;
	z-index: 2;
	margin: 0 !important;
	padding: .25rem .65rem;
	border-radius: 6px;
	background: var(--wp--preset--color--secondary);
	color: #fff;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: .02em;
}
.bjst-badge.is-hot { background: var(--wp--preset--color--primary); }

.bjst-eyebrow {
	color: var(--wp--preset--color--primary-dark);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
}

/* ---------- Chips (duration / pickup / cancellation) ---------- */
.bjst-chips { gap: .5rem !important; }
.bjst-chips p,
.bjst-chip {
	margin: 0 !important;
	padding: .35rem .8rem;
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	color: var(--wp--preset--color--secondary);
	white-space: nowrap;
}
.bjst-chips p.is-green { background: #E7F6EF; border-color: #BFE6D3; color: var(--wp--preset--color--success); }

/* ---------- Hero ---------- */
.bjst-hero { min-height: min(78vh, 680px); }
.bjst-hero h1 { text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.bjst-hero .bjst-searchbox {
	background: #fff;
	border-radius: 999px;
	padding: .5rem .5rem .5rem 1.25rem !important;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
	max-width: 760px;
}
.bjst-searchbox p { margin: 0; color: var(--wp--preset--color--secondary); }
.bjst-searchbox .wp-block-buttons { margin: 0; }
@media (max-width: 600px) {
	.bjst-hero .bjst-searchbox { border-radius: var(--bjst-radius); padding: 1rem !important; }
	.bjst-searchbox .wp-block-button, .bjst-searchbox .wp-block-button__link { width: 100%; }
}

/* ---------- Trust bar ---------- */
.bjst-trust .wp-block-column { display: flex; gap: .75rem; align-items: flex-start; }
.bjst-trust .bjst-icon { font-size: 1.6rem; line-height: 1; margin: 0; flex: 0 0 auto; }
.bjst-trust h3 { font-size: 1rem; margin: 0 0 .15rem; }
.bjst-trust p { margin: 0; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }

/* ---------- Breadcrumbs ---------- */
.bjst-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--muted); }
.bjst-breadcrumbs li + li::before { content: "›"; margin-right: .35rem; }
.bjst-breadcrumbs a { color: var(--wp--preset--color--muted); text-decoration: none; }
.bjst-breadcrumbs a:hover { text-decoration: underline; }

/* ---------- Tour gallery (1 large + 4 small, like GYG) ---------- */
.wp-block-gallery.bjst-gallery {
	display: grid !important;
	grid-template-columns: 2fr 1fr 1fr;
	grid-template-rows: 200px 200px;
	gap: 8px !important;
	border-radius: var(--bjst-radius);
	overflow: hidden;
}
.wp-block-gallery.bjst-gallery > figure.wp-block-image { width: 100% !important; margin: 0 !important; height: 100%; }
.wp-block-gallery.bjst-gallery > figure.wp-block-image img { width: 100%; height: 100% !important; object-fit: cover; }
.wp-block-gallery.bjst-gallery > figure:first-child { grid-row: 1 / span 2; }
.wp-block-gallery.bjst-gallery > figure:nth-child(n+6) { display: none; }
@media (max-width: 782px) {
	.wp-block-gallery.bjst-gallery {
		display: flex !important;
		flex-wrap: nowrap !important;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		border-radius: var(--bjst-radius-sm);
	}
	.wp-block-gallery.bjst-gallery > figure.wp-block-image { flex: 0 0 85% !important; scroll-snap-align: start; height: 240px; }
	.wp-block-gallery.bjst-gallery > figure:nth-child(n+6) { display: block; }
}

/* ---------- Tour layout: sticky booking column ---------- */
.bjst-tour-columns { align-items: flex-start !important; }
.bjst-sticky { position: sticky; top: 96px; align-self: flex-start; }
.admin-bar .bjst-sticky { top: 128px; }
@media (max-width: 781px) { .bjst-sticky { position: static; } }

.bjst-section-title { padding-top: .5rem; }
.bjst-tour-main h2 { font-size: 1.45rem; margin-top: 2.25rem; }
.bjst-tour-main > h2:first-child { margin-top: 0; }

/* ---------- Lists: check / cross / timeline ---------- */
ul.is-style-check, ul.is-style-cross { list-style: none; padding-left: 0; }
ul.is-style-check li, ul.is-style-cross li { position: relative; padding-left: 1.9rem; margin-bottom: .5rem; }
ul.is-style-check li::before,
ul.is-style-cross li::before {
	position: absolute; left: 0; top: .15em;
	width: 1.25rem; height: 1.25rem; border-radius: 50%;
	display: grid; place-items: center;
	font-size: .75rem; font-weight: 800;
}
ul.is-style-check li::before { content: "✓"; background: #E7F6EF; color: var(--wp--preset--color--success); }
ul.is-style-cross li::before { content: "✕"; background: #FDECEC; color: #C62828; }

ul.is-style-timeline, ol.is-style-timeline { list-style: none; padding-left: 0; margin-left: .4rem; border-left: 2px dashed var(--wp--preset--color--border); }
.is-style-timeline li { position: relative; padding: 0 0 1.25rem 1.5rem; }
.is-style-timeline li::before {
	content: ""; position: absolute; left: -9px; top: .35em;
	width: 14px; height: 14px; border-radius: 50%;
	background: #fff; border: 3px solid var(--wp--preset--color--primary);
}
.is-style-timeline li:last-child { padding-bottom: 0; }
.is-style-timeline li strong:first-child { display: inline-block; min-width: 3.4rem; color: var(--wp--preset--color--primary-dark); }

/* ---------- Highlights box ---------- */
.bjst-highlights { background: var(--wp--preset--color--tint); border-radius: var(--bjst-radius); }

/* ---------- FAQ (core/details) ---------- */
.wp-block-details summary {
	cursor: pointer;
	list-style: none;
	font-weight: 700;
	color: var(--wp--preset--color--secondary);
	position: relative;
	padding-right: 2rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
	font-size: 1.4rem; font-weight: 400; color: var(--wp--preset--color--primary);
}
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > *:not(summary) { margin-top: .6rem; color: var(--wp--preset--color--muted); }

/* ---------- Reviews ---------- */
.bjst-stars { color: var(--wp--preset--color--accent); letter-spacing: .1em; margin: 0; }
.bjst-review cite { font-style: normal; font-weight: 700; color: var(--wp--preset--color--secondary); }

/* ---------- Booking widget ---------- */
.bjst-booking {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--bjst-radius);
	box-shadow: var(--bjst-shadow);
	padding: 1.25rem;
}
.bjst-booking__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--wp--preset--color--border); }
.bjst-booking__price strong { font-size: 1.6rem; line-height: 1.1; color: var(--wp--preset--color--secondary); }
.bjst-booking__from, .bjst-booking__unit { font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--muted); }
.bjst-booking__unit { flex-basis: 100%; }
.bjst-booking__form { display: grid; gap: .8rem; }
.bjst-field { display: grid; gap: .3rem; font-size: var(--wp--preset--font-size--x-small); font-weight: 700; color: var(--wp--preset--color--secondary); }
.bjst-field input, .bjst-field select {
	width: 100%;
	box-sizing: border-box;
	min-height: 46px;
	padding: .6rem .75rem;
	border: 1px solid #CBD2DD;
	border-radius: var(--bjst-radius-sm);
	background: #fff;
	font: inherit;
	font-size: 16px; /* avoids iOS zoom */
	font-weight: 400;
	color: var(--wp--preset--color--secondary);
}
.bjst-field input:focus, .bjst-field select:focus { outline: 2px solid var(--wp--preset--color--primary); outline-offset: 1px; border-color: transparent; }
.bjst-field-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: .6rem; }
.bjst-booking__total { display: flex; justify-content: space-between; align-items: baseline; padding: .7rem .8rem; background: var(--wp--preset--color--surface); border-radius: var(--bjst-radius-sm); font-size: var(--wp--preset--font-size--small); }
.bjst-booking__total strong { font-size: 1.15rem; color: var(--wp--preset--color--secondary); }
.bjst-booking__error { margin: 0; color: #C62828; font-size: var(--wp--preset--font-size--x-small); }
.bjst-booking__perks { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .4rem; font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--muted); }
.bjst-booking__perks li { padding-left: 1.4rem; position: relative; }
.bjst-booking__perks li::before { content: "✓"; position: absolute; left: 0; color: var(--wp--preset--color--success); font-weight: 800; }

/* ---------- Mobile sticky booking bar ---------- */
.bjst-mobilebar { display: none; }
@media (max-width: 781px) {
	.bjst-mobilebar {
		display: flex;
		position: fixed;
		left: 0; right: 0; bottom: 0;
		z-index: 60;
		align-items: center;
		justify-content: space-between;
		gap: 1rem;
		padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
		background: #fff;
		box-shadow: 0 -4px 20px rgba(26, 43, 73, .12);
	}
	.bjst-mobilebar .bjst-btn { width: auto; padding: .75rem 1.2rem; }
	.bjst-mobilebar small { color: var(--wp--preset--color--muted); }
	.bjst-mobilebar strong { font-size: 1.1rem; color: var(--wp--preset--color--secondary); }
	body:has(.bjst-mobilebar) { padding-bottom: 76px; }
	body:has(.bjst-mobilebar) .bjst-wa-float { display: none; }
}

/* ---------- Floating WhatsApp ---------- */
.bjst-wa-float {
	position: fixed;
	right: 20px; bottom: 20px;
	z-index: 55;
	width: 58px; height: 58px;
	border-radius: 50%;
	display: grid; place-items: center;
	background: var(--bjst-wa);
	color: #fff;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
	transition: transform .2s;
}
.bjst-wa-float:hover { transform: scale(1.07); color: #fff; }

/* ---------- Comparison table ---------- */
.bjst-compare table { border-collapse: separate; border-spacing: 0; border: 1px solid var(--wp--preset--color--border); border-radius: var(--bjst-radius); overflow: hidden; font-size: var(--wp--preset--font-size--small); }
.bjst-compare th { background: var(--wp--preset--color--secondary); color: #fff; text-align: left; }
.bjst-compare td, .bjst-compare th { padding: .75rem 1rem; border: 0; border-bottom: 1px solid var(--wp--preset--color--border); }
.bjst-compare tr:last-child td { border-bottom: 0; }

/* ---------- Footer ---------- */
.bjst-footer a { color: #fff; text-decoration: none; opacity: .85; }
.bjst-footer a:hover { opacity: 1; text-decoration: underline; }
.bjst-footer .wp-block-list { list-style: none; padding: 0; }
.bjst-footer .wp-block-list li { margin-bottom: .45rem; }

/* ---------- Blog cards ---------- */
.wp-block-post-template .wp-block-post-featured-image img { border-radius: var(--bjst-radius-sm); aspect-ratio: 16 / 10; object-fit: cover; }
.wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--secondary); }

/* ---------- Utilities ---------- */
.bjst-muted { color: var(--wp--preset--color--muted); }
.bjst-placeholder { outline: 2px dashed var(--wp--preset--color--primary); outline-offset: 4px; }
@media (max-width: 600px) { .bjst-hide-mobile { display: none !important; } }

/* No gap between header / main / footer */
.wp-site-blocks > * { margin-block-start: 0; }
main.wp-block-group > .alignfull:last-child { margin-bottom: 0; }

/* Top bar: WhatsApp number + social icons */
.bjst-topbar__wa { color: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; }
.bjst-topbar__wa:hover { color: var(--wp--preset--color--accent); }
.bjst-topbar .wp-block-social-links { margin: 0; }
.bjst-topbar .wp-block-social-link a { padding: 0; }
.bjst-topbar .wp-block-social-links .wp-social-link svg { width: 18px; height: 18px; }
.bjst-topbar a.bjst-topbar__wa { text-decoration: none; }
.bjst-topbar .wp-block-social-link-label.screen-reader-text,
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.bjst-footer { border-top: 1px solid rgba(255,255,255,.12); }
.bjst-footer p { text-align: center; color: #C9D2E3; }
.bjst-booking__note { margin: 0; font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--primary-dark); font-weight: 600; }
.bjst-booking [hidden] { display: none !important; }
