/**
 * Guest pre-checkin form.
 *
 * Scoped entirely under .bdw-pc so a host theme cannot bleed into it and it
 * cannot bleed out. Mobile-first: the grid collapses to one column by default
 * and only widens when there is room, because most guests fill this in on a
 * phone the evening before they travel.
 */

.bdw-pc {
	--bdw-pc-ink: #1d2327;
	--bdw-pc-muted: #50575e;
	--bdw-pc-line: #dcdcde;
	--bdw-pc-accent: #1f6feb;
	--bdw-pc-error: #b32d2e;
	--bdw-pc-success: #0a7c42;
	--bdw-pc-radius: 10px;

	max-width: 860px;
	margin: 0 auto;
	color: var(--bdw-pc-ink);
	font-size: 16px;
	line-height: 1.5;
}

.bdw-pc *,
.bdw-pc *::before,
.bdw-pc *::after {
	box-sizing: border-box;
}

/* --- Header ------------------------------------------------------------- */

.bdw-pc-header {
	margin-bottom: 24px;
}

.bdw-pc-header h2 {
	margin: 0 0 4px;
	font-size: 1.6em;
	line-height: 1.2;
}

.bdw-pc-stay {
	margin: 0 0 12px;
	color: var(--bdw-pc-muted);
	font-weight: 600;
}

.bdw-pc-why,
.bdw-pc-scope {
	margin: 0 0 8px;
	padding: 12px 14px;
	background: #f6f7f7;
	border-left: 3px solid var(--bdw-pc-accent);
	border-radius: 4px;
	color: var(--bdw-pc-muted);
	font-size: 0.9em;
}

/* --- Notices ------------------------------------------------------------ */

.bdw-pc-notice {
	margin: 0 0 20px;
	padding: 14px 16px;
	border-radius: var(--bdw-pc-radius);
	border-left: 4px solid var(--bdw-pc-accent);
	background: #f0f6fc;
}

.bdw-pc-notice-error {
	border-left-color: var(--bdw-pc-error);
	background: #fcf0f1;
}

.bdw-pc-notice-success {
	border-left-color: var(--bdw-pc-success);
	background: #edfaef;
}

.bdw-pc-notice h2 {
	margin: 0 0 6px;
	font-size: 1.3em;
}

.bdw-pc-notice p:last-child {
	margin-bottom: 0;
}

/* --- Fieldsets ---------------------------------------------------------- */

.bdw-pc-fieldset {
	margin: 0 0 24px;
	padding: 18px;
	border: 1px solid var(--bdw-pc-line);
	border-radius: var(--bdw-pc-radius);
	background: #fff;
}

.bdw-pc-fieldset > legend {
	float: left;
	width: 100%;
	padding: 0;
	margin: 0 0 14px;
	font-size: 1.05em;
	font-weight: 700;
}

/*
 * Without this, a grid/flex child sitting directly after the floated legend
 * (no plain block in between) tries to squeeze into the sliver of space
 * beside a 100%-wide float instead of dropping below it.
 */
.bdw-pc-fieldset > legend + * {
	clear: both;
}

.bdw-pc-hint {
	margin: 0 0 14px;
	color: var(--bdw-pc-muted);
	font-size: 0.85em;
}

/* --- Grid --------------------------------------------------------------- */

.bdw-pc-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
}

@media (min-width: 620px) {
	.bdw-pc-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.bdw-pc-field-wide {
		grid-column: 1 / -1;
	}
}

/* --- Fields ------------------------------------------------------------- */

.bdw-pc-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

.bdw-pc-field > span {
	font-size: 0.88em;
	font-weight: 600;
}

.bdw-pc-req {
	color: var(--bdw-pc-error);
}

.bdw-pc-field input[type="text"],
.bdw-pc-field input[type="email"],
.bdw-pc-field input[type="tel"],
.bdw-pc-field input[type="date"],
.bdw-pc-field input[type="time"],
.bdw-pc-field input[type="file"],
.bdw-pc-field select,
.bdw-pc-field textarea,
.bdw-pc-form input[type="text"],
.bdw-pc-form input[type="time"],
.bdw-pc-form textarea {
	width: 100%;
	max-width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--bdw-pc-line);
	border-radius: 6px;
	background: #fff;
	color: inherit;
	/* 16px minimum stops iOS Safari zooming in on focus. */
	font-size: 16px;
	font-family: inherit;
	line-height: 1.4;
}

.bdw-pc-field textarea,
.bdw-pc-form textarea {
	resize: vertical;
}

.bdw-pc-field input:focus-visible,
.bdw-pc-field select:focus-visible,
.bdw-pc-field textarea:focus-visible,
.bdw-pc-form input:focus-visible,
.bdw-pc-form textarea:focus-visible,
.bdw-pc-submit:focus-visible {
	outline: 2px solid var(--bdw-pc-accent);
	outline-offset: 2px;
}

.bdw-pc-field input:user-invalid {
	border-color: var(--bdw-pc-error);
}

.bdw-pc-help {
	color: var(--bdw-pc-muted);
	font-size: 0.8em;
	line-height: 1.4;
}

/* --- Consent and submit ------------------------------------------------- */

.bdw-pc-consent {
	margin: 0 0 20px;
	padding: 14px 16px;
	border: 1px solid var(--bdw-pc-line);
	border-radius: var(--bdw-pc-radius);
	background: #f6f7f7;
}

.bdw-pc-consent label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 0.9em;
}

.bdw-pc-consent input[type="checkbox"] {
	flex: 0 0 auto;
	margin-top: 2px;
	width: 18px;
	height: 18px;
}

.bdw-pc-submit {
	display: inline-block;
	padding: 13px 26px;
	border: 0;
	border-radius: 8px;
	background: var(--bdw-pc-accent);
	color: #fff;
	font-size: 1em;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
}

.bdw-pc-submit:hover {
	filter: brightness(0.94);
}

/* --- Honeypot ----------------------------------------------------------- */

/*
 * Positioned off-screen rather than display:none — some bots skip anything
 * that is display:none, and a real screen reader user is told to leave it
 * empty by its label.
 */
.bdw-pc-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/*
 * No dark-mode block: the host theme (b-easy-frontend) has no dark palette of
 * its own, so this form always renders on a light page regardless of the
 * visitor's OS/browser preference. Guessing dark from prefers-color-scheme
 * previously painted dark boxes on top of that light page instead of
 * matching it. Reintroduce this only alongside real dark-mode support in
 * b-easy-frontend.
 */

/* --- Reduced motion ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.bdw-pc * {
		transition: none !important;
		animation: none !important;
	}
}
