/* ==========================================================================
   Reservation — "Book A Table": patterned left half with a gold-hairline box
   (heading + booking form), full-bleed photo on the right half.
   Shared form class names (.sv-field, .sv-field__error, .sv-form__status, .sv-hp)
   are kept for main.js / reservations.php and re-styled here with higher specificity.
   ========================================================================== */

.sv-reservation.sv-section {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: 800px;
	padding: 0;
	background-color: var(--sv-bg);
	scroll-margin-top: var(--sv-header-h, 80px);
}

/* ---------- Left half ---------- */
/* Reference: the gold box sits 15px inside the half, with 75px of inner padding (584px content) */
.sv-reservation__panel {
	display: flex;
	align-items: stretch;
	justify-content: center;
	padding: 15px;
}
.sv-reservation__box {
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 100%;
	padding: 75px 76px;
	border: 1px solid var(--sv-accent);
	text-align: center;
}
.sv-reservation .sv-heading { margin-bottom: 20px; }
.sv-reservation__intro { margin: 0 0 36px; font-size: 16px; line-height: 1.8; color: var(--sv-heading); }
.sv-reservation__intro .sv-accent { color: var(--sv-accent); font-style: normal; }
.sv-reservation__intro a:hover { color: var(--sv-heading); }

/* ---------- Form ---------- */
.sv-reservation__form { position: relative; text-align: left; }
.sv-reservation__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.sv-reservation .sv-field { position: relative; display: flex; flex-direction: column; gap: 6px; margin: 0; }
.sv-reservation .sv-field--full { grid-column: 1 / -1; }

.sv-reservation .sv-field input,
.sv-reservation .sv-field select,
.sv-reservation .sv-field textarea {
	display: block;
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 0 20px;
	background: transparent;
	border: 1px solid var(--sv-line);
	border-radius: 5px;
	color: var(--sv-heading);
	font-family: var(--sv-body-font);
	font-size: 16px;
	line-height: 1.5;
	outline: 0;
	box-shadow: none;
	transition: border-color .3s;
	color-scheme: dark;
	-webkit-appearance: none;
	appearance: none;
}
.sv-reservation .sv-field textarea {
	height: auto;
	min-height: 120px;
	padding: 12px 20px;
	line-height: 1.6;
	resize: vertical;
}
.sv-reservation .sv-field select { padding-right: 46px; cursor: pointer; }
.sv-reservation .sv-field select option { background: var(--sv-surface-2); color: var(--sv-text); }
.sv-reservation .sv-field--select::after {
	content: "\f078";
	position: absolute;
	right: 20px;
	top: 0;
	height: 50px;
	line-height: 50px;
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	font-size: 11px;
	color: var(--sv-accent);
	pointer-events: none;
}
.sv-reservation .sv-field input::placeholder,
.sv-reservation .sv-field textarea::placeholder { color: var(--sv-text); opacity: .5; }
/* Empty required select / date read as a placeholder until a value is chosen */
.sv-reservation .sv-field select:invalid,
.sv-reservation .sv-field input[type=date]:invalid { color: rgba(229, 235, 239, .5); }
.sv-reservation .sv-field input::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }

