/* Homepage trip announcement (inc/popup.php, assets/js/popup.js). */

.popup-open {
	overflow: hidden;
}

.trip-popup {
	width: min(35rem, calc(100vw - 2rem));
	max-width: none;
	max-height: calc(100dvh - 2rem);
	margin: auto;
	padding: 0;
	overflow: auto;
	border: 1px solid var(--ink-line);
	background: var(--ink-raised);
	color: var(--bone);
	box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.55);
}

.trip-popup::backdrop {
	background: rgba(8, 10, 13, 0.78);
}

.trip-popup[open] {
	animation: trip-popup-in 0.45s var(--ease);
}

.trip-popup[open]::backdrop {
	animation: trip-popup-fade 0.45s ease-out;
}

@keyframes trip-popup-in {
	from {
		opacity: 0;
		transform: translateY(1.5rem) scale(0.97);
	}
}

@keyframes trip-popup-fade {
	from {
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.trip-popup[open],
	.trip-popup[open]::backdrop {
		animation: none;
	}
}

.trip-popup__card {
	position: relative;
}

.trip-popup__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(16, 19, 24, 0.7);
	color: var(--bone);
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.trip-popup__close:hover,
.trip-popup__close:focus-visible {
	background: var(--sky);
	color: var(--ink);
}

.trip-popup__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.trip-popup__body {
	padding: clamp(1.5rem, 5vw, 2.25rem);
}

.trip-popup__body .eyebrow {
	margin: 0 0 0.5rem;
	color: var(--sky);
}

/* Without a photo, the title must not run under the close button. */
.trip-popup__card:not(:has(.trip-popup__media)) .trip-popup__body {
	padding-right: 4rem;
}

.trip-popup__title {
	margin: 0;
	font-family: var(--font-heading);
	font-size: clamp(1.875rem, 6vw, 2.75rem);
	font-weight: 700;
	line-height: 1.05;
	text-transform: uppercase;
}

.trip-popup__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
	margin: 0.875rem 0 0;
	padding: 0;
	list-style: none;
	font-family: var(--font-heading);
	font-size: 1.0625rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* A marker on every fact, so the list still reads well when it wraps on phones. */
.trip-popup__facts li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.trip-popup__facts li::before {
	content: "";
	flex-shrink: 0;
	width: 0.4rem;
	height: 0.4rem;
	background: var(--sky);
}

.trip-popup__text {
	margin: 1rem 0 0;
	color: var(--bone-muted);
	line-height: 1.6;
}

.trip-popup__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.5rem;
	margin-top: 1.75rem;
}

.trip-popup__later {
	padding: 0.5rem 0;
	border: 0;
	background: none;
	color: var(--bone-muted);
	font-family: var(--font-heading);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
}

.trip-popup__later:hover,
.trip-popup__later:focus-visible {
	color: var(--bone);
}
