/*
 * Amelia Stay demo bar, payment note and booking section copy (demos/mu-plugins/stay-demo).
 * The same on every demo site. Themes offset sticky headers by --stay-demo-bar-height
 * and never style these classes.
 */

:root {
	--stay-demo-bar-height: 2.5rem;
}

.stay-demo-bar {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 9999;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	height: var(--stay-demo-bar-height);
	padding: 0 1.5rem;
	/* The website's plum, so the bar reads as Amelia Stay's and never blends into a dark theme header. */
	background: linear-gradient(90deg, #6d2e6b, #561f55);
	color: #fff;
	font: 400 0.875rem/1.25 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.stay-demo-bar p {
	margin: 0;
	min-width: 0;
}

.stay-demo-bar__text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.stay-demo-bar__short {
	display: none;
}

.stay-demo-bar__dot {
	display: inline-block;
	width: 0.5rem;
	height: 0.5rem;
	margin-right: 0.375rem;
	border-radius: 50%;
	background: #6ee7a8;
}

.stay-demo-bar__links {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 1.25rem;
}

.stay-demo-bar a {
	color: inherit;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.stay-demo-bar__back:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* The one way out to the product: a white pill, like the button on the website's plum band. */
.stay-demo-bar a.stay-demo-bar__site {
	padding: 0.3125rem 0.875rem;
	border-radius: 999px;
	background: #fff;
	color: #561f55;
	font-weight: 600;
}

.stay-demo-bar a.stay-demo-bar__site:hover {
	background: #f5eaf4;
}

.stay-demo-bar a:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
	border-radius: 2px;
}

.stay-demo-bar a.stay-demo-bar__site:focus-visible {
	border-radius: 999px;
}

@media (max-width: 640px) {
	.stay-demo-bar {
		gap: 0.75rem;
		padding: 0 0.75rem;
		font-size: 0.8125rem;
	}

	.stay-demo-bar__links {
		gap: 0.75rem;
	}

	.stay-demo-bar a.stay-demo-bar__site {
		padding: 0.25rem 0.625rem;
	}

	.stay-demo-bar__long {
		display: none;
	}

	.stay-demo-bar__short {
		display: inline;
	}
}

.stay-demo-payment-note {
	box-sizing: border-box;
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border: 1px solid currentColor;
	border-radius: 0.375rem;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.stay-demo-payment-note code {
	font-size: 0.875em;
	white-space: nowrap;
}

/*
 * The heading and paragraphs a front page puts in #book introduce the search. Once the form
 * shows guest details or the confirmation, it brings its own step heading, so they step aside;
 * the payment note stays for the payment and goes with the confirmation.
 */
#book:has(.amst-step--details:not([hidden]), .amst-step--confirmation:not([hidden])) > :is(.wp-block-heading, p:not(.stay-demo-payment-note)),
#book:has(.amst-step--confirmation:not([hidden])) > .stay-demo-payment-note {
	display: none;
}
