/*
 * The trip editor in the trip page's two columns (templates/admin/trip/editor.html, banner.html, price.html):
 * the breadcrumb, title and photos on the left with the sections under them, the price box beside, as
 * src/components/pages/TripPage.tsx lays them out.
 */
.eb-trip-grid {
	align-items: start;
	display: grid;
	gap: 1.5rem;
	grid-template-columns: minmax(0, 1fr) 360px;
}

.eb-trip-main {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	min-width: 0;
}

.eb-trip-side {
	position: sticky;
	top: 1rem;
}

@media (max-width: 1100px) {
	.eb-trip-grid { grid-template-columns: minmax(0, 1fr); }
	.eb-trip-side { order: -1; position: static; }
}

/* The top: breadcrumb, title and rating on the page, the summary, then the photos (TripTitle.tsx, TripGallery.tsx). */
.eb-trip-top {
	background: #fff;
	border-radius: 0.75rem;
	box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	padding: 1.25rem 1.75rem 1.75rem;
	position: relative;
}

.eb-trip-top-row {
	align-items: center;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	padding-right: 9rem;  /* room for Edit, top right */
}

.eb-trip-crumb {
	color: var(--color-base-500);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.8125rem;
	gap: 0.375rem;
}

.eb-trip-crumb span + span::before {
	content: "/";
	margin-right: 0.375rem;
}

.eb-trip-title {
	color: var(--color-base-900);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.15;
	text-wrap: balance;
}

.eb-trip-rating,
.eb-trip-lead {
	color: var(--color-base-700);
}

.eb-trip-lead {
	font-size: 1.0625rem;
	max-width: 70ch;
}

.eb-trip-banner-buttons {
	position: absolute;
	right: 1.75rem;
	top: 1.25rem;
}

/* Up to four photos in one frame: the cover large, the others beside it. */
.eb-gallery {
	aspect-ratio: 2 / 1;
	display: grid;
	gap: 0.5rem;
	margin-top: 0.5rem;
	position: relative;
}

.eb-gallery:not(.eb-gallery-1) { grid-template-columns: 3fr 2fr; }

.eb-gallery-side {
	display: grid;
	gap: 0.5rem;
	min-height: 0;
}

.eb-gallery-3 .eb-gallery-side { grid-template-rows: 1fr 1fr; }
.eb-gallery-4 .eb-gallery-side { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.eb-gallery-4 .eb-gallery-side > :first-child { grid-column: 1 / -1; }

.eb-gallery-tile {
	background: var(--color-base-100);
	border-radius: 0.75rem;
	min-height: 0;
	overflow: hidden;
}

.eb-gallery-tile img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.eb-gallery-more {
	align-items: center;
	background: #fff;
	border-radius: 999px;
	bottom: 1rem;
	box-shadow: 0 2px 8px rgb(0 0 0 / 0.2);
	color: var(--color-base-900);
	display: inline-flex;
	font-size: 0.875rem;
	font-weight: 600;
	gap: 0.375rem;
	padding: 0.375rem 0.875rem;
	position: absolute;
	right: 1rem;
}

.eb-gallery-more .material-symbols-outlined { font-size: 18px; }

/* The price box (TripPass.tsx): the badge as a ribbon in its corner, and the two pill buttons. */
.eb-trip-price {
	overflow: hidden;
	position: relative;
}

.eb-pass-ribbon {
	background: #f5b301;
	color: #151515;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 0.25rem 2.5rem;
	position: absolute;
	right: -2.25rem;
	text-align: center;
	top: 1.1rem;
	transform: rotate(35deg);
}

.eb-pass-buttons {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	margin: 1rem 0;
}

.eb-pass-buttons span {
	border: 1px solid var(--color-primary-700);
	border-radius: 999px;
	color: var(--color-primary-700);
	font-weight: 600;
	padding: 0.625rem;
	text-align: center;
}

.eb-pass-buttons span:first-child {
	background: var(--color-primary-700);
	color: #fff;
}

.eb-pass-note { font-size: 0.8125rem; margin-top: 0.75rem; }
.eb-pass-note a { color: var(--color-primary-600); font-weight: 600; }

/* The overview's written sections, folded as on the trip page until Read the full overview. */
.eb-trip-folded {
	-webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
	mask-image: linear-gradient(to bottom, #000 60%, transparent);
	max-height: 9rem;
	overflow: hidden;
}

.eb-trip-more { color: var(--color-primary-600); font-weight: 600; margin-top: 0.5rem; }

.dark .eb-trip-top { background: var(--color-base-800); box-shadow: none; }
.dark .eb-trip-title { color: var(--color-base-100); }
.dark .eb-trip-rating, .dark .eb-trip-lead { color: var(--color-base-300); }
.dark .eb-gallery-tile { background: var(--color-base-700); }

@media (max-width: 640px) {
	.eb-trip-title { font-size: 1.625rem; }
	.eb-gallery { aspect-ratio: 4 / 3; grid-template-columns: 1fr; }
	.eb-gallery-side { display: none; }
}
