/**
 * Front-end styles.
 *
 * The form inherits the theme's fonts and its accent colour, and everything a site might want to
 * restyle is a custom property on .pnres-wrap — change --pnres-accent and the whole booking flow
 * follows.
 */

.pnres-wrap {
	/*
	 * The accent follows the theme rather than being a colour of the plugin's own. Porto 7
	 * publishes its Skin colour as --porto-primary-color, and block themes publish
	 * --wp--preset--color--primary; whichever exists wins, so changing the colour in Theme
	 * Options moves the booking form with it and nothing here needs editing.
	 *
	 * The last fallback is the site's current skin colour, not a neutral blue: if a page ever
	 * renders without the theme's variables, looking like the rest of the site is the better
	 * failure. Setting --pnres-accent anywhere overrides all of it.
	 */
	--pnres-accent: var( --porto-primary-color, var( --wp--preset--color--primary, #0088cc ) );
	--pnres-accent-soft: rgba( 0, 136, 204, .08 );
	--pnres-accent-text: #fff;
	--pnres-border: #dfe3e8;
	--pnres-muted: #667085;
	--pnres-surface: #fff;
	--pnres-sunken: #f6f7f9;
	--pnres-danger: #c0392b;
	--pnres-danger-soft: rgba( 192, 57, 43, .1 );
	--pnres-success: #1e8e3e;
	--pnres-good: #1e8e3e;
	--pnres-good-soft: rgba( 30, 142, 62, .1 );
	--pnres-warn: #c2700a;
	--pnres-warn-soft: rgba( 194, 112, 10, .12 );
	--pnres-radius: 10px;

	/*
	 * The form fills whatever the theme gives it. It was capped at 880px and centred, which on a
	 * full-width page template left it stranded in the middle of the screen with the client's own
	 * layout running past it on both sides. Everything inside is auto-fit/auto-fill or flex-wrap,
	 * so widening reflows the cards and the slot list rather than stretching them. Set this
	 * property to put a cap back — `--pnres-max-width: 880px` restores the old look, and the auto
	 * margins below re-centre it when a cap is present.
	 */
	--pnres-max-width: none;

	max-width: var( --pnres-max-width );
	margin: 0 auto;
	color: inherit;
	box-sizing: border-box;
}

/*
 * The soft accent — the focus glow and the tint behind a chosen card — is the accent at 8%, so it
 * has to be mixed from whatever colour the theme handed us rather than written out as a fixed
 * rgba(). It is done in @supports rather than as a second declaration above because a custom
 * property accepts any token sequence at parse time: a browser without color-mix() would store the
 * value happily and only fail where it is *used*, leaving the box-shadow unset instead of falling
 * back. Guarding on the feature keeps those browsers on the fixed rgba() above.
 */
@supports ( background: color-mix( in srgb, red 8%, transparent ) ) {
	.pnres-wrap {
		--pnres-accent-soft: color-mix( in srgb, var( --pnres-accent ) 8%, transparent );
	}
}

/* Plenty of themes still do not set this, and every width below assumes it. */
.pnres-wrap *,
.pnres-wrap *::before,
.pnres-wrap *::after {
	box-sizing: border-box;
}

/*
 * A fieldset defaults to min-inline-size: min-content, which no ordinary width can override. Left
 * alone, any grid or flex layout inside it resolves its tracks against that intrinsic size instead
 * of the space actually available, and the contents burst out of the box.
 */
.pnres-wrap fieldset {
	min-width: 0;
}

.pnres-heading {
	margin: 0 0 1rem;
}

/* Steps ------------------------------------------------------------------ */

.pnres-step {
	border: 1px solid var(--pnres-border);
	border-radius: var(--pnres-radius);
	padding: 1.25rem;
	margin: 0 0 1rem;
	background: var(--pnres-surface);
}

.pnres-step > legend {
	display: flex;
	align-items: center;
	gap: .55rem;
	font-weight: 600;
	font-size: 1.05em;
	padding: 0 .4rem;
}

.pnres-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6em;
	height: 1.6em;
	border-radius: 50%;
	background: var(--pnres-accent);
	color: var(--pnres-accent-text);
	font-size: .8em;
	font-weight: 700;
	flex: none;
}

.pnres-field {
	display: block;
	margin: 0 0 1rem;
}

.pnres-field:last-child {
	margin-bottom: 0;
}

.pnres-label {
	display: block;
	margin-bottom: .35rem;
	font-weight: 600;
	font-size: .95em;
}

.pnres-req {
	color: var(--pnres-danger);
}

.pnres-wrap input[type="text"],
.pnres-wrap input[type="email"],
.pnres-wrap input[type="password"],
.pnres-wrap input[type="tel"],
.pnres-wrap input[type="date"],
.pnres-wrap select,
.pnres-wrap textarea {
	width: 100%;
	min-height: 2.8rem;
	box-sizing: border-box;
	padding: .6rem .75rem;
	border: 1px solid var(--pnres-border);
	border-radius: var(--pnres-radius);
	background: var(--pnres-surface);
	font: inherit;
	color: inherit;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.pnres-wrap input[type="text"]:hover,
.pnres-wrap input[type="email"]:hover,
.pnres-wrap input[type="password"]:hover,
.pnres-wrap input[type="tel"]:hover,
.pnres-wrap input[type="date"]:hover,
.pnres-wrap select:hover,
.pnres-wrap textarea:hover {
	border-color: var(--pnres-accent);
}

.pnres-wrap input[type="text"]:focus,
.pnres-wrap input[type="email"]:focus,
.pnres-wrap input[type="password"]:focus,
.pnres-wrap input[type="tel"]:focus,
.pnres-wrap input[type="date"]:focus,
.pnres-wrap select:focus,
.pnres-wrap textarea:focus {
	border-color: var(--pnres-accent);
	box-shadow: 0 0 0 3px var(--pnres-accent-soft);
	outline: 0;
}

.pnres-wrap input:focus-visible,
.pnres-wrap select:focus-visible,
.pnres-wrap textarea:focus-visible,
.pnres-wrap button:focus-visible {
	outline: 2px solid var(--pnres-accent);
	outline-offset: 2px;
}

.pnres-grid {
	display: grid;
	gap: 0 1rem;
	grid-template-columns: 1fr;
	width: 100%;
	min-width: 0;
}

@media (min-width: 640px) {
	.pnres-grid {
		grid-template-columns: 1fr 1fr;
	}
}

/*
 * Name, e-mail and phone on one row, with the same tracks and gap as the location cards, so the
 * three fields sit under the three branches. auto-fit rather than a fixed three: a narrower page
 * drops to two and then one on its own. Company, tax number and the vehicle count are kept out of
 * this row on purpose, on a two-column row of their own above it.
 */
@media (min-width: 560px) {
	.pnres-grid.pnres-grid-contact {
		gap: 0 .75rem;
		grid-template-columns: repeat( auto-fit, minmax( 15rem, 1fr ) );
	}
}

/* Cards: locations and services ------------------------------------------ */

.pnres-cards {
	display: grid;
	gap: .75rem;
	grid-template-columns: 1fr;
	width: 100%;
	min-width: 0;
}

@media (min-width: 560px) {
	.pnres-cards {
		grid-template-columns: repeat( auto-fit, minmax( 15rem, 1fr ) );
	}
}

.pnres-card {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: .75rem;
	padding: .9rem 2.4rem .9rem 1rem;
	border: 1px solid var(--pnres-border);
	border-radius: var(--pnres-radius);
	background: var(--pnres-surface);
	cursor: pointer;
	min-width: 0;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.pnres-card:hover {
	border-color: var(--pnres-accent);
}

/* The real control stays focusable but the card is what people see. */
.pnres-card input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}

.pnres-card:has( input:focus-visible ) {
	outline: 2px solid var(--pnres-accent);
	outline-offset: 2px;
}

.pnres-card.pnres-card-on,
.pnres-card:has( input:checked ) {
	border-color: var(--pnres-accent);
	background: var(--pnres-accent-soft);
	box-shadow: inset 0 0 0 1px var(--pnres-accent);
}

.pnres-card-inner {
	display: flex;
	flex-direction: column;
	gap: .15rem;
	min-width: 0;
}

.pnres-card-title {
	font-weight: 600;
}

.pnres-card-meta {
	color: var(--pnres-muted);
	font-size: .88em;
}

.pnres-card-price {
	margin-left: auto;
	font-weight: 600;
	white-space: nowrap;
}

/* The tick sits in the padding reserved on the right of every card. */
.pnres-card-tick {
	position: absolute;
	top: .9rem;
	right: .9rem;
	width: 1.15rem;
	height: 1.15rem;
	border: 1px solid var(--pnres-border);
	border-radius: 50%;
	background: var(--pnres-surface);
}

.pnres-card.pnres-card-on .pnres-card-tick,
.pnres-card:has( input:checked ) .pnres-card-tick {
	border-color: var(--pnres-accent);
	background: var(--pnres-accent);
}

.pnres-card.pnres-card-on .pnres-card-tick::after,
.pnres-card:has( input:checked ) .pnres-card-tick::after {
	content: "";
	position: absolute;
	left: .34rem;
	top: .16rem;
	width: .3rem;
	height: .55rem;
	border: solid var(--pnres-accent-text);
	border-width: 0 2px 2px 0;
	transform: rotate( 45deg );
}

.pnres-services-empty {
	color: var(--pnres-muted);
	margin: .75rem 0 0;
}

/* Running total ---------------------------------------------------------- */

.pnres-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	margin-top: 1rem;
	padding: .7rem .9rem;
	border: 1px solid var(--pnres-accent);
	border-radius: var(--pnres-radius);
	font-size: 1.05em;
}

.pnres-total[hidden],
.pnres-legend[hidden],
.pnres-recap[hidden],
.pnres-date-fallback[hidden] {
	display: none;
}

/*
 * The script hides things with the `hidden` attribute, and any `display` rule — ours or the
 * theme's — beats the browser's own [hidden] { display: none }. That is how `.pnres-card`'s flex
 * kept every service on screen after a location was chosen, filtered out but still tickable.
 * One rule for everything inside the form, so a new element cannot fall into the same gap.
 */
.pnres-wrap [hidden] {
	display: none !important;
}

.pnres-total-label {
	font-weight: 600;
}

.pnres-total-value {
	font-weight: 700;
	white-space: nowrap;
}

/* Date and time ---------------------------------------------------------- */

/*
 * Flex rather than grid on purpose: if anything interferes with it, the two panels simply stack,
 * which is still perfectly usable. A grid with sized tracks fails by overflowing instead.
 */
.pnres-datetime {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 1.25rem;
	width: 100%;
	min-width: 0;
}

/* Neutralise float or positioning a theme may put on generic divs. */
.pnres-datetime > * {
	float: none;
	position: static;
	min-width: 0;
}

.pnres-calendar-side {
	flex: 1 1 17rem;
	max-width: 20rem;
}

.pnres-slots-side {
	flex: 2 1 14rem;
}

/* Below roughly 34rem of room the two panels stop fitting side by side. */
@media (max-width: 560px) {
	.pnres-calendar-side {
		max-width: none;
		flex-basis: 100%;
	}

	.pnres-slots-side {
		flex-basis: 100%;
	}
}

.pnres-calendar {
	width: 100%;
	border: 1px solid var(--pnres-border);
	border-radius: var(--pnres-radius);
	padding: .75rem;
	background: var(--pnres-surface);
}

.pnres-cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	margin-bottom: .6rem;
}

