/* HITOP-RDV booking form. Mobile-first, inherits the theme font. */
.hitoprdv {
	--hitoprdv-accent: #1f5fbf;
	--hitoprdv-accent-text: #ffffff;
	--hitoprdv-text: #1d2327;
	--hitoprdv-muted: #5a6169;
	--hitoprdv-border: #c3c8cd;
	--hitoprdv-surface: #ffffff;
	--hitoprdv-danger: #b32d2e;
	--hitoprdv-success: #1a6b34;
	--hitoprdv-radius: 10px;

	box-sizing: border-box;
	max-width: 36rem;
	margin: 0 auto;
	padding: 1rem;
	color: var(--hitoprdv-text);
	font: inherit;
	line-height: 1.45;
}

.hitoprdv *,
.hitoprdv *::before,
.hitoprdv *::after {
	box-sizing: inherit;
}

.hitoprdv__live {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.hitoprdv__title {
	margin: 0 0 1rem;
	font-size: 1.4em;
	line-height: 1.2;
}

.hitoprdv__title:focus {
	outline: none;
}

.hitoprdv__label {
	display: block;
	margin: 1rem 0 0.4rem;
	font-weight: 600;
}

.hitoprdv__muted {
	color: var(--hitoprdv-muted);
	font-size: 0.9em;
}

/* Touch targets: at least 48px high. */
.hitoprdv__btn,
.hitoprdv__slot {
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 0 0 0.6rem;
	padding: 0.7rem 1rem;
	border: 2px solid var(--hitoprdv-accent);
	border-radius: var(--hitoprdv-radius);
	background: var(--hitoprdv-surface);
	color: var(--hitoprdv-accent);
	font: inherit;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.hitoprdv__btn--primary,
.hitoprdv__slot--primary {
	background: var(--hitoprdv-accent);
	color: var(--hitoprdv-accent-text);
}

.hitoprdv__slot--primary {
	min-height: 56px;
	font-size: 1.1em;
}

.hitoprdv__btn--danger {
	border-color: var(--hitoprdv-danger);
	background: var(--hitoprdv-danger);
	color: #ffffff;
}

.hitoprdv__btn--secondary {
	border-color: var(--hitoprdv-border);
	color: var(--hitoprdv-text);
}

.hitoprdv__btn--link {
	display: inline-block;
	width: auto;
	min-height: 44px;
	margin: 0;
	border-color: transparent;
	background: transparent;
	text-decoration: underline;
}

.hitoprdv__btn:hover,
.hitoprdv__slot:hover {
	filter: brightness(0.95);
}

.hitoprdv__btn:focus-visible,
.hitoprdv__slot:focus-visible,
.hitoprdv__input:focus-visible,
.hitoprdv a:focus-visible,
.hitoprdv input[type="checkbox"]:focus-visible {
	outline: 3px solid var(--hitoprdv-text);
	outline-offset: 2px;
}

.hitoprdv__btn:disabled,
.hitoprdv__slot:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.hitoprdv__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
	gap: 0.6rem;
}

.hitoprdv__grid .hitoprdv__slot {
	margin: 0;
}

/* 16px minimum: prevents the automatic zoom on iPhone. */
.hitoprdv__input {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 0.6rem 0.75rem;
	border: 2px solid var(--hitoprdv-border);
	border-radius: var(--hitoprdv-radius);
	background: var(--hitoprdv-surface);
	color: var(--hitoprdv-text);
	font: inherit;
	font-size: max(16px, 1em);
}

.hitoprdv__input[aria-invalid="true"] {
	border-color: var(--hitoprdv-danger);
}

.hitoprdv__field {
	margin-bottom: 0.4rem;
}

.hitoprdv__field-error,
.hitoprdv__error {
	margin: 0.4rem 0;
	color: var(--hitoprdv-danger);
	font-weight: 600;
}

.hitoprdv__success {
	margin: 0 0 1rem;
	color: var(--hitoprdv-success);
	font-weight: 600;
}

.hitoprdv__chosen {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-radius: var(--hitoprdv-radius);
	background: rgba(31, 95, 191, 0.08);
}

.hitoprdv__consent label {
	display: block;
	min-height: 44px;
}

.hitoprdv__consent input[type="checkbox"] {
	width: 1.4rem;
	height: 1.4rem;
	vertical-align: middle;
}

.hitoprdv__summary {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.4rem 1rem;
	margin: 0 0 1.2rem;
}

.hitoprdv__summary dt {
	color: var(--hitoprdv-muted);
}

.hitoprdv__summary dd {
	margin: 0;
	font-weight: 600;
}

.hitoprdv__actions {
	margin-top: 1rem;
}

.hitoprdv__calendar {
	margin-top: 1rem;
}

/* Honeypot: off-screen for people, still present for robots. */
.hitoprdv__hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (min-width: 40rem) {
	.hitoprdv {
		padding: 1.5rem;
	}

	.hitoprdv__btn,
	.hitoprdv__slot {
		width: auto;
		min-width: 14rem;
	}

	.hitoprdv__grid .hitoprdv__slot {
		min-width: 0;
	}
}

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

.hitoprdv__help {
	margin: 0 0 4px;
	font-size: 0.9em;
	color: var(--hitoprdv-muted, #50575e);
}

.hitoprdv__feed {
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid var(--hitoprdv-border, #c3c8cd);
}
