/* Build Your Own Adventure (0.7.0, WSHTC_Adventure). Loaded on that page only,
   after tour.css: it uses the catalog's variables, intro, copy block, white
   activity card and buttons, and adds the tabs, the Add button, the My
   Itinerary panel and the request form's window.

   Custom properties a site can set (STYLING.md):
     --wshtc-byo-accent        the letters A L S O and the pressed tab (default #000)
     --wshtc-byo-added         the Added button (default #1f5f4a)
     --wshtc-byo-panel-width   the panel on a wide screen (default 340px) */

.wshtc-byo {
	--byo-accent: var(--wshtc-byo-accent, #000);
	--byo-added: var(--wshtc-byo-added, #1f5f4a);
	--byo-panel: var(--wshtc-byo-panel-width, 340px);
}
html.wshtc-byo-lock {
	overflow: hidden;
}

/* Heading: the four letters are spaced out wherever the title spells ALSO. */
.wshtc-byo .wshtc-byo__also {
	letter-spacing: .14em;
	margin-right: -.14em;
	white-space: nowrap;
}
/* Intro: the first line of the page's content is the line under the heading. */
.wshtc-byo__intro .wshtc-copy__inner > p:first-child {
	font-family: var(--wshtc-display);
	font-size: 28px;
	line-height: 1.3;
	color: var(--wshtc-ink);
}

.wshtc-byo__browse {
	background: var(--wshtc-band);
	padding: 44px 20px 72px;
}
.wshtc-byo__inner {
	max-width: var(--wshtc-width);
	margin: 0 auto;
}

/* ---------- Tabs: All, A ir, L and, S ea, O ther ---------- */
.wshtc-byo__tabs {
	display: grid;
	grid-template-columns: minmax(0, .7fr) repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 0 0 32px;
}
.wshtc-byo .wshtc-byo__tab {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 2px;
	min-height: 132px;
	padding: 14px 10px 14px;
	border: 1px solid var(--wshtc-chip-line);
	border-radius: 0;
	background: #fff;
	color: #1a1a1a;
	font-family: var(--wshtc-ui);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.wshtc-byo .wshtc-byo__tab:hover {
	border-color: var(--byo-accent);
	background: #fff;
	color: #1a1a1a;
}
.wshtc-byo .wshtc-byo__tab:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}
.wshtc-byo__tab-letter {
	display: block;
	color: var(--byo-accent);
	font-family: var(--wshtc-display);
	font-size: 76px;
	line-height: .95;
}
.wshtc-byo__tab-word {
	font-size: 15px;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.wshtc-byo__tab-first {
	font-weight: 700;
}
.wshtc-byo__tab--all .wshtc-byo__tab-word {
	margin-bottom: 0;
}
.wshtc-byo__tab-count {
	color: var(--wshtc-muted);
	font-size: 12px;
	letter-spacing: normal;
}
.wshtc-byo .wshtc-byo__tab[aria-pressed="true"],
.wshtc-byo .wshtc-byo__tab[aria-pressed="true"]:hover {
	border-color: var(--byo-accent);
	background: var(--byo-accent);
	color: #fff;
}
.wshtc-byo__tab[aria-pressed="true"] .wshtc-byo__tab-letter,
.wshtc-byo__tab[aria-pressed="true"] .wshtc-byo__tab-count {
	color: #fff;
}

/* ---------- Layout: the cards, and the panel that stays in view ---------- */
.wshtc-byo__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--byo-panel);
	gap: 28px;
	align-items: start;
}
.wshtc-byo__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}
.wshtc-byo__card[hidden] {
	display: none !important;
}
.wshtc-byo__card {
	position: relative;
}
/* The card here is the catalog's card without its summary: photo, name, price, length, link. */
.wshtc-byo__card .wshtc-acard__summary {
	display: none;
}
.wshtc-byo__card .wshtc-acard__body {
	padding: 18px 18px 18px;
}
.wshtc-byo__card h3.wshtc-acard__title {
	font-size: 21px;
	line-height: 1.25;
	margin-bottom: 14px;
}
.wshtc-byo__card.is-added {
	box-shadow: 0 0 0 2px var(--byo-added), 0 4px 16px rgba(20, 24, 31, .08);
}
.wshtc-byo .wshtc-byo__add {
	display: block;
	width: 100%;
	min-height: 44px;
	margin: 14px 0 0;
	padding: 10px 12px;
	border: 1px solid #000;
	border-radius: 0;
	background: #000;
	color: #fff;
	font-family: var(--wshtc-ui);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.wshtc-byo .wshtc-byo__add[hidden] {
	display: none;
}
.wshtc-byo .wshtc-byo__add:hover {
	background: #fff;
	color: #000;
}
.wshtc-byo .wshtc-byo__add:focus-visible,
.wshtc-byo .wshtc-byo__remove:focus-visible,
.wshtc-byo .wshtc-byo__close:focus-visible,
.wshtc-byo .wshtc-byo__panel-close:focus-visible,
.wshtc-byo .wshtc-byo__bar:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}
.wshtc-byo .wshtc-byo__add[aria-pressed="true"] {
	border-color: var(--byo-added);
	background: #fff;
	color: var(--byo-added);
}
.wshtc-byo .wshtc-byo__add[aria-pressed="true"]:hover {
	background: var(--byo-added);
	color: #fff;
}