.pnres-cal-title {
	font-weight: 600;
	text-transform: capitalize;
}

.pnres-cal-nav {
	width: 2rem;
	height: 2rem;
	border: 1px solid var(--pnres-border);
	border-radius: var(--pnres-radius);
	background: var(--pnres-surface);
	color: inherit;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
}

.pnres-cal-nav:hover:not([disabled]) {
	border-color: var(--pnres-accent);
	color: var(--pnres-accent);
}

.pnres-cal-nav[disabled] {
	opacity: .35;
	cursor: default;
}

.pnres-cal-grid {
	display: grid;
	grid-template-columns: repeat( 7, 1fr );
	gap: .25rem;
	min-width: 0;
}

.pnres-cal-weekday {
	text-align: center;
	font-size: .72em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--pnres-muted);
	padding-bottom: .25rem;
}

.pnres-cal-day,
.pnres-cal-blank {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	border-radius: var(--pnres-radius);
	font-size: .92em;
	font-variant-numeric: tabular-nums;
}

/* Bookable days are real buttons, so they are reachable by keyboard. */
button.pnres-cal-day {
	border: 1px solid var(--pnres-border);
	background: var(--pnres-surface);
	color: inherit;
	font: inherit;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
	transition: background-color .12s ease, border-color .12s ease;
}

