/**
 * Mane Street Booking Experience — front-end styles.
 *
 * All selectors are scoped under .msb-booking so the plugin never leaks
 * styles into the surrounding theme (block themes included). Brand tokens
 * are defined as custom properties on the container.
 */

.msb-booking {
	/* Brand palette. */
	--msb-teal: #106d75;
	--msb-teal-dark: #0c545a;
	--msb-orange: #b17153;
	--msb-tan: #f4ece3;
	--msb-white: #ffffff;
	--msb-ink: #2b2622;
	--msb-muted: #6b625a;

	/* Layout tokens. */
	--msb-max: 1120px;
	--msb-radius: 16px;
	--msb-radius-sm: 10px;
	--msb-shadow: 0 10px 30px rgba(43, 38, 34, 0.08);
	--msb-shadow-sm: 0 4px 14px rgba(43, 38, 34, 0.06);

	/* Iframe heights (overridden inline per instance). */
	--msb-h-desktop: 900px;
	--msb-h-tablet: 800px;
	--msb-h-mobile: 720px;

	box-sizing: border-box;
	display: block;
	width: 100%;
	position: relative;
	background-color: var(--msb-tan);
	color: var(--msb-ink);
	font-family: Georgia, "Times New Roman", "Iowan Old Style", serif;
	line-height: 1.6;
	padding: clamp(32px, 5vw, 72px) 20px;
	border-radius: var(--msb-radius);
	overflow: hidden;
}

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

/* Subtle decorative feather texture (only when enabled). */
.msb-booking.msb-has-texture::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--msb-texture);
	background-repeat: repeat;
	background-size: 320px auto;
	opacity: 0.04; /* 4% — within the 3–5% target. */
	pointer-events: none;
	z-index: 0;
}

.msb-container {
	position: relative;
	z-index: 1;
	max-width: var(--msb-max);
	margin: 0 auto;
}

/* --- Intro ---------------------------------------------------------------- */
.msb-intro {
	text-align: center;
	max-width: 720px;
	margin: 0 auto clamp(28px, 4vw, 48px);
}

.msb-rule {
	display: block;
	width: 56px;
	height: 3px;
	margin: 0 auto 18px;
	background-color: var(--msb-orange);
	border-radius: 2px;
}

.msb-eyebrow {
	margin: 0 0 10px;
	font-family: "Helvetica Neue", Arial, sans-serif;
	font-size: 0.75rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--msb-orange);
}

.msb-heading {
	margin: 0 0 16px;
	font-size: clamp(1.75rem, 3.5vw, 2.5rem);
	line-height: 1.15;
	font-weight: 600;
	color: var(--msb-ink);
}

.msb-intro-text {
	margin: 0;
	font-size: 1.0625rem;
	color: var(--msb-muted);
}

/* --- Guidance cards ------------------------------------------------------- */
.msb-cards {
	list-style: none;
	margin: 0 0 clamp(32px, 5vw, 56px);
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.msb-card {
	background-color: var(--msb-white);
	border-radius: var(--msb-radius-sm);
	padding: 28px 24px;
	box-shadow: var(--msb-shadow-sm);
	border: 1px solid rgba(177, 113, 83, 0.14);
}

.msb-card-num {
	display: inline-block;
	font-family: "Helvetica Neue", Arial, sans-serif;
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: var(--msb-white);
	background-color: var(--msb-teal);
	border-radius: 999px;
	padding: 4px 12px;
	margin-bottom: 14px;
}

.msb-card-title {
	margin: 0 0 8px;
	font-size: 1.1875rem;
	font-weight: 600;
	color: var(--msb-teal);
}

.msb-card-text {
	margin: 0;
	font-size: 0.9875rem;
	color: var(--msb-muted);
}

/* --- Scheduler / iframe --------------------------------------------------- */
.msb-scheduler {
	margin: 0 auto clamp(32px, 5vw, 56px);
}

.msb-iframe-frame {
	background-color: var(--msb-white);
	border: 2px solid var(--msb-teal);
	border-radius: var(--msb-radius);
	padding: 10px;
	box-shadow: var(--msb-shadow);
	overflow: hidden;
	/* Optional cap + centering. Unset var resolves to none = full width. */
	max-width: var(--msb-frame-maxw, none);
	margin-left: auto;
	margin-right: auto;
}

.msb-iframe {
	display: block;
	width: 100%;
	min-height: var(--msb-h-desktop);
	height: var(--msb-h-desktop);
	border: 0;
	border-radius: var(--msb-radius-sm);
	background-color: var(--msb-white);
}

.msb-iframe-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 320px;
	padding: 40px 24px;
	color: var(--msb-muted);
	border: 1px dashed rgba(16, 109, 117, 0.4);
	border-radius: var(--msb-radius-sm);
	background-color: var(--msb-tan);
}

.msb-iframe-placeholder p {
	margin: 0;
	max-width: 420px;
}

/* --- Support bar ---------------------------------------------------------- */
.msb-support-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 16px;
	margin-top: 18px;
	text-align: center;
}

.msb-support-text {
	margin: 0;
	font-size: 0.95rem;
	color: var(--msb-muted);
}

.msb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px; /* Touch target. */
	padding: 10px 22px;
	font-family: "Helvetica Neue", Arial, sans-serif;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 999px;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.msb-btn-external {
	background-color: var(--msb-orange);
	color: var(--msb-white);
}

.msb-btn-external:hover,
.msb-btn-external:focus {
	background-color: #98603f;
}

/* --- Info columns --------------------------------------------------------- */
.msb-info {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
}

.msb-info-col {
	background-color: var(--msb-white);
	border-radius: var(--msb-radius-sm);
	padding: 28px 26px;
	box-shadow: var(--msb-shadow-sm);
	border: 1px solid rgba(177, 113, 83, 0.14);
}

.msb-info-title {
	margin: 0 0 10px;
	font-size: 1.1875rem;
	font-weight: 600;
	color: var(--msb-teal);
}

.msb-info-text {
	margin: 0 0 14px;
	font-size: 0.9875rem;
	color: var(--msb-muted);
}

.msb-address {
	font-style: normal;
}

.msb-link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-family: "Helvetica Neue", Arial, sans-serif;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--msb-teal);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.msb-link:hover,
.msb-link:focus {
	color: var(--msb-teal-dark);
}

/* --- Accessible focus states --------------------------------------------- */
.msb-booking a:focus-visible,
.msb-booking iframe:focus-visible {
	outline: 3px solid var(--msb-teal);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Visually hidden but available to screen readers. */
.msb-booking .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --- Responsive: tablet --------------------------------------------------- */
@media (max-width: 900px) {
	.msb-cards {
		grid-template-columns: repeat(2, 1fr);
	}
	.msb-iframe {
		min-height: var(--msb-h-tablet);
		height: var(--msb-h-tablet);
	}
}

/* --- Responsive: mobile --------------------------------------------------- */
@media (max-width: 600px) {
	.msb-booking {
		padding-left: 20px;
		padding-right: 20px;
		border-radius: 0;
	}
	.msb-cards {
		grid-template-columns: 1fr;
	}
	.msb-info {
		grid-template-columns: 1fr;
	}
	.msb-iframe {
		min-height: var(--msb-h-mobile);
		height: var(--msb-h-mobile);
	}
	.msb-support-bar {
		flex-direction: column;
	}
	.msb-btn,
	.msb-link {
		width: 100%;
	}
}

/* --- Respect reduced motion ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.msb-booking * {
		transition: none !important;
		animation: none !important;
	}
}
