/* Echo Tours — public builder (China-inspired palette, no emoji) */

:root {
	--echo-ink: #1c1917;
	--echo-muted: #57534e;
	--echo-paper: #faf7f2;
	--echo-paper-2: #f3eee6;
	--echo-red: #9b1c1c;
	--echo-red-2: #b45309;
	--echo-gold: #b8860b;
	--echo-line: rgba(155, 28, 28, 0.18);
	--echo-radius: 14px;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

.echo-tours {
	color: var(--echo-ink);
	background: linear-gradient(180deg, var(--echo-paper) 0%, #fff 42%);
	border: 1px solid var(--echo-line);
	border-radius: calc(var(--echo-radius) + 4px);
	padding: clamp(1.25rem, 3vw, 2.25rem);
}

.echo-tours--notice {
	padding: 1rem 1.25rem;
	border-radius: var(--echo-radius);
	background: #fff7ed;
	border: 1px solid #fed7aa;
	color: #9a3412;
}

.echo-tours__hero {
	text-align: center;
	margin-bottom: 1.75rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--echo-line);
}

.echo-tours__title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	font-weight: 650;
	letter-spacing: 0.02em;
	color: var(--echo-ink);
}

.echo-tours__subtitle {
	margin: 0 auto;
	max-width: 46rem;
	color: var(--echo-muted);
	line-height: 1.6;
	font-size: 1.02rem;
}

.echo-tours__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

@media (min-width: 960px) {
	.echo-tours__layout {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
		align-items: start;
	}
}

@media (max-width: 959px) {
	.echo-tours__layout {
		display: flex;
		flex-direction: column;
	}
	.echo-tours__panel--catalog {
		order: 1;
	}
	.echo-tours__panel--route {
		order: 2;
	}
}

.echo-tours__panel {
	background: #fff;
	border: 1px solid var(--echo-line);
	border-radius: var(--echo-radius);
	padding: 1.1rem 1.15rem 1.25rem;
}

.echo-tours__panel-title {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
	font-weight: 650;
	color: var(--echo-red);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-size: 0.78rem;
}

.echo-tours__catalog--card {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 0.85rem;
	align-items: stretch;
}

.echo-tours__catalog--list {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	align-items: stretch;
}

.echo-tours-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	border: 1px solid var(--echo-line);
	border-radius: 12px;
	overflow: hidden;
	background: var(--echo-paper-2);
}

.echo-tours-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: #e7e5e4;
}

.echo-tours-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.echo-tours-card__media-fallback {
	width: 100%;
	height: 100%;
	min-height: 100%;
	background: repeating-linear-gradient(
		135deg,
		#efe9df,
		#efe9df 10px,
		#e8e1d6 10px,
		#e8e1d6 20px
	);
}

.echo-tours-card__play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 3rem;
	height: 3rem;
	border-radius: 999px;
	border: 2px solid rgba(255, 255, 255, 0.95);
	background: rgba(28, 25, 23, 0.45);
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, transform 0.15s ease;
}

.echo-tours-card__play::after {
	content: "";
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 0.55rem 0 0.55rem 0.95rem;
	border-color: transparent transparent transparent #fff;
	margin-left: 0.2rem;
}

.echo-tours-card__play:hover,
.echo-tours-card__play:focus-visible {
	background: rgba(155, 28, 28, 0.65);
	transform: scale(1.03);
	outline: none;
}

.echo-tours-card__body {
	padding: 0.85rem 0.9rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	flex: 1 1 auto;
	min-height: 0;
}

.echo-tours-card__add {
	margin-top: auto;
}

.echo-tours-card__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 650;
}

.echo-tours-card__blurb {
	margin: 0;
	font-size: 0.9rem;
	color: var(--echo-muted);
	line-height: 1.45;
}

.echo-tours-card__price {
	margin: 0.25rem 0 0.35rem;
	font-weight: 600;
	color: var(--echo-ink);
}

.echo-tours-card__per {
	font-weight: 500;
	color: var(--echo-muted);
	font-size: 0.88rem;
}

/* Catalog: horizontal list rows (same popup video as cards) */
.echo-tours-list-item {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 0.85rem;
	min-height: 5.75rem;
	border: 1px solid var(--echo-line);
	border-radius: 12px;
	overflow: hidden;
	background: var(--echo-paper-2);
}

.echo-tours-list-item__media {
	position: relative;
	flex: 0 0 7.25rem;
	width: 7.25rem;
	align-self: stretch;
	min-height: 5.5rem;
	background: #e7e5e4;
}