button.pnres-cal-day:hover {
	border-color: var(--pnres-accent);
	background: var(--pnres-accent-soft);
}

/*
 * Matched on button.pnres-cal-day.pnres-cal-selected, not on the class alone: the plain
 * button.pnres-cal-day rule above is more specific and would otherwise repaint the chosen day
 * back to the ordinary surface colour.
 */
button.pnres-cal-day.pnres-cal-selected,
button.pnres-cal-day.pnres-cal-selected:hover {
	background: var(--pnres-accent);
	border-color: var(--pnres-accent);
	color: var(--pnres-accent-text);
	font-weight: 700;
}

button.pnres-cal-day.pnres-cal-selected .pnres-cal-dot {
	background: currentColor;
}

.pnres-cal-today {
	box-shadow: inset 0 0 0 1px var(--pnres-accent);
}

/* The dot repeats the state in the calendar, so a month reads at a glance. */
.pnres-cal-dot {
	position: absolute;
	bottom: .28rem;
	left: 50%;
	transform: translateX( -50% );
	width: .3rem;
	height: .3rem;
	border-radius: 50%;
}

.pnres-cal-available .pnres-cal-dot {
	background: var(--pnres-good);
}

.pnres-cal-few .pnres-cal-dot {
	background: var(--pnres-warn);
}

