/* Form pieces shared by the website's forms (table booking, contact, catering enquiry):
   required/optional markers, per-field errors, the calendar date picker and the booking time picker.
   Uses the colour variables from the page's own stylesheet. */

/* Required / optional markers */
.required-note {
	margin: 0 0 1.5rem;
	font-size: .95rem;
	color: var(--muted);
}
.req {
	color: var(--error);
	font-weight: 700;
}
.optional {
	font-weight: 400;
	color: var(--muted);
}

/* Per-field errors */
.field-error {
	margin: 6px 0 0;
	font-size: .92rem;
	font-weight: 600;
	color: var(--error);
}
.field-error::before {
	content: "! ";
	display: inline-block;
	width: 1.2em;
	height: 1.2em;
	margin-right: .35em;
	border-radius: 50%;
	background: var(--error);
	color: #fff;
	font-size: .8em;
	line-height: 1.2em;
	text-align: center;
}
/* The summary by the send button names each field to fix, as a link to it */
.form-problems a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.form-problems a:hover {
	color: var(--ink);
}
/* Every control in a field with a problem gets the same red edge and pale red fill:
   text boxes, the date and time buttons, restaurant / pickup choices, guest numbers and the dishes */
.has-error input,
.has-error textarea,
.has-error select,
.has-error .picker-trigger,
.has-error .choice label:not(:has(input:checked)),
.has-error .guest-slot:not(.is-selected),
.has-error .guest-more,
.has-error .menu-item:not(.chosen) {
	border-color: var(--error);
	background: #FFF8F6;
}
.has-error input:focus,
.has-error textarea:focus,
.has-error select:focus,
.has-error .picker-trigger:focus {
	border-color: var(--error);
	box-shadow: 0 0 0 2px var(--error);
}
.has-error label {
	color: var(--error);
}

/* A button that looks like a text box and opens a calendar or a list of times */
.datepicker,
.timepicker {
	position: relative;
}
.picker-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	border: 1.5px solid #A9AE9C;
	border-radius: 4px;
	background: #fff;
	color: var(--ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.picker-trigger:focus {
	outline: 0;
	border-color: var(--olive-900);
	box-shadow: 0 0 0 2px var(--olive-900);
}
.date-text.is-empty,
.time-text.is-empty {
	color: #8A9080;
}
.date-icon,
.time-icon {
	flex: none;
	color: var(--accent);
}
.is-open .picker-trigger {
	border-color: var(--olive-900);
	box-shadow: 0 0 0 2px var(--olive-900);
}
.calendar,
.timepanel {
	position: absolute;
	z-index: 30;
	top: calc(100% + 8px);
	left: 0;
	width: 100%;
	min-width: 320px;
	max-width: 360px;
	padding: 14px 14px 10px;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid var(--oak-line);
	border-radius: 10px;
	box-shadow: 0 14px 34px rgba(38, 48, 26, .22);
}
.calendar[hidden],
.timepanel[hidden] {
	display: none;
}

/* Calendar */
.cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}
.cal-title {
	margin: 0;
	font: 400 1.2rem/1.2 var(--display);
	color: var(--olive-900);
}
.cal-nav {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: var(--cream);
	color: var(--olive-900);
	cursor: pointer;
}
.cal-nav:hover {
	background: var(--oak);
}
.cal-nav:disabled {
	visibility: hidden;
}
.cal-grid {
	display: grid;
	/* minmax(0, 1fr): the days shrink to fit rather than pushing Sunday out of the box */
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 3px;
}
.cal-dow {
	padding: 4px 0;
	text-align: center;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--muted);
}
.cal-day {
	aspect-ratio: 1;
	min-width: 0;
	min-height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--ink);
	font: 500 1rem/1 var(--body);
	cursor: pointer;
}
.cal-day:hover {
	background: #E9F0DC;
}
.cal-day.is-today {
	box-shadow: inset 0 0 0 2px var(--accent);
	font-weight: 700;
}
.cal-day.is-selected,
.cal-day.is-selected:hover {
	background: var(--btn);
	color: #fff;
	font-weight: 700;
}
.cal-day:disabled {
	color: #BFC2B6;
	background: none;
	cursor: default;
}
.cal-day:focus-visible,
.cal-nav:focus-visible,
.time-tab:focus-visible,
.time-slot:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 1px;
}
.cal-note {
	margin: 8px 2px 0;
	font-size: .82rem;
	color: var(--muted);
}