.echo-tours-list-item__media img {
	width: 100%;
	height: 100%;
	min-height: 100%;
	object-fit: cover;
	display: block;
}

.echo-tours-list-item__media-fallback {
	width: 100%;
	height: 100%;
	min-height: 5.5rem;
	background: repeating-linear-gradient(
		135deg,
		#efe9df,
		#efe9df 10px,
		#e8e1d6 10px,
		#e8e1d6 20px
	);
}

.echo-tours-list-item__play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 999px;
	border: 2px solid rgba(255, 255, 255, 0.95);
	background: rgba(28, 25, 23, 0.45);
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, transform 0.15s ease;
}

.echo-tours-list-item__play::after {
	content: "";
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 0.45rem 0 0.45rem 0.8rem;
	border-color: transparent transparent transparent #fff;
	margin-left: 0.15rem;
}

.echo-tours-list-item__play:hover,
.echo-tours-list-item__play:focus-visible {
	background: rgba(155, 28, 28, 0.65);
	transform: scale(1.03);
	outline: none;
}

.echo-tours-list-item__body {
	padding: 0.75rem 0.85rem 0.85rem 0;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	flex: 1;
	min-width: 0;
	justify-content: space-between;
}

.echo-tours-list-item__add {
	margin-top: auto;
	align-self: flex-start;
}

.echo-tours-list-item__title {
	margin: 0;
	font-size: 1.02rem;
	font-weight: 650;
}

.echo-tours-list-item__blurb {
	margin: 0;
	font-size: 0.88rem;
	color: var(--echo-muted);
	line-height: 1.45;
}

.echo-tours-list-item__price {
	margin: 0.2rem 0 0.25rem;
	font-weight: 600;
	color: var(--echo-ink);
}

.echo-tours-list-item__per {
	font-weight: 500;
	color: var(--echo-muted);
	font-size: 0.85rem;
}

@media (max-width: 420px) {
	.echo-tours-list-item {
		flex-direction: column;
	}
	.echo-tours-list-item__media {
		width: 100%;
		flex: none;
		min-height: 8rem;
	}
	.echo-tours-list-item__body {
		padding: 0 0.9rem 1rem;
	}
}

.echo-tours__hint {
	margin: 0 0 0.75rem;
	color: var(--echo-muted);
	font-size: 0.95rem;
}

.echo-tours__route {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	min-height: 3rem;
}

.echo-tours__route-empty {
	padding: 0.85rem 1rem;
	border-radius: 10px;
	border: 1px dashed var(--echo-line);
	color: var(--echo-muted);
	background: var(--echo-paper);
}

.echo-tours-route-item {
	display: grid;
	grid-template-columns: auto 4.5rem minmax(0, 1fr) auto;
	gap: 0.65rem;
	align-items: start;
	padding: 0.75rem 0.65rem;
	border: 1px solid var(--echo-line);
	border-radius: 12px;
	margin-bottom: 0.55rem;
	background: #fff;
}

@media (max-width: 600px) {
	.echo-tours-route-item {
		grid-template-columns: auto 3.75rem minmax(0, 1fr);
		grid-template-rows: auto auto;
	}
	.echo-tours-route-item__actions {
		grid-column: 1 / -1;
		justify-self: end;
	}
}

.echo-tours-route-item__thumb {
	position: relative;
	width: 4.5rem;
	height: 4.5rem;
	border-radius: 10px;
	overflow: hidden;
	background: #e7e5e4;
	flex-shrink: 0;
}

.echo-tours-route-item__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.echo-tours-route-item__thumb--empty {
	background: repeating-linear-gradient(
		135deg,
		#efe9df,
		#efe9df 8px,
		#e8e1d6 8px,
		#e8e1d6 16px
	);
}

.echo-tours-route-item__play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 2rem;
	height: 2rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.95);
	background: rgba(28, 25, 23, 0.45);
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.echo-tours-route-item__play::after {
	content: "";
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 0.35rem 0 0.35rem 0.6rem;
	border-color: transparent transparent transparent #fff;
	margin-left: 0.12rem;
}

.echo-tours-route-item__play:hover,
.echo-tours-route-item__play:focus-visible {
	background: rgba(155, 28, 28, 0.65);
	outline: none;
}

.echo-tours-route-item--dragging {
	opacity: 0.65;
}