button.pnres-cal-day.pnres-cal-few {
	border-color: var(--pnres-warn);
	background: var(--pnres-warn-soft);
}

/* Fully booked reads as "come back another day", so it is the one that goes red. */
.pnres-cal-full {
	background: var(--pnres-danger-soft);
	color: var(--pnres-danger);
	text-decoration: line-through;
	cursor: not-allowed;
}

/* Days the workshop does not work, days gone by, days past the horizon, days too soon for the
   services chosen: struck through too, so a closed Sunday is unmistakably closed rather than
   merely faint. */
.pnres-cal-closed,
.pnres-cal-past,
.pnres-cal-outside,
.pnres-cal-notice {
	color: var(--pnres-muted);
	background: var(--pnres-sunken);
	text-decoration: line-through;
	opacity: .7;
	cursor: not-allowed;
}

.pnres-cal-hint {
	margin: 0;
	padding: 1.5rem .5rem;
	text-align: center;
	color: var(--pnres-muted);
	font-size: .92em;
}

.pnres-legend {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem .9rem;
	list-style: none;
	margin: .6rem 0 0;
	padding: 0;
	font-size: .8em;
	color: var(--pnres-muted);
}

.pnres-legend li {
	display: flex;
	align-items: center;
	gap: .35rem;
}

.pnres-key {
	width: .8rem;
	height: .8rem;
	border-radius: 3px;
	border: 1px solid var(--pnres-border);
	flex: none;
}

.pnres-key-free {
	background: var(--pnres-good);
	border-color: var(--pnres-good);
}

.pnres-key-last {
	background: var(--pnres-warn);
	border-color: var(--pnres-warn);
}

.pnres-key-full {
	background: var(--pnres-danger);
	border-color: var(--pnres-danger);
}

.pnres-key-closed {
	background: #c7ccd3;
	border-color: #b3b9c1;
}

/* Slots ------------------------------------------------------------------ */

.pnres-slots-title {
	margin: 0 0 .5rem;
	font-weight: 600;
	font-size: .95em;
}

.pnres-slots-hint {
	color: var(--pnres-muted);
	margin: 0;
	font-size: .92em;
}

/*
 * The track minimum has to hold a whole slot label on one line — "08:00 – 08:30" plus the state
 * dot, the gap and the cell padding. At 7rem it did not, and every chip broke across two lines,
 * which doubled the height of the panel and made a column of times harder to scan than a list.
 * `min()` keeps that minimum from becoming an overflow on a container narrower than one chip.
 */
