.ttd-package-carousel {
	position: relative;
	margin: 20px 0;
}

.ttd-package-grid {
	display: flex;
	gap: 24px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	padding: 4px 4px 14px;
	margin: 0 -4px;
	cursor: grab;
	scrollbar-width: thin;
}
.ttd-package-grid.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.ttd-package-grid::-webkit-scrollbar { height: 8px; }
.ttd-package-grid::-webkit-scrollbar-track { background: transparent; }
.ttd-package-grid::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 4px; }

/* [ttd_travel_package id="X"] - a single embedded card, not a scrollable row */
.ttd-package-grid-single {
	display: block;
	overflow: visible;
	cursor: default;
	max-width: 340px;
	padding: 0;
	margin: 20px 0;
}
.ttd-package-grid-single .ttd-package-card { width: 100%; }

.ttd-package-card {
	position: relative;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
	display: flex;
	flex-direction: column;
	flex: 0 0 280px;
	scroll-snap-align: start;
}
@media (max-width: 480px) {
	.ttd-package-card { flex-basis: 82%; }
}

.ttd-carousel-nav {
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	z-index: 5;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #e2e2e2;
	background: #fff;
	box-shadow: 0 2px 6px rgba(0,0,0,0.15);
	font-size: 20px;
	line-height: 1;
	color: #333;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ttd-carousel-nav:hover { background: #f6f6f6; }
.ttd-carousel-nav:disabled { opacity: .35; cursor: default; }
.ttd-carousel-nav:disabled:hover { background: #fff; }
.ttd-carousel-prev { left: -14px; }
.ttd-carousel-next { right: -14px; }
@media (max-width: 640px) {
	.ttd-carousel-nav { display: none; } /* touch/swipe is the primary interaction on small screens */
}

.ttd-card-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: .03em;
}
.ttd-badge-promo { background: #2271b1; }
.ttd-badge-selling_fast { background: #d63638; }
.ttd-badge-closed { background: #787c82; }
.ttd-badge-open { background: #00a32a; }

.ttd-card-image img { width: 100%; height: 190px; object-fit: cover; display: block; }

.ttd-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ttd-card-title { margin: 0; font-size: 16px; font-weight: 700; }
.ttd-card-price { font-size: 15px; }
.ttd-price-regular { text-decoration: line-through; color: #888; font-size: 0.85em; margin-right: 6px; }
.ttd-price-current { color: #d63638; }
.ttd-card-seats, .ttd-card-airline { font-size: 13px; color: #555; margin: 0; }
.ttd-card-airline { font-weight: 700; }

.ttd-book-btn {
	margin-top: auto;
	background: #b3db3c;
	color: #1d2327;
	border: none;
	padding: 10px 16px;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
	font-size: 14px;
}
.ttd-book-btn:disabled { background: #ccc; cursor: not-allowed; }
.ttd-book-btn:hover:not(:disabled) { opacity: .9; }

/* Package details (description / included / excluded) */
.ttd-details-toggle {
	background: none;
	border: none;
	color: #2271b1;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	padding: 4px 0;
	text-align: left;
}
.ttd-details-toggle:hover { text-decoration: underline; }
.ttd-details-toggle[aria-expanded="true"] .ttd-toggle-arrow { display: inline-block; transform: rotate(180deg); }

.ttd-card-details {
	border-top: 1px solid #eee;
	margin-top: 4px;
	padding-top: 10px;
	font-size: 13px;
	color: #333;
}
.ttd-details-description { margin-bottom: 12px; line-height: 1.5; }
.ttd-details-description p { margin: 0 0 8px; }

.ttd-details-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .ttd-details-lists { grid-template-columns: 1fr; } }

.ttd-details-col h4 { margin: 0 0 6px; font-size: 13px; }
.ttd-details-col ul { margin: 0; padding: 0; list-style: none; }
.ttd-details-col li { padding: 2px 0 2px 20px; position: relative; }

.ttd-list-included li::before {
	content: "\2713"; position: absolute; left: 0; color: #00a32a; font-weight: 700;
}
.ttd-list-excluded li::before {
	content: "\2715"; position: absolute; left: 0; color: #d63638; font-weight: 700;
}

/* Modal */
.ttd-modal-overlay {
	position: fixed; inset: 0; background: rgba(0,0,0,.5);
	display: flex; align-items: center; justify-content: center;
	z-index: 100000; padding: 16px;
}
.ttd-modal {
	background: #fff; border-radius: 10px; padding: 24px;
	max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto;
	position: relative;
}
.ttd-modal-close {
	position: absolute; top: 10px; right: 14px;
	background: none; border: none;
	font-size: 26px; font-weight: 700; line-height: 1;
	cursor: pointer;
	color: #d63638 !important;
	z-index: 20;
	padding: 2px 4px;
}
.ttd-modal-close:hover { color: #b32d2e !important; }
.ttd-modal h3 { margin-top: 0; }
#ttd-modal-title { font-size: 16px; font-weight: 700; }
.ttd-modal form label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.ttd-modal form input, .ttd-modal form select {
	display: block; width: 100%; margin-top: 4px; padding: 8px; box-sizing: border-box;
	border: 1px solid #ccc; border-radius: 5px; font-weight: normal;
}
.ttd-pax-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ttd-age-hint { font-weight: normal; color: #888; font-size: 11px; }

.ttd-price-breakdown { font-size: 13px; margin: 12px 0; color: #444; }
.ttd-price-breakdown div { display: flex; justify-content: space-between; padding: 2px 0; }
.ttd-price-total { font-size: 16px; margin-bottom: 14px; text-align: right; }
.ttd-form-error { color: #b32d2e; font-size: 13px; }

/* Itinerary PDF viewer (view-only) */
.ttd-itinerary-btn {
	display: inline;
	margin-top: 6px;
	align-self: flex-start;
	-webkit-appearance: none;
	appearance: none;
	background: none;
	background-color: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
	color: #2271b1;
	text-decoration: underline;
	font: inherit;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
}
.ttd-itinerary-btn:visited { color: #2271b1; }
.ttd-itinerary-btn:hover { color: #d63638; }

.ttd-itinerary-modal {
	max-width: 100vw;
	width: 100vw;
	height: 100vh;
	max-height: 100vh;
	border-radius: 0;
	padding: 16px;
	display: flex;
	flex-direction: column;
	overflow: hidden; /* only the inner viewer scrolls, not the whole modal card */
	user-select: none;
}
.ttd-itinerary-modal h3 { flex: 0 0 auto; padding-right: 32px; }
.ttd-itinerary-viewer {
	flex: 1 1 auto;
	min-height: 0; /* let it actually shrink inside the flex column so the nav bar stays visible */
	max-height: none;
	overflow: auto;
	background: #2b2b2b;
	border-radius: 6px;
	padding: 16px;
	text-align: center;
	display: flex;
	align-items: flex-start;
	justify-content: center;
}
.ttd-itinerary-canvas-wrap { position: relative; display: inline-block; margin: auto; }
#ttd-itinerary-canvas { max-width: 100%; box-shadow: 0 2px 10px rgba(0,0,0,.4); background: #fff; }

.ttd-itinerary-watermark {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	content: "";
	color: rgba(0,0,0,0.08);
	font-size: 14px;
	font-weight: 700;
	text-align: center;
	line-height: 3.2;
	transform: rotate(-28deg);
	pointer-events: none;
	overflow: hidden;
	word-break: break-word;
}

.ttd-itinerary-nav {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 12px;
	gap: 12px;
}
.ttd-itinerary-nav span { font-size: 13px; color: #555; white-space: nowrap; }

.ttd-itinerary-overlay { padding: 0; }
.ttd-itinerary-overlay .ttd-modal-close { top: 16px; right: 20px; font-size: 30px; }

/* [ttd_travel_dates] - stacked, scrollable list of horizontal date cards */
.ttd-dates-stack {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-height: 640px;
	overflow-y: auto;
	padding: 4px;
	margin: 20px 0;
}
.ttd-dates-stack::-webkit-scrollbar { width: 8px; }
.ttd-dates-stack::-webkit-scrollbar-track { background: transparent; }
.ttd-dates-stack::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 4px; }

.ttd-date-card {
	position: relative;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	padding: 14px 18px;
	min-height: 100px; /* comfortable floor so a card's content never feels cramped; grows if content needs more */
}

/* Desktop: status stays an inline pill at the start of the row. The second,
   mobile-only badge (below "seat(s) left") is hidden here. */
.ttd-date-card-badge { flex: 0 0 auto; }
.ttd-date-card-badge .ttd-card-badge { position: static; }

.ttd-date-card-group { display: flex; align-items: center; gap: 16px; }
.ttd-group-when { flex: 1 1 240px; }
.ttd-group-offer { flex: 1 1 260px; }
.ttd-group-action { flex: 0 0 auto; margin-left: auto; }

.ttd-date-card-col { display: flex; flex-direction: column; gap: 2px; }
.ttd-date-card-date { flex: 1 1 130px; font-size: 16px; }
.ttd-date-card-name { flex: 1 1 150px; font-size: 16px; font-weight: 700; line-height: 1.3; }
.ttd-date-card-flight { flex: 1 1 110px; font-size: 13px; font-weight: 700; }
.ttd-date-card-price { flex: 1 1 150px; font-size: 20px; line-height: 1.25; }
.ttd-date-card-price .ttd-price-regular { font-size: 0.7em; }
.ttd-date-card-price .ttd-date-card-sub { font-size: 12px; }
.ttd-date-card-action { flex: 0 0 auto; align-items: center; }
.ttd-date-card-sub { font-size: 12px; color: #777; font-weight: normal; }
.ttd-date-card-seats-note { font-size: 12px; color: #777; margin-top: 4px; text-align: center; }

.ttd-date-card .ttd-book-btn { padding: 8px 18px; white-space: nowrap; }

@media (max-width: 640px) {
	/* Three columns side by side rather than six stacked rows: when / offer / action */
	.ttd-date-card {
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 10px;
		padding: 20px 12px; /* more top/bottom room than left/right, so the last line of info clears the border */
	}
	.ttd-date-card-group {
		flex: 0 1 auto;
		min-width: 0;
		flex-direction: column;
		align-items: flex-start;
		justify-content: center;
		gap: 10px;
		padding: 20px 0; /* single source of truth for column top/bottom spacing - do not override per-column below */
	}
	.ttd-group-when { flex-basis: 34%; }
	.ttd-group-offer { flex-basis: 36%; }
	.ttd-group-action { flex-basis: 30%; margin-left: 0; align-items: stretch; justify-content: center; }
	.ttd-date-card-col { flex: 0 0 auto; width: 100%; }
	.ttd-date-card-date { font-size: 13px; }
	.ttd-date-card-price { font-size: 17px; }
	.ttd-date-card .ttd-book-btn { width: 100%; padding: 10px; font-size: 13px; white-space: normal; }
	.ttd-date-card-seats-note { text-align: center; }

	.ttd-dates-stack { max-height: 80vh; }

	/* No status indicator at all on mobile - the badge/ribbon/pill are all removed there. */
	.ttd-date-card-badge { display: none; }
	.ttd-date-card-name { font-size: 14px; }
}

/* Travel dates card: centre every piece of info (horizontally and vertically).
   Scoped to .ttd-date-card only - the booking popup is left as is. */
.ttd-date-card { justify-content: center; }
.ttd-date-card .ttd-date-card-group { justify-content: center; align-items: center; text-align: center; }
.ttd-date-card .ttd-date-card-col { align-items: center; justify-content: center; text-align: center; }
.ttd-date-card .ttd-date-card-seats-note { text-align: center; }

@media (max-width: 640px) {
	.ttd-date-card .ttd-date-card-group { align-items: center; justify-content: center; }
	.ttd-date-card .ttd-date-card-col { align-items: center; }
}

/* Package start (travel) date colour */
.ttd-date-card .ttd-date-card-date strong,
.ttd-start-date { color: #0478cb; }

/* Package start date: normal weight (not bold) */
.ttd-date-card .ttd-date-card-date strong { font-weight: 400; }
.ttd-start-date { font-weight: 400; }

/* Jenis Pakej on the travel dates card: normal weight (not bold) */
.ttd-date-card .ttd-date-card-name,
.ttd-date-card .ttd-date-card-name strong { font-weight: 400; }

/* Popup: Jenis Pakej row, directly under the package title */
.ttd-modal-jenis { margin: -4px 0 12px; font-size: 14px; color: #444; }
.ttd-modal-jenis span { font-weight: 600; }