/* Booking times: morning / afternoon / evening tabs, then 15-minute slots */
.time-for {
	margin: 0 2px 10px;
	font: 400 1.15rem/1.2 var(--display);
	color: var(--olive-900);
}
.time-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 12px;
	padding: 4px;
	border-radius: 999px;
	background: var(--cream);
}
.time-tab {
	flex: 1;
	min-height: 38px;
	padding: 4px 6px;
	border: 0;
	border-radius: 999px;
	background: none;
	color: var(--olive-900);
	font: 600 .92rem/1.1 var(--body);
	cursor: pointer;
}
.time-tab:hover {
	background: var(--oak);
}
.time-tab[aria-selected="true"] {
	background: var(--btn);
	color: #fff;
}
.time-tab:disabled {
	color: #BFC2B6;
	background: none;
	cursor: default;
}
.time-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
}
.time-slot {
	min-height: 42px;
	padding: 0 2px;
	border: 1.5px solid #D5D9CB;
	border-radius: 6px;
	background: #fff;
	color: var(--ink);
	font: 600 .95rem/1 var(--body);
	white-space: nowrap;
	cursor: pointer;
}
.time-slot:hover {
	border-color: var(--btn);
	background: #F1F6E8;
}
.time-slot.is-selected,
.time-slot.is-selected:hover {
	border-color: var(--btn);
	background: var(--btn);
	color: #fff;
}
.time-empty {
	margin: 4px 2px 8px;
	color: var(--muted);
	font-size: .95rem;
}
/* The time box sits in the right-hand column, so its list lines up with the box's right edge */
.timepanel {
	left: auto;
	right: 0;
}
@media (max-width: 380px) {
	.time-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	.calendar,
	.timepanel {
		min-width: 0;
	}
}

/* Number of guests: tiles like the time slots, "15+" opens a stepper */
.guest-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 6px;
}
.guest-slot {
	min-height: 46px;
	font-size: 1rem;
}
.guest-picker:focus {
	outline: none;
}
.guest-more {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 8px;
	padding: 8px 8px 8px 14px;
	border-radius: 6px;
	background: #F1F6E8;
	font-weight: 600;
}
.guest-more[hidden] {
	display: none;
}
.stepper {
	display: flex;
	align-items: center;
	gap: 4px;
}
.step-value {
	width: 4.5em;
	min-height: 42px;
	padding: 4px 6px;
	font-size: 1.2rem;
	font-weight: 600;
	text-align: center;
	-moz-appearance: textfield;
}
.step-value::-webkit-inner-spin-button,
.step-value::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.step {
	width: 42px;
	height: 42px;
	border: 1.5px solid var(--btn);
	border-radius: 50%;
	background: #fff;
	color: var(--btn);
	font: 600 1.3rem/1 var(--body);
	cursor: pointer;
}
.step:hover:not(:disabled) {
	background: var(--btn);
	color: #fff;
}
.step:disabled {
	border-color: #D5D9CB;
	color: #A9AE9C;
	cursor: default;
}

/* Two or three big tappable choices: catering pickup / delivery, the booking restaurant */
.choice {
	display: flex;
	gap: 10px;
}
.choice label {
	flex: 1;
	display: flex;
	align-items: center;
	gap: .5em;
	min-height: 48px;
	margin: 0;
	padding: 10px 14px;
	border: 1.5px solid #A9AE9C;
	border-radius: 4px;
	background: #fff;
	font-weight: 500;
	font-size: 1rem;
	cursor: pointer;
}
.choice input {
	width: 18px;
	min-height: 0;
	height: 18px;
	margin: 0;
	accent-color: var(--olive-900);
}
.choice label:has(input:checked) {
	border-color: var(--olive-900);
	box-shadow: 0 0 0 1px var(--olive-900);
	background: #F4F1E1;
}
.choice label:has(input:focus-visible) {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
}

.store-choice label {
	align-items: flex-start;
	padding: 12px 14px;
}
.store-choice input {
	flex: 0 0 auto;
	margin-top: 3px;
}
.store-choice span {
	display: grid;
}
/* Contact: one row per choice, as three cards side by side are too narrow for the addresses */
.contact-choice {
	flex-direction: column;
	gap: 8px;
}
.contact-choice span {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 .6em;
}
.store-choice small {
	color: var(--muted);
	font-size: .85rem;
}
.has-error .choice label {
	color: var(--ink);
}
.choice:focus {
	outline: none;
}