.pnres-slot-list {
	display: grid;
	gap: .5rem;
	grid-template-columns: repeat( auto-fill, minmax( min( 9.5rem, 100% ), 1fr ) );
	width: 100%;
	min-width: 0;
	max-height: 22rem;
	overflow-y: auto;
}

.pnres-slot {
	position: relative;
	display: flex;
	align-items: center;
	gap: .45rem;
	padding: .55rem .6rem;
	border: 1px solid var(--pnres-border);
	border-radius: var(--pnres-radius);
	font-size: .93em;
	background: var(--pnres-surface);
}

/* Only the bookable ones are labels, so only they invite a click. */
label.pnres-slot {
	cursor: pointer;
}

label.pnres-slot:hover {
	border-color: var(--pnres-accent);
	background: var(--pnres-accent-soft);
}

.pnres-slot input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

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

/*
 * A time range is one thing to read, so it never breaks — not at the spaces around the dash, and
 * not at the dash itself. The track above is sized to fit it; this is what stops a theme with a
 * wider font from wrapping it anyway.
 */
.pnres-slot-time {
	white-space: nowrap;
}

/* The dot is the quick read; the accessible name still spells the state out in words. */
.pnres-slot-dot {
	width: .5rem;
	height: .5rem;
	border-radius: 50%;
	flex: none;
	background: var(--pnres-border);
}

.pnres-slot-free {
	border-color: var(--pnres-good-soft);
}

.pnres-slot-free .pnres-slot-dot {
	background: var(--pnres-good);
}

.pnres-slot-last {
	border-color: var(--pnres-warn);
	background: var(--pnres-warn-soft);
}

.pnres-slot-last .pnres-slot-dot {
	background: var(--pnres-warn);
}

/* Taken or too late: visible, so the day reads honestly, but inert. */
.pnres-slot-full,
.pnres-slot-passed {
	color: var(--pnres-muted);
	background: var(--pnres-sunken);
	border-color: var(--pnres-border);
	text-decoration: line-through;
	cursor: not-allowed;
	opacity: .75;
}

.pnres-slot-full .pnres-slot-dot {
	background: var(--pnres-danger);
	opacity: .6;
}

.pnres-slot.pnres-slot-on,
.pnres-slot:has( input:checked ) {
	background: var(--pnres-accent);
	border-color: var(--pnres-accent);
	color: var(--pnres-accent-text);
	font-weight: 600;
}

.pnres-slot.pnres-slot-on .pnres-slot-dot,
.pnres-slot:has( input:checked ) .pnres-slot-dot {
	background: currentColor;
}

/* Available only once a location is chosen — until then the whole panel is inert. */
.pnres-locked {
	opacity: .5;
	pointer-events: none;
	user-select: none;
}

.pnres-lock-note {
	margin: 0 0 .75rem;
	padding: .6rem .8rem;
	border-radius: var(--pnres-radius);
	background: var(--pnres-sunken);
	color: var(--pnres-muted);
	font-size: .92em;
}

.pnres-lock-note[hidden] {
	display: none;
}

/* Visible to screen readers only — carries the meaning the colours convey. */
.pnres-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

/* Recap ------------------------------------------------------------------ */

.pnres-recap {
	border: 1px solid var(--pnres-border);
	border-radius: var(--pnres-radius);
	background: var(--pnres-sunken);
	padding: 1rem 1.25rem;
	margin: 0 0 1rem;
}

.pnres-recap-title {
	margin: 0 0 .6rem;
	font-weight: 600;
}

.pnres-recap dl {
	margin: 0;
	display: grid;
	gap: .35rem;
}

.pnres-recap dl > div {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem .75rem;
	font-size: .93em;
}

/* The display above would otherwise beat the attribute when a row is hidden. */
.pnres-recap dl > div[hidden] {
	display: none;
}

.pnres-recap dt {
	min-width: 7rem;
	color: var(--pnres-muted);
}

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

.pnres-recap-empty {
	font-weight: 400;
	color: var(--pnres-muted);
}

.pnres-recap-total dd {
	color: var(--pnres-accent);
}

/* Vehicles ---------------------------------------------------------------- */

.pnres-vehicles {
	display: grid;
	gap: .75rem;
}