.sv-reservation .sv-field input:focus,
.sv-reservation .sv-field select:focus,
.sv-reservation .sv-field textarea:focus { border-color: var(--sv-accent); }
.sv-reservation .sv-field.has-error input,
.sv-reservation .sv-field.has-error select,
.sv-reservation .sv-field.has-error textarea { border-color: #d9534f; }
.sv-reservation .sv-field__error { display: block; font-size: 12px; line-height: 1.4; color: #e8766f; }
.sv-reservation .sv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- Themed select & date picker (reservation.js) ---------- */
/* The native controls stay for validation/submission but no longer take space or focus. */
.sv-reservation .sv-field.is-enhanced::after { display: none; }
.sv-reservation .sv-field .sv-select__native,
.sv-reservation .sv-field .sv-date__native { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; opacity: 0; overflow: hidden; pointer-events: none; }
.sv-reservation .sv-select,
.sv-reservation .sv-date { position: relative; }
.sv-reservation .sv-select__toggle,
.sv-reservation .sv-date__toggle {
	display: flex;
	align-items: center;
	width: 100%;
	height: 50px;
	padding: 0 46px 0 20px;
	background: transparent;
	border: 1px solid var(--sv-line);
	border-radius: 5px;
	color: var(--sv-heading);
	font-family: var(--sv-body-font);
	font-size: 16px;
	text-align: left;
	cursor: pointer;
	transition: border-color .3s;
	-webkit-appearance: none;
	appearance: none;
}
.sv-reservation .sv-select__toggle.is-placeholder,
.sv-reservation .sv-date__toggle.is-placeholder { color: rgba(229, 235, 239, .5); }
.sv-reservation .sv-select__toggle:hover,
.sv-reservation .sv-date__toggle:hover,
.sv-reservation .sv-select__toggle:focus-visible,
.sv-reservation .sv-date__toggle:focus-visible,
.sv-reservation .is-open > .sv-select__toggle,
.sv-reservation .is-open > .sv-date__toggle { border-color: var(--sv-accent); outline: 0; }
.sv-reservation .sv-field.has-error .sv-select__toggle,
.sv-reservation .sv-field.has-error .sv-date__toggle { border-color: #d9534f; }
.sv-reservation .sv-select__label,
.sv-reservation .sv-date__label { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sv-reservation .sv-select__toggle::after,
.sv-reservation .sv-date__toggle::after {
	content: "\f078";
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	font-size: 11px;
	color: var(--sv-accent);
	transition: transform .3s;
}
.sv-reservation .is-open > .sv-select__toggle::after { transform: translateY(-50%) rotate(180deg); }
.sv-reservation .sv-date__toggle::after { content: "\f073"; font-size: 14px; }

/* Floating panels */
.sv-reservation .sv-select__menu,
.sv-reservation .sv-date__pop {
	position: absolute;
	z-index: 30;
	left: 0;
	top: calc(100% + 8px);
	margin: 0;
	background: var(--sv-surface);
	border: 1px solid var(--sv-line);
	border-radius: 5px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .25s, transform .25s, visibility .25s;
}
.sv-reservation .is-open > .sv-select__menu,
.sv-reservation .is-open > .sv-date__pop { opacity: 1; visibility: visible; transform: none; }
.sv-reservation .is-up > .sv-select__menu,
.sv-reservation .is-up > .sv-date__pop { top: auto; bottom: calc(100% + 8px); transform: translateY(-8px); }
.sv-reservation .is-up.is-open > .sv-select__menu,
.sv-reservation .is-up.is-open > .sv-date__pop { transform: none; }

.sv-reservation .sv-select__menu {
	right: 0;
	max-height: 264px;
	padding: 8px 0;
	list-style: none;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--sv-line) transparent;
}
.sv-reservation .sv-select__option {
	padding: 0 20px;
	height: 44px;
	line-height: 44px;
	font-size: 15px;
	color: var(--sv-text);
	cursor: pointer;
	outline: 0;
	transition: background .2s, color .2s;
}
.sv-reservation .sv-select__option:hover,
.sv-reservation .sv-select__option:focus { background: rgba(230, 177, 95, .12); color: var(--sv-heading); }
.sv-reservation .sv-select__option[aria-selected="true"] { color: var(--sv-accent); }
.sv-reservation .sv-select__option[aria-selected="true"]::after {
	content: "\f00c";
	float: right;
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	font-size: 11px;
}

/* Calendar */
.sv-reservation .sv-date__pop { width: 320px; max-width: calc(100vw - 48px); padding: 18px; }
.sv-reservation .sv-date__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sv-reservation .sv-date__title { font-family: var(--sv-heading-font); font-size: 22px; font-weight: 300; color: var(--sv-heading); }
.sv-reservation .sv-date__nav {
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid var(--sv-line);
	border-radius: 50%;
	background: transparent;
	color: var(--sv-accent);
	cursor: pointer;
	transition: border-color .3s, background .3s, color .3s;
}
.sv-reservation .sv-date__nav::before { content: "\f053"; font-family: "Font Awesome 5 Free"; font-weight: 900; font-size: 11px; }
.sv-reservation .sv-date__nav--next::before { content: "\f054"; }
.sv-reservation .sv-date__nav:hover { background: var(--sv-accent); border-color: var(--sv-accent); color: var(--sv-bg); }
.sv-reservation .sv-date__nav[disabled] { opacity: .3; pointer-events: none; }
.sv-reservation .sv-date__week,
.sv-reservation .sv-date__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.sv-reservation .sv-date__week { margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-align: center; color: var(--sv-accent); }
.sv-reservation .sv-date__day {
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--sv-text);
	font-family: var(--sv-body-font);
	font-size: 14px;
	cursor: pointer;
	transition: background .2s, color .2s;
}
.sv-reservation .sv-date__day:hover,
.sv-reservation .sv-date__day:focus-visible { background: rgba(230, 177, 95, .15); color: var(--sv-heading); outline: 0; }
.sv-reservation .sv-date__day.is-today { box-shadow: inset 0 0 0 1px var(--sv-line); }
.sv-reservation .sv-date__day.is-selected { background: var(--sv-accent); color: var(--sv-bg); font-weight: 600; }
.sv-reservation .sv-date__day.is-outside { visibility: hidden; }
.sv-reservation .sv-date__day[disabled] { opacity: .3; cursor: default; background: transparent; }
.sv-reservation .no-motion .sv-date__pop,
.sv-reservation .no-motion .sv-select__menu { transition: none; }

.sv-reservation__actions { text-align: center; }
.sv-reservation__submit {
	cursor: pointer;
	border-radius: 0;
	-webkit-appearance: none;
	appearance: none;
}
.sv-reservation__submit[disabled] { opacity: .6; pointer-events: none; }

.sv-reservation .sv-form__status { margin: 16px 0 0; min-height: 1.5em; font-size: 15px; text-align: center; }
.sv-reservation .sv-form__status.is-success { color: var(--sv-accent); font-family: var(--sv-heading-font); font-size: 22px; line-height: 1.4; }
.sv-reservation .sv-form__status.is-error { color: #e8766f; }

/* ---------- Right half ---------- */
.sv-reservation__media { position: relative; overflow: hidden; min-height: 100%; background: var(--sv-surface-2); }
img.sv-reservation__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	object-position: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
	.sv-reservation__panel { padding: 15px; }
	.sv-reservation__box { padding: 50px 30px; }
}
@media (max-width: 991px) {
	.sv-reservation.sv-section { grid-template-columns: 1fr; min-height: 0; }
	.sv-reservation__media { height: 420px; min-height: 0; }
}
@media (max-width: 767px) {
	.sv-reservation__panel { padding: 15px; }
	.sv-reservation__box { padding: 40px 20px; }
	.sv-reservation__grid { grid-template-columns: 1fr; }
	.sv-reservation__submit { width: 100%; justify-content: center; }
}