/* ---------- My Itinerary ---------- */
.wshtc-byo__panel {
	position: sticky;
	top: 176px; /* Clear of the site's sticky header. */
	max-height: calc(100vh - 196px);
	display: flex;
	flex-direction: column;
	padding: 22px 22px 20px;
	background: #fff;
	border-top: 3px solid var(--byo-accent);
	box-shadow: 0 1px 2px rgba(20, 24, 31, .05), 0 4px 16px rgba(20, 24, 31, .06);
}
.wshtc-byo__panel-head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0 0 12px;
}
.wshtc-byo .wshtc-byo__panel h2.wshtc-byo__panel-title {
	margin: 0;
	color: var(--wshtc-ink);
	font-family: var(--wshtc-display);
	font-size: 28px;
	font-weight: 400;
	line-height: 1.2;
}
.wshtc-byo__panel-count {
	margin-left: auto;
	color: var(--wshtc-muted);
	font-family: var(--wshtc-ui);
	font-size: 13px;
	white-space: nowrap;
}
.wshtc-byo .wshtc-byo__panel-close {
	display: none;
}
.wshtc-byo__empty,
.wshtc-byo__panel-note {
	margin: 0 0 14px;
	color: var(--wshtc-muted);
	font-family: var(--wshtc-ui);
	font-size: 14px;
	line-height: 1.5;
}
.wshtc-byo__panel-note {
	margin: 12px 0 0;
	font-size: 12.5px;
}
.wshtc-byo__list,
.wshtc-byo__chosen-list {
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
	overflow-y: auto;
}
.wshtc-byo__list:empty,
.wshtc-byo__chosen-list:empty {
	display: none;
}
.wshtc-byo__item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 0;
	border-top: 1px solid var(--wshtc-line);
}
.wshtc-byo__item:first-child {
	border-top: 0;
}
.wshtc-byo__item-letter {
	flex: 0 0 26px;
	height: 26px;
	border: 1px solid var(--byo-accent);
	color: var(--byo-accent);
	font-family: var(--wshtc-display);
	font-size: 17px;
	line-height: 24px;
	text-align: center;
}
.wshtc-byo .wshtc-byo__item a.wshtc-byo__item-title,
.wshtc-byo .wshtc-byo__item a.wshtc-byo__item-title:visited {
	flex: 1 1 auto;
	min-width: 0;
	color: #1a1a1a;
	font-family: var(--wshtc-ui);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
}
.wshtc-byo .wshtc-byo__item a.wshtc-byo__item-title:hover {
	text-decoration: underline;
}
.wshtc-byo .wshtc-byo__remove {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	margin: -4px -6px 0 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--wshtc-muted);
	font-family: var(--wshtc-ui);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.wshtc-byo .wshtc-byo__remove:hover {
	background: var(--wshtc-band);
	color: #000;
}
.wshtc-byo .wshtc-byo__send {
	display: block;
	width: 100%;
	margin: 0;
	cursor: pointer;
}

/* On a phone: a button at the bottom with the count, which opens the list. */
.wshtc-byo .wshtc-byo__bar {
	display: none;
}
.wshtc-byo__backdrop {
	position: fixed;
	inset: 0;
	z-index: 9990;
	background: rgba(0, 0, 0, .5);
}
.wshtc-byo__backdrop[hidden] {
	display: none;
}

/* ---------- The request form's window ---------- */
.wshtc-byo__modal {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 32px 16px;
	overflow-y: auto;
	background: rgba(0, 0, 0, .6);
}
/* Closed: kept in the layout but out of sight and out of reach, not display:none, so the form's own scripts
   (its date picker and input masks) set themselves up when the page loads. */