/*
 * A single vehicle is the ordinary case and gets no chrome at all: the row is just the two fields,
 * indistinguishable from how the form read before batches existed.
 */
.pnres-vehicle-row {
	position: relative;
}

.pnres-vehicle-num {
	display: none;
}

.pnres-vehicles-numbered .pnres-vehicle-row {
	border: 1px solid var(--pnres-border);
	border-radius: var(--pnres-radius);
	padding: .85rem 1rem .85rem 2.75rem;
	background: var(--pnres-sunken);
}

.pnres-vehicles-numbered .pnres-vehicle-num {
	position: absolute;
	top: .85rem;
	left: .85rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	background: var(--pnres-accent);
	color: #fff;
	font-size: .8em;
	font-weight: 600;
}

.pnres-vehicle-count-field input {
	max-width: 7rem;
}

.pnres-field-note,
.pnres-vehicle-note {
	color: var(--pnres-muted);
	font-size: .88em;
}

.pnres-vehicle-note {
	margin: .75rem 0 0;
}

.pnres-vehicle-note[hidden] {
	display: none;
}

/* Consent, actions, messages --------------------------------------------- */

.pnres-consent {
	display: flex;
	gap: .5rem;
	align-items: flex-start;
	margin-top: 1rem;
	font-size: .93em;
}

.pnres-actions {
	display: flex;
	align-items: center;
	gap: .75rem;
}

.pnres-submit {
	background: var(--pnres-accent);
	color: var(--pnres-accent-text);
	border: 0;
	border-radius: var(--pnres-radius);
	padding: .8rem 1.6rem;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.pnres-submit:hover {
	filter: brightness( .93 );
}

.pnres-submit[disabled] {
	opacity: .6;
	cursor: default;
	filter: none;
}

.pnres-spinner {
	width: 1.1rem;
	height: 1.1rem;
	border: 2px solid var(--pnres-border);
	border-top-color: var(--pnres-accent);
	border-radius: 50%;
	animation: pnres-spin .8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.pnres-spinner {
		animation: none;
	}

	.pnres-card,
	button.pnres-cal-day {
		transition: none;
	}
}

.pnres-message:empty {
	display: none;
}

.pnres-notice {
	padding: .8rem 1rem;
	border-radius: var(--pnres-radius);
	border-left: 4px solid var(--pnres-muted);
	background: var(--pnres-sunken);
	margin: 0 0 1rem;
}

.pnres-notice-success {
	border-left-color: var(--pnres-success);
}

.pnres-notice-error {
	border-left-color: var(--pnres-danger);
}

.pnres-notice-info {
	border-left-color: var(--pnres-accent);
}

/* The honeypot must be unreachable for people but present for bots. */
.pnres-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Customer's own reservations ------------------------------------------- */

.pnres-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .93em;
}

.pnres-table th,
.pnres-table td {
	text-align: left;
	padding: .55rem .6rem;
	border-bottom: 1px solid var(--pnres-border);
	vertical-align: top;
}

.pnres-status {
	display: inline-block;
	padding: .12rem .5rem;
	border-radius: 999px;
	font-size: .85em;
	background: rgba( 0, 0, 0, .06 );
}

.pnres-status-confirmed {
	background: rgba( 30, 142, 62, .14 );
	color: #14682d;
}

.pnres-status-cancelled {
	background: var(--pnres-danger-soft);
	color: #96271c;
}

.pnres-status-pending {
	background: rgba( 214, 158, 46, .18 );
	color: #7a5a12;
}

.pnres-cancel {
	background: none;
	border: 1px solid var(--pnres-border);
	border-radius: var(--pnres-radius);
	padding: .3rem .7rem;
	font: inherit;
	font-size: .9em;
	cursor: pointer;
}

.pnres-cancel:hover {
	border-color: var(--pnres-danger);
	color: var(--pnres-danger);
}

/* The table stops working below roughly 40rem, so it scrolls instead of squashing. */
@media (max-width: 640px) {
	.pnres-my-reservations {
		overflow-x: auto;
	}

	.pnres-table {
		min-width: 40rem;
	}
}

.pnres-login-gate .pnres-login-help {
	font-size: .9em;
	color: var(--pnres-muted);
}