/* "Booking received!" / "Thank you!" after sending: a filled green panel that can't be missed */
.success-panel {
	padding: clamp(24px, 4vw, 40px);
	border-radius: 12px;
	background: var(--btn);
	color: #fff;
	box-shadow: 0 14px 34px rgba(38, 48, 26, .22);
	scroll-margin-top: 110px;
}
.success-panel:focus {
	outline: none;
}
.success-icon {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: #fff;
	color: var(--btn);
}
.success-panel h2 {
	margin: 0 0 .35em;
	color: #fff;
	font-size: clamp(1.7rem, 3.2vw, 2.3rem);
}
.success-panel p {
	color: #fff;
	font-size: 1.08rem;
}
.success-panel .small {
	color: rgba(255, 255, 255, .85);
	font-size: .95rem;
}
.success-panel a:not(.btn) {
	color: #fff;
	font-weight: 600;
}
.success-panel p:last-child {
	margin-bottom: 0;
}
.success-panel .btn-primary,
.success-panel .btn-primary:hover {
	border-color: #fff;
	background: #fff;
	color: var(--olive-900);
}
/* The booking at a glance, inside the panel */
.sent-summary {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: baseline;
	gap: 10px 24px;
	margin: 20px 0;
	padding: 16px 18px;
	border-radius: 8px;
	background: rgba(255, 255, 255, .14);
}
.sent-summary dt {
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .8);
}
.sent-summary dd {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
}

/* Booking policy on book.html: rules for both restaurants, then a box per restaurant (the chosen one stands out) */
.policy-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: clamp(20px, 3vw, 40px);
	margin-bottom: clamp(28px, 4vw, 44px);
}
.policy-stores {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(16px, 2.5vw, 28px);
}
@media (max-width: 860px) {
	.policy-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.policy-stores {
		grid-template-columns: minmax(0, 1fr);
	}
}
@media (max-width: 560px) {
	.policy-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
.policy-store {
	padding: clamp(20px, 3vw, 28px);
	border: 1.5px solid var(--oak-line);
	border-top: 4px solid var(--oak-line);
	border-radius: 8px;
	background: #fff;
	transition: border-color .2s, box-shadow .2s;
}
.policy-store h3 {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0 0 4px;
}
.policy-store .policy li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}
.policy-yours {
	display: none;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--btn);
	color: #fff;
	font: 600 .75rem/1.4 var(--body);
	letter-spacing: .04em;
	text-transform: uppercase;
}
.policy-store.is-chosen {
	border-color: var(--btn);
	box-shadow: 0 8px 24px rgba(38, 48, 26, .12);
}
.policy-store.is-chosen .policy-yours {
	display: inline-block;
}

/* Book a table: each restaurant's group size and phone number, under the page heading */
.book-stores {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 32px;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 1.05rem;
}
.book-stores li {
	display: flex;
	flex-wrap: wrap;
	gap: 0 .6em;
	align-items: baseline;
}
.book-stores span {
	color: var(--muted);
}
.book-stores span::after {
	content: " \00b7";
}
.book-stores a {
	font-weight: 600;
	color: var(--accent);
}

/* "We've filled in your details from last time" (booking) and "We kept your selections" (catering),
   remembered in this browser by /js/forms.js and /js/catering.js */
.kept-note {
	margin: 0 0 12px;
	padding: 12px 16px;
	background: #fff4c2;
	border: 1px solid #f0d35c;
	border-left: 5px solid #e8b923;
	border-radius: 6px;
	font-size: .95rem;
	color: var(--ink);
}
.linkbtn {
	padding: 0;
	border: 0;
	background: none;
	color: var(--accent);
	font: 600 1em var(--body);
	text-decoration: underline;
	cursor: pointer;
}
.linkbtn:hover {
	color: var(--accent-dark);
}

/* Logged in on the booking page: whose account it's booked under (green, not the yellow "from last time" note),
   and the account's details locked (js/forms.js) */
.account-note {
	background: #F2F6EA;
	border-color: #C9DAAE;
	border-left-color: var(--btn);
}
.account-note p {
	margin: 0;
}
.account-note p + p {
	margin-top: 6px;
}
.account-note a {
	font-weight: 600;
	color: var(--accent);
}
.cater-form input[readonly],
form input[readonly] {
	background: #F4F2EA;
	border-color: #E4E0D2;
	color: var(--ink);
	cursor: default;
}
/* "There's already a Jasmin 1 account for this email" on the booking page */
.account-needed p {
	margin: 0 0 10px;
}
.account-needed .account-needed-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.account-needed p:last-child {
	margin-bottom: 0;
}
