/* Guide Services: booking modal and thank-you page. Inherits the theme's fonts and button styles. */

.guide-services__book-wrap[hidden] {
	display: none;
}

/* Modal: service details on the left, form on the right. */
.guide-booking {
	width: min(60rem, calc(100% - 2rem));
	max-height: calc(100% - 2rem);
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: #fff;
	color: #1e1e1e;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
	overflow: hidden;
}

.guide-booking::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

.guide-booking *,
.guide-booking *::before,
.guide-booking *::after {
	box-sizing: border-box;
}

.guide-booking [hidden] {
	display: none;
}

.guide-booking__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	grid-template-rows: auto minmax(0, 1fr);
	grid-template-areas:
		"summary form"
		"content form";
	height: calc(68vh - 2rem);
}

.guide-booking__summary {
	grid-area: summary;
	padding: 1.5rem 1.5rem 0;
}

.guide-booking__content {
	grid-area: content;
	padding: 1rem 1.5rem 1.5rem;
	overflow-y: auto;
}

.guide-booking__form {
	grid-area: form;
	padding: 3rem 1.5rem 1.5rem;
	border-left: 1px solid #e0e0e0;
	overflow-y: auto;
}

.guide-booking__close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	z-index: 1;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: inherit;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.guide-booking__media img {
	display: block;
	width: 100%;
	height: 11rem;
	margin-bottom: 1rem;
	border-radius: 6px;
	object-fit: cover;
}

.guide-booking__title {
	margin: 0 0 0.25rem;
	font-size: 1.35rem;
	line-height: 1.3;
}

.guide-booking__meta {
	margin: 0;
	font-weight: 600;
}

/* Service content as written in the editor. */
.guide-booking__content > :first-child {
	margin-top: 0;
}

.guide-booking__content h2,
.guide-booking__content h3,
.guide-booking__content h4 {
	margin: 1.25em 0 0.4em;
	font-size: 1.05rem;
	line-height: 1.3;
}

.guide-booking__content p,
.guide-booking__content ul,
.guide-booking__content ol {
	margin: 0 0 0.8em;
}

.guide-booking__content img {
	max-width: 100%;
	height: auto;
}

.guide-booking__content table {
	display: block;
	max-width: 100%;
	margin: 0 0 1em;
	overflow-x: auto;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.guide-booking__content th,
.guide-booking__content td {
	padding: 0.4em 0.6em;
	border: 1px solid #e0e0e0;
}

.guide-booking__field {
	margin: 0 0 1rem;
}

.guide-booking__field label {
	display: block;
	margin-bottom: 0.3rem;
	font-weight: 600;
}

.guide-booking__field input,
.guide-booking__field textarea {
	display: block;
	width: 100%;
	padding: 0.6em 0.75em;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font: inherit;
}

.guide-booking__hint {
	display: block;
	margin-top: 0.25rem;
	font-size: 0.875rem;
	opacity: 0.8;
}

.guide-booking__error {
	display: block;
	margin: 0.25rem 0 0;
	color: #b32d2e;
	font-size: 0.875rem;
}

p.guide-booking__error {
	margin: 0 0 1rem;
}

.guide-booking__error[hidden] {
	display: none;
}

.guide-booking__currency {
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	opacity: 0.8;
}

.guide-booking__submit {
	width: 100%;
	cursor: pointer;
}

.guide-booking__submit:disabled {
	opacity: 0.7;
	cursor: wait;
}

/* Phones: image, title and price, then the form, then the full description. */
@media (max-width: 45em) {
	.guide-booking {
		overflow-y: auto;
	}

	.guide-booking__layout {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: none;
		grid-template-areas:
			"summary"
			"form"
			"content";
		height: auto;
	}

	.guide-booking__form {
		padding-top: 1.25rem;
		border-left: 0;
		overflow: visible;
	}

	.guide-booking__content {
		padding-top: 1.5rem;
		border-top: 1px solid #e0e0e0;
		overflow: visible;
	}
}

/* Thank-you page */
.guide-booking-result__summary {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.4rem 1.5rem;
	margin: 0 0 1.5rem;
}

.guide-booking-result__summary dt {
	font-weight: 600;
}

.guide-booking-result__summary dd {
	margin: 0;
}

.guide-booking-result__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.guide-booking-result__waiting {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.guide-booking-result__spinner {
	width: 1.25rem;
	height: 1.25rem;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: guide-booking-spin 0.8s linear infinite;
}

.guide-booking-result__waiting[hidden] {
	display: none;
}

@keyframes guide-booking-spin {
	to {
		transform: rotate(360deg);
	}
}