/* Fleet sign-in --------------------------------------------------------- */

/*
 * wp_login_form() supplies two ordinary paragraphs. Treating them as a compact form card makes
 * the sign-in task read as one unit and gives username and password equal visual weight. On a
 * wider screen they sit side by side; a small screen keeps the natural one-column order.
 */
.pnres-login-gate > h3 {
	margin: 0 0 .4rem;
}

.pnres-login-gate > h3 + p {
	margin: 0 0 1.1rem;
	color: var(--pnres-muted);
}

.pnres-login-gate #loginform {
	display: grid;
	grid-template-columns: 1fr;
	gap: .9rem 1rem;
	margin: 0;
	padding: 1.25rem;
	border: 1px solid var(--pnres-border);
	border-radius: calc( var(--pnres-radius) + 2px );
	background: var(--pnres-surface);
	box-shadow: 0 8px 24px rgba( 16, 24, 40, .06 );
}

.pnres-login-gate #loginform p {
	margin: 0;
}

.pnres-login-gate #loginform label {
	display: block;
	margin-bottom: .35rem;
	font-size: .95em;
	font-weight: 600;
}

.pnres-login-gate #loginform input[type="text"],
.pnres-login-gate #loginform input[type="password"] {
	display: block;
	width: 100%;
}

.pnres-login-gate #loginform .login-remember {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-size: .92em;
	color: var(--pnres-muted);
}

.pnres-login-gate #loginform .login-remember label {
	margin: 0;
	font: inherit;
}

.pnres-login-gate #loginform .login-remember input {
	margin: 0;
}

.pnres-login-gate #loginform .login-submit {
	display: flex;
	align-items: center;
}

.pnres-login-gate #loginform .button {
	min-height: 2.8rem;
	padding: .65rem 1.25rem;
	border: 0;
	border-radius: var(--pnres-radius);
	background: var(--pnres-accent);
	color: var(--pnres-accent-text);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.pnres-login-gate #loginform .button:hover {
	filter: brightness( .93 );
}

.pnres-login-gate #loginform .button:focus-visible {
	outline: 2px solid var(--pnres-accent);
	outline-offset: 2px;
}

@media (min-width: 640px) {
	.pnres-login-gate #loginform {
		grid-template-columns: 1fr 1fr;
	}

	.pnres-login-gate #loginform .login-remember,
	.pnres-login-gate #loginform .login-submit {
		grid-column: span 2;
	}
}

@media (max-width: 639px) {
	.pnres-login-gate #loginform .button {
		width: 100%;
	}
}

/* -------------------------------------------------------------------------
 * Payment
 * ---------------------------------------------------------------------- */

.pnres-pay-card-only {
	margin: 0;
	padding: .9rem 1rem;
	border-radius: var(--pnres-radius);
	background: var(--pnres-accent-soft);
	font-size: .95em;
}

/* -------------------------------------------------------------------------
 * Asking us for a Fleet account
 * ---------------------------------------------------------------------- */

/*
 * Sits under the sign-in box on the Fleet gate, so it needs a visible seam: without one it reads
 * as more of the sign-in form, and a company starts typing its details into the password field.
 */
.pnres-fleet-request {
	margin-top: 2rem;
	padding: 1.25rem;
	border: 1px solid var(--pnres-border);
	border-radius: calc( var(--pnres-radius) + 2px );
	background: var(--pnres-sunken);
}

.pnres-fleet-request h4 {
	margin: 0 0 .35rem;
}

.pnres-fleet-request > p {
	margin: 0 0 1rem;
	color: var(--pnres-muted);
}

.pnres-fleet-request .pnres-actions {
	margin-top: 1rem;
}

/* The booking form remains a single flow, but the last decision gets a calmer visual landing. */
.pnres-form > .pnres-recap {
	border-color: color-mix( in srgb, var(--pnres-accent) 28%, var(--pnres-border) );
}

.pnres-form .pnres-actions {
	margin: 0;
}

@media (max-width: 559px) {
	.pnres-step {
		padding: 1rem;
	}

	.pnres-actions,
	.pnres-actions .pnres-submit {
		width: 100%;
	}

	.pnres-submit {
		min-height: 2.9rem;
	}
}