.wshtc-byo__modal[hidden] {
	display: flex;
	visibility: hidden;
	pointer-events: none;
	opacity: 0;
}
.wshtc-byo__modal-box {
	position: relative;
	width: 100%;
	max-width: 720px;
	padding: 36px 40px 40px;
	background: #fff;
	box-shadow: 0 12px 48px rgba(0, 0, 0, .3);
}
.wshtc-byo .wshtc-byo__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #1a1a1a;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}
.wshtc-byo .wshtc-byo__close:hover {
	background: var(--wshtc-band);
	color: #000;
}
.wshtc-byo .wshtc-byo__modal h2.wshtc-byo__modal-title {
	margin: 0 40px 8px 0;
	color: var(--wshtc-ink);
	font-family: var(--wshtc-display);
	font-size: 36px;
	font-weight: 400;
	line-height: 1.2;
}
.wshtc-byo__modal-note {
	margin: 0 0 22px;
	color: var(--wshtc-muted);
	font-family: var(--wshtc-ui);
	font-size: 15px;
	line-height: 1.5;
}
.wshtc-byo__chosen {
	margin: 0 0 24px;
	padding: 16px 18px 6px;
	background: var(--wshtc-band);
}
.wshtc-byo .wshtc-byo__chosen h3.wshtc-byo__chosen-title {
	margin: 0 0 6px;
	color: var(--wshtc-ink);
	font-family: var(--wshtc-ui);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .1em;
	line-height: 1.4;
	text-transform: uppercase;
}
.wshtc-byo__chosen-list {
	max-height: 220px;
	margin-bottom: 10px;
}
.wshtc-byo__chosen .wshtc-byo__item {
	border-top-color: var(--wshtc-divider);
}
.wshtc-byo__chosen-empty {
	margin: 0 0 12px;
	color: #1a1a1a;
	font-family: var(--wshtc-ui);
	font-size: 15px;
	line-height: 1.5;
}
/* The form itself is Gravity Forms' and keeps the site's form styles. The
   itinerary field is filled in by the page and is never shown. */
.wshtc-byo__form .wshtc-itinerary-field {
	display: none !important;
}
.wshtc-byo__form .gform_confirmation_message {
	padding: 8px 0 4px;
	color: var(--wshtc-ink);
	font-family: var(--wshtc-display);
	font-size: 26px;
	line-height: 1.35;
}
.wshtc-byo__form .gform_wrapper {
	margin: 0;
}

/* ---------- Narrower screens ---------- */
@media (max-width: 1279px) {
	.wshtc-byo__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 1024px) {
	.wshtc-byo__layout {
		display: block;
	}
	.wshtc-byo__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	/* The list becomes a sheet that the bottom button opens. */
	.wshtc-byo__panel {
		position: fixed;
		top: auto;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 9995;
		max-height: 80vh;
		padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
		transform: translateY(105%);
		visibility: hidden;
		transition: transform .25s ease, visibility 0s linear .25s;
		box-shadow: 0 -8px 32px rgba(0, 0, 0, .25);
	}
	.wshtc-byo__panel.is-open {
		transform: none;
		visibility: visible;
		transition: transform .25s ease;
	}
	.wshtc-byo .wshtc-byo__panel-close {
		display: block;
		flex: 0 0 40px;
		width: 40px;
		height: 40px;
		margin: -8px -8px 0 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: transparent;
		color: #1a1a1a;
		font-size: 28px;
		line-height: 1;
		cursor: pointer;
	}
	.wshtc-byo .wshtc-byo__bar {
		position: fixed;
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		left: 12px;
		z-index: 9980;
		display: block;
		min-height: 52px;
		padding: 12px 16px;
		border: 1px solid #000;
		border-radius: 0;
		background: #000;
		color: #fff;
		font-family: var(--wshtc-ui);
		font-size: 16px;
		font-weight: 600;
		line-height: 1.3;
		letter-spacing: normal;
		text-transform: none;
		box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
		cursor: pointer;
	}
	.wshtc-byo .wshtc-byo__bar[hidden] {
		display: none;
	}
	/* Room for the button under the last cards. */
	.wshtc-byo__browse {
		padding-bottom: 110px;
	}
}
@media (max-width: 767px) {
	.wshtc-byo__browse {
		padding: 28px 14px 110px;
	}
	.wshtc-byo__intro .wshtc-copy__inner > p:first-child {
		font-size: 23px;
	}
	.wshtc-byo__tabs {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 8px;
		margin-bottom: 22px;
	}
	.wshtc-byo .wshtc-byo__tab--all {
		grid-column: 1 / -1;
		flex-direction: row;
		justify-content: center;
		gap: 8px;
		min-height: 44px;
		padding: 10px;
	}
	.wshtc-byo .wshtc-byo__tab {
		min-height: 96px;
		padding: 10px 4px;
	}
	.wshtc-byo__tab-letter {
		font-size: 50px;
	}
	.wshtc-byo__tab-word {
		font-size: 11.5px;
		letter-spacing: .08em;
	}
	.wshtc-byo__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}
	.wshtc-byo__modal {
		padding: 0;
	}
	.wshtc-byo__modal-box {
		min-height: 100%;
		padding: 28px 18px 32px;
	}
	.wshtc-byo .wshtc-byo__modal h2.wshtc-byo__modal-title {
		font-size: 29px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.wshtc-byo__panel,
	.wshtc-byo .wshtc-byo__tab,
	.wshtc-byo .wshtc-byo__add {
		transition: none;
	}
}

/* The tour that arrived from a tour page's "Request this tour" button (0.9.0). */
.wshtc-byo__item.is-new {
	animation: wshtc-byo-new 2.4s ease-out 1;
}
@keyframes wshtc-byo-new {
	0%, 40% { background-color: rgba(255, 196, 0, .28); }
	100% { background-color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
	.wshtc-byo__item.is-new { animation: none; }
}
