/*
 * Raiden Tours - single tour additions on the travel design (big slider,
 * route map, wishlist, Explore Sri Lanka list, mobile sidebar drawer).
 * Loaded with data-rhp, so it is not re-scoped by HTML Pages; the page's
 * own parts are reached through .rhp-page.
 */

/* Single tour: the theme's #page_wrapper has overflow:hidden, which stops the
   template's sticky sidebar. "clip" cuts the same overflow but lets sticky work
   (user 2026-10-31: tour pages only). Browsers without "clip" keep "hidden". */
body.single-tour #page_wrapper {
	overflow: clip;
}

/* ---------- big image slider + thumbnail strip ---------- */
.rhp-page .dsg-tour-gallery-main {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
}
.rhp-page .dsg-tour-gallery-main .swiper-slide img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}
.rhp-page .dsg-tour-gallery-arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin-top: -23px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--tp-common-black, #071516);
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
	transition: background 0.2s, color 0.2s;
}
.rhp-page .dsg-tour-gallery-arrow:hover {
	background: var(--tp-theme-1, #FD4621);
	color: #fff;
}
.rhp-page .dsg-tour-gallery-prev { left: 16px; }
.rhp-page .dsg-tour-gallery-next { right: 16px; }
.rhp-page .dsg-tour-gallery-thumbs {
	margin-top: 12px;
}
.rhp-page .dsg-tour-gallery-thumbs .swiper-slide {
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: 10px;
	opacity: 0.55;
	cursor: pointer;
	transition: opacity 0.25s, border-color 0.25s;
}
.rhp-page .dsg-tour-gallery-thumbs .swiper-slide:hover {
	opacity: 0.85;
}
.rhp-page .dsg-tour-gallery-thumbs .swiper-slide-thumb-active {
	border-color: var(--tp-theme-1, #FD4621);
	opacity: 1;
}
.rhp-page .dsg-tour-gallery-thumbs .swiper-slide img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
@media (max-width: 575.98px) {
	.rhp-page .dsg-tour-gallery-arrow { width: 38px; height: 38px; margin-top: -19px; }
	.rhp-page .dsg-tour-gallery-prev { left: 10px; }
	.rhp-page .dsg-tour-gallery-next { right: 10px; }
}

/* ---------- tour photos keep the template images' proportions ---------- */
.rhp-page .tp-tour-details-2-gallery .tp-instagram-thumb img {
	width: 100%;
	height: auto;
	aspect-ratio: 424 / 360;
	object-fit: cover;
}
.rhp-page .tp-tour-dayfilter-thumb img {
	width: 100%;
	height: auto;
	aspect-ratio: 140 / 126;
	object-fit: cover;
}
.rhp-page .tp-tour-details-place-thumb img {
	width: 100%;
	height: auto;
	aspect-ratio: 240 / 210;
	object-fit: cover;
}
.rhp-page .tp-tour-itinerary-thumb img {
	width: 100%;
	height: auto;
	aspect-ratio: 780 / 250;
	object-fit: cover;
}

/* tour cards (Explore iconic travel. / Latest Travel Packages): the template image size */
.rhp-page .tp-tour-thumb .image img {
	width: 100%;
	height: auto;
	aspect-ratio: 752 / 468;
	object-fit: cover;
}

/* cards in a grid row: the same height, "Book A tour" on one line (user 2026-10-31) */
.rhp-page .rt-card-col {
	display: flex;
}
.rhp-page .rt-card-col > .tp-tour-item {
	display: flex;
	flex-direction: column;
	width: 100%;
}
.rhp-page .rt-card-col .tp-tour-content {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}
.rhp-page .rt-card-col .tp-tour-footer {
	margin-top: auto;
}

/* Destination Routes: no arrow after the last place (user 2026-10-31) */
.rhp-page .tp-tour-destination-filters:not(.tp-tour-destination-filters-2) li:last-child a span {
	display: none;
}

/* Long words ("Sigiriya/Dambulla/Habarana") break instead of running off narrow
   screens (user 2026-10-31). Only words that can't fit a line are broken. */
.rhp-page .tp-tour-details-plan-list h4,
.rhp-page .tp-tour-details-content > h3,
.rhp-page .tp-tour-title,
.rhp-page .tp-faq-title,
.rhp-page .tp-tour-details-place-thumb span,
.rhp-page .tp-tour-details-destination-city,
.rhp-page .tp-tour-details-info-content h3 {
	overflow-wrap: anywhere;
}

/* Trip info: the template goes to 3 columns from 1400px, but the column beside
   the sidebar stays 756px wide, so "English-Speaking Driver-Guide" broke over 3
   lines. Keep 2 columns (user 2026-10-31). */
@media (min-width: 1400px) {
	body.single-tour .rhp-page .tp-tour-details-info ul {
		grid-template-columns: 1fr 1fr;
	}
}

/* Tour Plan: place names link to their Insights articles, first mention only,
   with a light underline so the text stays easy to read (user 2026-10-31). */
.rhp-page .tp-tour-details-plan-list p a.rt-place-link {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: rgba(253, 70, 33, 0.45);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.rhp-page .tp-tour-details-plan-list p a.rt-place-link:hover {
	color: #FD4621;
	text-decoration-color: currentColor;
}

/* ---------- wishlist ---------- */
.rhp-page .rt-wishlist-btn.is-active {
	color: var(--tp-theme-1, #FD4621);
}
.rhp-page .rt-wishlist-btn.is-active svg path {
	fill: currentColor;
	stroke: currentColor;
}

/* ---------- route map ---------- */
.rhp-page .dsg-tour-route .tp-tour-details-map {
	margin-bottom: 20px !important;
}
.rhp-page .dsg-tour-map {
	position: relative;
	z-index: 0; /* keep Leaflet's panes under the site header */
	width: 100%;
	height: 420px;
	border-radius: 16px;
	background: var(--tp-grey-3, #f7f9f9);
}
.rhp-page .dsg-tour-map img {
	max-width: none;
}
@media (max-width: 767.98px) {
	.rhp-page .dsg-tour-map { height: 320px; }
}
.rhp-page .rt-map-pin {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px !important;
	height: 30px !important;
	margin: -15px 0 0 -15px !important;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--tp-theme-1, #FD4621);
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
	color: #fff;
	font: 700 13px/1 var(--tp-ff-inter, sans-serif);
}
.rhp-page .dsg-tour-route-stops {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.rhp-page .dsg-tour-route-stops li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	color: var(--tp-common-black, #071516);
}
.rhp-page .dsg-tour-route-stops a {
	color: inherit;
}
.rhp-page .dsg-tour-route-stops a:hover {
	color: var(--tp-theme-1, #FD4621);
}
.rhp-page .dsg-tour-route-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--tp-theme-1, #FD4621);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}
.rhp-page .dsg-tour-route-days {
	color: var(--tp-grey-1, #5f556a);
	font-size: 14px;
	font-weight: 400;
}

/* ---------- places: name links ---------- */
.rhp-page .tp-tour-details-place-thumb span a {
	color: inherit;
}

/* ---------- reviews entered by the admin ---------- */
.rhp-page .rt-review-initial {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--tp-common-petals, #EBF8EB);
	color: var(--tp-theme-1, #FD4621);
	font-size: 22px;
	font-weight: 700;
	text-transform: uppercase;
}
.rhp-page .tp-tour-review-rating .rt-star-off {
	opacity: 0.25;
}

/* ---------- sidebar: Explore Sri Lanka (Insights travel places) ---------- */
.rhp-page .dsg-explore {
	padding: 34px 26px 22px;
}
.rhp-page .dsg-explore-title {
	margin-bottom: 4px;
	font-size: 22px;
}
.rhp-page .dsg-explore-sub {
	margin-bottom: 16px;
	color: var(--tp-grey-1, #5f556a);
	font-size: 14px;
}
.rhp-page .dsg-explore-group {
	border-top: 1px solid var(--tp-border-1, rgba(17, 17, 17, 0.08));
}
.rhp-page .dsg-explore-head {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 14px 2px;
	border: 0;
	background: none;
	color: var(--tp-common-black, #071516);
	font-size: 16px;
	font-weight: 600;
	text-align: left;
}
.rhp-page .dsg-explore-head:hover,
.rhp-page .dsg-explore-head[aria-expanded="true"] {
	color: var(--tp-theme-1, #FD4621);
}
.rhp-page .dsg-explore-count {
	margin-left: auto;
	padding: 2px 9px;
	border-radius: 20px;
	background: var(--tp-grey-3, #f7f9f9);
	color: var(--tp-grey-1, #5f556a);
	font-size: 12px;
	font-weight: 500;
}
.rhp-page .dsg-explore-chev {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin: -4px 4px 0 2px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.25s;
}
.rhp-page .dsg-explore-head[aria-expanded="true"] .dsg-explore-chev {
	margin-top: 4px;
	transform: rotate(-135deg);
}
/* About 8 places in view; the list scrolls inside its own box, not the page. */
.rhp-page .dsg-explore-places ul {
	max-height: 296px;
	margin: 0 0 8px;
	padding: 0 6px 0 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	list-style: none;
	scrollbar-width: thin;
	scrollbar-color: rgba(17, 17, 17, 0.25) transparent;
}
.rhp-page .dsg-explore-places ul::-webkit-scrollbar { width: 5px; }
.rhp-page .dsg-explore-places ul::-webkit-scrollbar-thumb { border-radius: 5px; background: rgba(17, 17, 17, 0.25); }
.rhp-page .dsg-explore-places li a {
	display: block;
	padding: 8px 10px;
	border-radius: 8px;
	color: var(--tp-grey-1, #5f556a);
	font-size: 15px;
	line-height: 21px;
}
.rhp-page .dsg-explore-places li a:hover {
	background: var(--tp-grey-3, #f7f9f9);
	color: var(--tp-theme-1, #FD4621);
}
.rhp-page .dsg-explore-all {
	display: inline-block;
	margin: 2px 0 14px 10px;
	color: var(--tp-theme-1, #FD4621);
	font-size: 14px;
	font-weight: 600;
}

/* ---------- desktop: the price box stays on screen ----------
 * The sidebar (price, form, Explore list) is taller than most screens. It now
 * scrolls with the page and only the price box sticks, below the theme's
 * sticky menu (user 2026-10-31). The sidebar is stretched to the full height
 * of the tour details, so the price box stays until the details end. */
@media (min-width: 992px) {
	body.single-tour .rhp-page .tp-tour-details-2-content .col-lg-5 {
		display: flex;
		flex-direction: column;
	}
	body.single-tour .rhp-page .tp-tour-details-2-content .tp-booking-sidebar-wrap {
		position: static;
		flex: 1 0 auto;
	}
	body.single-tour .rhp-page .tp-booking-sidebar-wrap > .tp-republic-day-sale {
		position: sticky;
		top: 51px; /* the theme's sticky menu is 31px */
		z-index: 2;
		background-color: #fff;
	}
	body.single-tour.admin-bar .rhp-page .tp-booking-sidebar-wrap > .tp-republic-day-sale {
		top: 83px;
	}
	/* Covers the 20px gap above it, so the form scrolling under doesn't show there. */
	body.single-tour .rhp-page .tp-booking-sidebar-wrap > .tp-republic-day-sale::before {
		content: "";
		position: absolute;
		right: -1px;
		bottom: 100%;
		left: -1px;
		height: 20px;
		background: #fff;
	}
}

/* ---------- mobile / tablet: the sidebar as a drawer from the right ----------
 * Below 992px the sidebar is moved into .rt-drawer-host, a second .rhp-page
 * box on <body>: the page's own .rhp-page is a stacking context (z-index 0), so
 * a drawer inside it could never sit above the theme's fixed parts. */
.rt-drawer-tab,
.rt-drawer-backdrop,
.rhp-page.rt-drawer-host {
	display: none;
}
@media (max-width: 991.98px) {
	.rhp-page.rt-drawer-host {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		z-index: 100002;
		display: block;
		width: min(85vw, 380px);
		padding: 24px 16px 32px;
		overflow-y: auto;
		overscroll-behavior: contain;
		background: #fff;
		box-shadow: -10px 0 30px rgba(0, 0, 0, 0.18);
		transform: translateX(100%);
		visibility: hidden;
	}
	.rhp-page.rt-drawer-host.is-open {
		transform: none;
		visibility: visible;
	}
	/* Animated only after the first paint, so the page doesn't open with the drawer sliding away. */
	.rhp-page.rt-drawer-host.rt-drawer-anim {
		transition: transform 0.35s ease, visibility 0s linear 0.35s;
	}
	.rhp-page.rt-drawer-host.rt-drawer-anim.is-open {
		transition: transform 0.35s ease, visibility 0s;
	}
	.rhp-page.rt-drawer-host .tp-booking-sidebar-wrap {
		position: static;
		margin: 0 !important;
	}
	.rhp-page.rt-drawer-host .tp-booking-sidebar-item {
		margin-bottom: 20px !important;
	}
	.rt-drawer-tab {
		position: fixed;
		top: 50%;
		right: 0;
		z-index: 100003;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 30px; /* slim, so it covers little of the text under it */
		height: 64px;
		margin: -32px 0 0;
		padding: 0;
		border: 0;
		border-radius: 12px 0 0 12px;
		background: #FD4621;
		box-shadow: -4px 4px 14px rgba(0, 0, 0, 0.2);
		color: #fff;
		cursor: pointer;
		transition: right 0.35s ease;
	}
	.rt-drawer-tab svg {
		transition: transform 0.35s ease;
	}
	.rt-drawer-tab[aria-expanded="true"] {
		right: min(85vw, 380px);
	}
	.rt-drawer-tab[aria-expanded="true"] svg {
		transform: rotate(180deg);
	}
	.rt-drawer-backdrop {
		position: fixed;
		inset: 0;
		z-index: 100001;
		display: block;
		background: rgba(7, 21, 22, 0.5);
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.35s;
	}
	.rt-drawer-backdrop.is-open {
		opacity: 1;
		pointer-events: auto;
	}
	body.rt-drawer-open {
		overflow: hidden;
	}
}

/* ---------- enquiry forms ---------- */
.rt-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.rhp-page .rt-enquiry-msg:empty {
	display: none;
}
.rhp-page .rt-enquiry-msg {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.45;
}
.rhp-page .rt-enquiry-msg.is-ok {
	background: var(--tp-common-petals, #EBF8EB);
	color: #1e6b2a;
}
.rhp-page .rt-enquiry-msg.is-error {
	background: #fdecea;
	color: #b32d2e;
}

/* ---------- tours list page (/tours/) ---------- */
.rhp-page .rt-where-pick {
	cursor: pointer;
}
.rhp-page .rt-filter-clear {
	display: inline-block;
	margin-top: 10px;
	color: var(--tp-theme-1, #FD4621);
	font-weight: 600;
}
.rhp-page .rt-list-empty {
	padding: 60px 20px;
	border: 1px dashed var(--tp-border-1, rgba(17, 17, 17, 0.12));
	border-radius: 16px;
	text-align: center;
}
.rhp-page .rt-list-empty h3 {
	margin-bottom: 10px;
	font-size: 22px;
}
.rhp-page .rt-list-empty a {
	color: var(--tp-theme-1, #FD4621);
	font-weight: 600;
}
