/* Scheduled Pickup: customer booking screen. Kept light so it inherits the theme. */
.schpu-booking {
	--schpu-green: #2e7d32;
	--schpu-green-soft: rgba( 46, 125, 50, 0.1 );
	--schpu-green-line: rgba( 46, 125, 50, 0.5 );
	--schpu-line: rgba( 127, 127, 127, 0.35 );
	--schpu-muted: rgba( 127, 127, 127, 0.75 ); /* Decorative only (borders, disabled days). */
	max-width: 40rem;
	margin-bottom: 2em;
	transition: opacity 0.15s;
}

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

.schpu-booking.is-loading,
.schpu-booking form.is-loading {
	opacity: 0.55;
	pointer-events: none;
}

/* Order header. */
.schpu-title {
	margin-bottom: 0.25em;
}

.schpu-location {
	margin: 0;
}

.schpu-location span,
.schpu-summary,
.schpu-cutoff,
.schpu-slot-note {
	opacity: 0.78;
}

.schpu-location span,
.schpu-summary {
	font-size: 0.9em;
}

.schpu-summary {
	margin: 0.25em 0 1.5em;
}

/* Steps. */
.schpu-step {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin: 1.75em 0 0.75em;
	font-size: 1.15em;
}

.schpu-step:focus {
	outline: none;
}

.schpu-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6em;
	height: 1.6em;
	border-radius: 50%;
	background: var( --schpu-green );
	color: #fff;
	font-size: 0.8em;
	font-weight: 600;
	flex-shrink: 0;
}

.schpu-step-day {
	margin: -0.25em 0 0.75em;
	font-weight: 600;
}

/* Notices. */
.schpu-notice,
.schpu-form-error {
	padding: 0.75em 1em;
	margin: 0 0 1.5em;
	border-left: 4px solid;
}

.schpu-notice-success {
	border-color: var( --schpu-green );
	background: var( --schpu-green-soft );
}

.schpu-notice-error,
.schpu-form-error {
	border-color: #c62828;
	background: rgba( 198, 40, 40, 0.08 );
}

.schpu-live:focus {
	outline: none;
}

.schpu-closed {
	padding: 1em 1.25em;
	border: 1px dashed var( --schpu-line );
	border-radius: 6px;
}

/* Calendar: just the bookable weeks. */
.schpu-calendar {
	margin-bottom: 0.5em;
	overflow-x: auto;
}

.schpu-month {
	width: 100%;
	max-width: 24rem;
	border-collapse: separate;
	border-spacing: 4px;
	margin: 0;
	table-layout: fixed;
}

.schpu-month th,
.schpu-month td {
	text-align: center;
	padding: 0;
	border: 0;
	background: none;
}

.schpu-month thead th {
	font-size: 0.8em;
	font-weight: 600;
	opacity: 0.78;
	padding-bottom: 0.25em;
}

.schpu-month thead abbr {
	text-decoration: none;
	border: 0;
}

.schpu-month-row th {
	text-align: left;
	font-weight: 700;
	padding: 0.75em 0 0.25em;
}

.schpu-day span,
.schpu-day a {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	min-height: 2.5em;
	border-radius: 6px;
}

.schpu-day span {
	color: var( --schpu-muted );
}

.schpu-day.is-outside span {
	opacity: 0.35;
}

.schpu-day.is-open a {
	background: var( --schpu-green-soft );
	border: 1px solid var( --schpu-green-line );
	color: inherit;
	text-decoration: none;
	font-weight: 700;
}

.schpu-day.is-open a:hover,
.schpu-day.is-open a:focus-visible {
	background: var( --schpu-green-line );
	outline: 2px solid var( --schpu-green );
	outline-offset: 1px;
}

.schpu-day.is-selected a {
	background: var( --schpu-green );
	border-color: var( --schpu-green );
	color: #fff;
}

/* Times. */
.schpu-slots {
	border: 0;
	padding: 0;
	margin: 0 0 1em;
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 12em, 1fr ) );
	gap: 0.5em;
}

.schpu-slot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25em 0.6em;
	padding: 0.75em 0.9em;
	border: 1px solid var( --schpu-line );
	border-radius: 6px;
	cursor: pointer;
	min-height: 3em;
}

.schpu-slot:hover {
	border-color: var( --schpu-green-line );
}

.schpu-slot:has( input:checked ) {
	border-color: var( --schpu-green );
	box-shadow: inset 0 0 0 1px var( --schpu-green );
	background: var( --schpu-green-soft );
}

.schpu-slot:has( input:focus-visible ) {
	outline: 2px solid var( --schpu-green );
	outline-offset: 2px;
}

.schpu-slot.is-full {
	opacity: 0.5;
	cursor: not-allowed;
}

.schpu-slot-time {
	font-weight: 600;
}

.schpu-slot-note {
	flex-basis: 100%;
	padding-left: 1.6em;
	font-size: 0.85em;
}

/* Questions. */
.schpu-fields .schpu-field {
	margin-bottom: 1.25em;
}

.schpu-fields label,
.schpu-fields legend {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35em;
}

.schpu-fields fieldset {
	border: 0;
	padding: 0;
	margin: 0;
}

.schpu-fields fieldset label,
.schpu-field-checkbox label {
	font-weight: normal;
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin-bottom: 0.35em;
}

.schpu-fields input[type="text"],
.schpu-fields select,
.schpu-fields textarea {
	width: 100%;
	max-width: 100%;
	font: inherit;
	padding: 0.5em 0.65em;
}

.schpu-fields textarea {
	min-height: 5.5em;
	resize: vertical;
}

.schpu-fields abbr.required {
	text-decoration: none;
	border: 0;
	color: #c62828;
}

/* Buttons: theme-styled; spacing and the secondary look are ours. */
.schpu-booking .schpu-btn {
	display: inline-block;
	text-decoration: none;
	cursor: pointer;
}

.schpu-booking .schpu-btn.is-secondary {
	background: transparent;
	color: inherit;
	border: 1px solid currentColor;
}

.schpu-booking .schpu-submit {
	min-width: 12em;
}

/* Current booking. */
.schpu-current {
	padding: 1.25em 1.5em;
	border: 1px solid var( --schpu-line );
	border-left: 4px solid var( --schpu-green );
	border-radius: 6px;
}

.schpu-current-time strong {
	display: block;
	font-size: 1.15em;
}

.schpu-current-note {
	padding: 0.75em 1em;
	background: var( --schpu-green-soft );
	border-radius: 6px;
}

.schpu-answers dt {
	font-weight: 600;
}

.schpu-answers dd {
	margin: 0 0 0.5em;
}

.schpu-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	align-items: center;
	margin: 1em 0 0.5em;
}

.schpu-cancel-form {
	margin: 0;
	display: inline;
}

.schpu-cutoff {
	font-size: 0.9em;
	margin: 0;
}

/* Order list (logged in, several orders). */
.schpu-orders .schpu-btn {
	white-space: nowrap;
}

@media ( prefers-reduced-motion: reduce ) {
	.schpu-booking {
		transition: none;
	}
}
