/* ==========================================================================
   Waitlist: the card button and the dialog
   --------------------------------------------------------------------------
   Enqueued by terrago_waitlist_footer() in inc/waitlist.php, from the footer,
   on the retreat listings and on coming-soon retreat pages. Not a screen
   sheet; see that function for why it is enqueued late.

   The dialog is the newsletter popup's, class for class under a different
   prefix (.terrago-wlpop), so the two read as one component. When one
   changes, change the other - assets/css/newsletter-popup.css carries the
   reasoning behind every value here and it is not repeated.
   ========================================================================== */

/* ------------------------------------------------------- the card button -- */

/* The button lands inside .category-trip-budget.is-on-request, which
   retreats.css lays out as a flex column with "Coming soon" at the top. The
   plugin's .wpte-button-group / .wpte-button classes give it the same shape as
   "View Details" on the cards beside it; these rules only cover what the
   is-on-request state changes. */
.terrago-retreats :is(.wp-block-wptravelengine-trips, .wte-category-outer-wrap) .category-trip-budget.is-on-request .terrago-waitlist-group {
	display: block;
	margin: 1rem 0 0;
	padding: 0;
	text-align: left;
}

.terrago-retreats :is(.wp-block-wptravelengine-trips, .wte-category-outer-wrap) .category-trip-budget.is-on-request .terrago-waitlist-cta {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0.7rem 1rem;
	border: 0;
	border-radius: 999px;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	white-space: normal;
	word-break: normal;
	box-shadow: none;
	cursor: pointer;
}

.terrago-retreats :is(.wp-block-wptravelengine-trips, .wte-category-outer-wrap) .category-trip-budget.is-on-request .terrago-waitlist-cta:hover,
.terrago-retreats :is(.wp-block-wptravelengine-trips, .wte-category-outer-wrap) .category-trip-budget.is-on-request .terrago-waitlist-cta:focus-visible {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base);
	filter: none;
}

/* ---------------------------------------------------------------- dialog -- */

.terrago-wlpop {
	position: fixed;
	inset: 0;
	z-index: 9000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.24s ease, visibility 0.24s ease;
}

.terrago-wlpop.is-open {
	opacity: 1;
	visibility: visible;
}

.terrago-wlpop[hidden] {
	display: none;
}

.terrago-wlpop__scrim {
	position: absolute;
	inset: 0;
	background: color-mix(in srgb, var(--wp--preset--color--base) 62%, transparent);
	cursor: pointer;
}

.terrago-wlpop-open {
	overflow: hidden;
}

.terrago-wlpop__card {
	position: relative;
	width: 100%;
	max-width: 34rem;
	max-height: calc(100dvh - 2.5rem);
	overflow-y: auto;
	padding: 2.75rem 2.5rem 2.25rem;
	border-radius: 20px;
	background: var(--wp--preset--color--mint-tint);
	box-shadow: 0 24px 60px rgba(43, 31, 23, 0.22);
	text-align: center;
	transform: translateY(14px) scale(0.985);
	transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.terrago-wlpop.is-open .terrago-wlpop__card {
	transform: none;
}

.terrago-wlpop__close {
	position: absolute;
	top: 0.85rem;
	right: 0.85rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--wp--preset--color--muted);
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease;
}

.terrago-wlpop__close:hover,
.terrago-wlpop__close:focus-visible {
	background: color-mix(in srgb, var(--wp--preset--color--primary) 10%, transparent);
	color: var(--wp--preset--color--base);
}

.terrago-wlpop__eyebrow {
	margin: 0 0 1rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
}

.terrago-wlpop__eyebrow > span {
	display: inline-block;
	padding: 0.5rem 1.1rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--wp--preset--color--accent) 14%, transparent);
	color: var(--wp--preset--color--accent);
}

.terrago-wlpop__title {
	margin: 0 0 0.75rem;
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
	line-height: 1.15;
}

/* The retreat's name, in coral and upright: the house heading treatment. */
.terrago-wlpop__title em {
	display: block;
	color: var(--wp--preset--color--accent);
	font-style: normal;
}

.terrago-wlpop__text {
	margin: 0 0 1.5rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.6;
}

.terrago-wlpop__form {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0;
}

.terrago-wlpop__form[hidden] {
	display: none;
}

.terrago-wlpop__email {
	width: 100%;
	padding: 0.9rem 1.2rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--base);
}

.terrago-wlpop__email::placeholder {
	color: var(--wp--preset--color--muted-soft);
}

.terrago-wlpop__email:focus {
	border-color: var(--wp--preset--color--primary);
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.terrago-wlpop__submit {
	width: 100%;
	padding: 0.9rem 1.5rem;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 600;
	cursor: pointer;
	transition: background 0.18s ease;
}

.terrago-wlpop__submit:hover {
	background: var(--wp--preset--color--base);
}

.terrago-wlpop__submit:disabled {
	opacity: 0.6;
	cursor: default;
}

.terrago-wlpop__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.terrago-wlpop__srt {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.terrago-wlpop__message:empty {
	display: none;
}

.terrago-wlpop__message {
	margin: 0.9rem 0 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

.terrago-wlpop__message.is-info {
	color: var(--wp--preset--color--muted);
}

.terrago-wlpop__message.is-success {
	color: var(--wp--preset--color--primary);
	font-weight: 600;
}

.terrago-wlpop__message.is-error {
	color: #B23A25;
	font-weight: 600;
}

.terrago-wlpop__fine {
	margin: 1.1rem 0 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--caption);
	line-height: 1.5;
}

.terrago-wlpop__fine a {
	color: inherit;
	text-underline-offset: 2px;
}

@media (max-width: 600px) {
	.terrago-wlpop {
		align-items: flex-end;
		padding: 0;
	}

	.terrago-wlpop__card {
		max-width: none;
		max-height: 88dvh;
		padding: 2.5rem 1.5rem 1.75rem;
		border-radius: 20px 20px 0 0;
		transform: translateY(100%);
	}

	.terrago-wlpop__title {
		font-size: var(--wp--preset--font-size--large);
	}
}

@media (prefers-reduced-motion: reduce) {
	.terrago-wlpop__card {
		transform: none;
		transition: none;
	}
}