.echo-tours-route-item__drag {
	width: 22px;
	height: 22px;
	border-radius: 6px;
	cursor: grab;
	margin-top: 0.2rem;
	background: linear-gradient(180deg, #d6d3d1, #e7e5e4);
	border: 1px solid #d6d3d1;
	position: relative;
}

.echo-tours-route-item__drag::before,
.echo-tours-route-item__drag::after {
	content: "";
	position: absolute;
	left: 5px;
	right: 5px;
	height: 2px;
	background: #78716c;
	border-radius: 2px;
	opacity: 0.55;
}

.echo-tours-route-item__drag::before {
	top: 7px;
}

.echo-tours-route-item__drag::after {
	bottom: 7px;
}

.echo-tours-route-item__main {
	display: grid;
	gap: 0.35rem;
}

.echo-tours-route-item__title {
	font-weight: 650;
}

.echo-tours-route-item__days {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.92rem;
	color: var(--echo-muted);
}

.echo-tours-route-item__days-label {
	flex-shrink: 0;
}

.echo-tours-route-item__select {
	min-width: 5rem;
	padding: 0.35rem 0.5rem;
	border-radius: 8px;
	border: 1px solid #d6d3d1;
	background: #fff;
	font-size: 0.92rem;
}

.echo-tours-route-item__sub {
	font-size: 0.9rem;
	color: var(--echo-ink);
	font-weight: 600;
}

.echo-tours-route-item__actions {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	align-items: flex-end;
	justify-content: flex-start;
}

.echo-tours__total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 0.85rem 0.95rem;
	border-radius: 12px;
	background: linear-gradient(90deg, rgba(155, 28, 28, 0.08), rgba(184, 134, 11, 0.08));
	border: 1px solid var(--echo-line);
	margin-bottom: 1rem;
}

.echo-tours__total-label {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--echo-muted);
}

.echo-tours__total-value {
	font-size: 1.35rem;
	color: var(--echo-red);
}

.echo-tours__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	align-items: center;
	margin-bottom: 0.5rem;
}

.echo-tours__fineprint {
	margin: 0.75rem 0 0;
	font-size: 0.82rem;
	color: var(--echo-muted);
	line-height: 1.5;
}

.echo-tours__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.55rem 1rem;
	border-radius: 999px;
	border: 1px solid transparent;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	font-size: 0.95rem;
	line-height: 1.2;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.echo-tours__btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.echo-tours__btn--primary {
	background: linear-gradient(135deg, var(--echo-red), #7f1d1d);
	color: #fff;
}

.echo-tours__btn--primary:hover:not(:disabled) {
	filter: brightness(1.03);
}

.echo-tours__btn--ghost {
	background: #fff;
	border-color: var(--echo-line);
	color: var(--echo-ink);
}

.echo-tours__btn--ghost:hover:not(:disabled) {
	border-color: rgba(155, 28, 28, 0.45);
	color: var(--echo-red);
}

.echo-tours__btn--small {
	padding: 0.35rem 0.65rem;
	font-size: 0.82rem;
	border-radius: 10px;
}

.echo-tours__btn--danger {
	background: #fff;
	border-color: #fecaca;
	color: #991b1b;
}

.echo-tours__link {
	color: var(--echo-red);
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid rgba(155, 28, 28, 0.35);
}

.echo-tours__link:hover {
	border-bottom-color: var(--echo-red);
}

/* Modal */
.echo-tours-modal[hidden] {
	display: none !important;
}

.echo-tours-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 1rem;
}

.echo-tours-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(28, 25, 23, 0.55);
}

.echo-tours-modal__dialog {
	position: relative;
	width: min(960px, 100%);
	max-height: min(86vh, 900px);
	background: #fff;
	border-radius: 16px;
	border: 1px solid var(--echo-line);
	padding: 1rem 1rem 1.1rem;
	overflow: auto;
}

.echo-tours-modal__close {
	position: absolute;
	top: 0.5rem;
	right: 0.55rem;
	border: 0;
	background: transparent;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	color: var(--echo-muted);
}

.echo-tours-modal__title {
	margin: 0 2rem 0.75rem 0;
	font-size: 1.1rem;
	font-weight: 650;
}

.echo-tours-modal__iframe,
.echo-tours-modal__video {
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: 12px;
	background: #000;
}

body.echo-tours-modal-open {
	overflow: hidden;
}

/* WooCommerce order / email */
.echo-tours-order-itinerary {
	margin-top: 0.5rem;
	padding: 0.65rem 0.75rem;
	border-radius: 10px;
	border: 1px solid var(--echo-line);
	background: var(--echo-paper);
	font-size: 0.92rem;
}

.echo-tours-order-itinerary--admin {
	background: #fff;
}

.echo-tours-order-itinerary__list {
	margin: 0.4rem 0 0;
	padding-left: 1.1rem;
}

.echo-tours-order-itinerary__meta {
	color: var(--echo-muted);
	font-size: 0.9em;
}
