/*
 * RB Dining — Frontend Stylesheet
 * Aureate Reserve design system (Playfair Display / Inter)
 *
 * ALL colours come from CSS variables set by Settings::inject_css_variables().
 * Zero hardcoded hex values below. Zero !important.
 *
 * Structure:
 *   0. Reset / base
 *   1. CSS variable fallbacks (used before WP renders the :root block)
 *   2. Layout (grid, sidebar, progress bar)
 *   3. Step containers
 *   4. Step 1 — Guests
 *   5. Step 2 — Date / Calendar
 *   6. Step 3 — Time Slots
 *   7. Step 4 — Details
 *   8. Step 5 — Summary
 *   9. Step 6 — Payment
 *  10. Step 7 — Confirmed
 *  11. Sidebar
 *  12. Shared components (buttons, inputs, badges, spinner, notice)
 *  13. Mobile nav
 *  14. Animations
 *  15. Responsive
 *  16. Reduced motion override
 */

/* ── 0. Reset ──────────────────────────────────────────────────────────────── */

.rb-booking-wrap *,
.rb-booking-wrap *::before,
.rb-booking-wrap *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

.rb-booking-wrap {
	font-family: var(--rb-body-font, 'Inter'), system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--rb-on-surface);
	background: var(--rb-background);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.rb-booking-wrap h1,
.rb-booking-wrap h2,
.rb-booking-wrap h3,
.rb-booking-wrap h4 {
	font-family: var(--rb-heading-font, 'Playfair Display'), Georgia, serif;
	font-weight: 500;
	line-height: 1.25;
	color: var(--rb-on-surface);
}

.rb-booking-wrap a {
	color: var(--rb-primary);
	text-decoration: none;
}
.rb-booking-wrap a:hover {
	text-decoration: underline;
}

/* ── 1. CSS variable fallbacks ─────────────────────────────────────────────── */
/* These are overridden by PHP's inject_css_variables(). */

.rb-booking-wrap {
	--rb-primary:            #775a19;
	--rb-primary-container:  #c5a059;
	--rb-on-primary:         #ffffff;
	--rb-background:         #fcf9f8;
	--rb-surface:            #fcf9f8;
	--rb-surface-low:        #f6f3f2;
	--rb-surface-container:  #f0eded;
	--rb-surface-card:       #ffffff;
	--rb-on-surface:         #1c1b1b;
	--rb-on-surface-variant: #4e4639;
	--rb-secondary:          #5e5e5b;
	--rb-outline:            #7f7667;
	--rb-outline-variant:    #d1c5b4;
	--rb-error:              #ba1a1a;
	--rb-success:            #2E7D32;
	--rb-warning:            #e65100;
	--rb-btn-bg:             #c5a059;
	--rb-btn-hover:          #775a19;
	--rb-btn-text:           #4e3700;
	--rb-btn-radius:         9999px;
	--rb-card-radius:        16px;
	--rb-heading-font:       'Playfair Display';
	--rb-body-font:          'Inter';

	/* Internal layout tokens */
	--rb-max-width:     1080px;
	--rb-sidebar-width: 340px;
	--rb-gap:           32px;
	--rb-step-pad:      40px;
	--rb-radius-sm:     8px;
	--rb-radius-md:     12px;
	--rb-transition:    0.2s ease;
	--rb-shadow-card:   0px 10px 30px rgba(26,26,26,0.05);
}

/* ── Divi / page builder compatibility ─────────────────────────────────── */
/* Divi applies overflow:hidden on .et_pb_row and .et_pb_section.
   This clips our sticky sidebar and can hide the payment step content.
   Scoped to our wrapper only — does not affect Divi's own layout. */
.rb-booking-wrap,
.rb-booking-wrap .rb-booking-grid,
.rb-booking-wrap .rb-booking-main,
.rb-booking-wrap .rb-steps {
	overflow: visible !important;
}

/* Divi forces max-width on inner row columns — override inside our wrap */
.rb-booking-wrap .rb-booking-grid > *,
.rb-booking-wrap .rb-booking-main,
.rb-booking-wrap .rb-sidebar {
	max-width: none !important;
	width: auto !important;
}

/* ── 2. Layout ─────────────────────────────────────────────────────────────── */

.rb-booking-wrap.rb-layout--boxed {
	max-width: var(--rb-max-width);
	margin: 0 auto;
	padding: 0 16px;
}

.rb-booking-grid {
	display: grid !important;             /* override Divi float/flex */
	grid-template-columns: 1fr var(--rb-sidebar-width);
	gap: var(--rb-gap);
	align-items: start;
	width: 100%;
	box-sizing: border-box;
	clear: both;                          /* clear Divi floats */
}

/* Ensure grid children aren't constrained by Divi column widths */
.rb-booking-grid > * {
	width: auto !important;
	float: none !important;
	padding: 0 !important;
}

.rb-booking-main {
	min-width: 0;
	position: relative; /* Prevents Divi overflow:hidden from collapsing the column */
	min-height: 200px;  /* Ensures the column always has visible height */
	z-index: 0;
}

/* ── Progress bar ─────────────────────────────────────────────────────────── */

.rb-progress {
	margin-bottom: 28px;
}

/* Line style */
.rb-progress__bar {
	height: 2px;
	background: var(--rb-outline-variant);
	border-radius: 9999px;
	overflow: hidden;
	position: sticky;
	top: 0;
	z-index: 50;
}

.rb-progress__fill {
	height: 100%;
	background: var(--rb-primary);
	border-radius: 9999px;
	transition: width 0.4s ease;
}

/* Numbered / icon style */
.rb-progress__steps {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
}

.rb-progress__step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	flex: 1;
	position: relative;
}

.rb-progress__step::before {
	content: '';
	position: absolute;
	top: 16px;
	left: calc(50% + 16px);
	right: calc(-50% + 16px);
	height: 2px;
	background: var(--rb-outline-variant);
}
.rb-progress__step:last-child::before { display: none; }

.rb-progress__step.is-completed .rb-progress__step-circle,
.rb-progress__step.is-active    .rb-progress__step-circle {
	background: var(--rb-primary);
	color: var(--rb-on-primary);
	border-color: var(--rb-primary);
}

.rb-progress__step-circle {
	width: 32px;
	height: 32px;
	border-radius: 9999px;
	border: 2px solid var(--rb-outline-variant);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 600;
	color: var(--rb-secondary);
	background: var(--rb-surface-card);
	transition: background var(--rb-transition), border-color var(--rb-transition), color var(--rb-transition);
	position: relative;
	z-index: 1;
}

.rb-progress__step-circle .material-symbols-outlined {
	font-size: 16px;
}

.rb-progress__step-label {
	font-size: 11px;
	font-weight: 500;
	color: var(--rb-secondary);
	text-align: center;
	white-space: nowrap;
}

.rb-progress__step.is-active .rb-progress__step-label {
	color: var(--rb-primary);
	font-weight: 600;
}

/* ── 3. Step containers ────────────────────────────────────────────────────── */

.rb-steps {
	position: relative;
}

.rb-step {
	display: none;
	animation: rb-step-in 0.3s ease forwards;
}

.rb-step--active {
	display: block;
	min-height: 100px;
}

.rb-step--exit {
	animation: rb-step-out 0.2s ease forwards;
}

.rb-step-inner {
	background: var(--rb-surface-card);
	border-radius: var(--rb-card-radius);
	padding: var(--rb-step-pad);
	box-shadow: var(--rb-shadow-card);
}

.rb-step-inner--confirmed {
	text-align: center;
}

.rb-step-header {
	margin-bottom: 28px;
}

.rb-step-title {
	font-size: 26px;
	font-weight: 500;
	margin-bottom: 6px;
}

.rb-step-subtitle {
	color: var(--rb-on-surface-variant);
	font-size: 15px;
}

.rb-step-footer {
	display: flex;
	gap: 12px;
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--rb-outline-variant);
}

/* ── 4. Step 1 — Guests ────────────────────────────────────────────────────── */

.rb-service-grid {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 8px;
}

.rb-service-option {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px;
	border: 1.5px solid var(--rb-outline-variant);
	border-radius: var(--rb-radius-md);
	cursor: pointer;
	transition: border-color var(--rb-transition), background var(--rb-transition);
}

.rb-service-option:hover {
	border-color: var(--rb-primary-container);
	background: var(--rb-surface-low);
}

.rb-service-option input[type="radio"] {
	margin-top: 2px;
	accent-color: var(--rb-primary);
}

.rb-service-option:has(input:checked) {
	border-color: var(--rb-primary);
	background: var(--rb-surface-container);
}

.rb-service-option__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.rb-service-option__name {
	font-size: 15px;
	font-weight: 600;
	color: var(--rb-on-surface);
}

.rb-service-option__desc,
.rb-service-option__time {
	font-size: 13px;
	color: var(--rb-on-surface-variant);
}

/* Guest steppers */
.rb-guest-steppers {
	display: flex;
	flex-direction: column;
	gap: 0;
	border: 1.5px solid var(--rb-outline-variant);
	border-radius: var(--rb-radius-md);
	overflow: hidden;
	margin-top: 8px;
}

.rb-stepper-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--rb-outline-variant);
}
.rb-stepper-row:last-child { border-bottom: none; }

.rb-stepper-row__label {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.rb-stepper-row__name {
	font-size: 15px;
	font-weight: 500;
	color: var(--rb-on-surface);
}

.rb-stepper-row__sub {
	font-size: 12px;
	color: var(--rb-on-surface-variant);
}

.rb-stepper {
	display: flex;
	align-items: center;
	gap: 4px;
}

.rb-stepper__btn {
	width: 36px;
	height: 36px;
	border-radius: 9999px;
	border: 1.5px solid var(--rb-outline-variant);
	background: var(--rb-surface-card);
	color: var(--rb-on-surface);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all var(--rb-transition);
	user-select: none;
}

.rb-stepper__btn:hover:not(:disabled) {
	border-color: var(--rb-primary);
	color: var(--rb-primary);
}

.rb-stepper__btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.rb-stepper__value {
	width: 44px;
	text-align: center;
	font-size: 18px;
	font-weight: 600;
	font-family: var(--rb-body-font);
	color: var(--rb-on-surface);
	border: none;
	background: transparent;
	appearance: none;
	-moz-appearance: textfield;
}
.rb-stepper__value::-webkit-inner-spin-button,
.rb-stepper__value::-webkit-outer-spin-button { display: none; }

/* Deposit preview */
.rb-deposit-preview {
	background: var(--rb-surface-low);
	border-radius: var(--rb-radius-sm);
	padding: 14px 16px;
	margin-top: 20px;
}

.rb-deposit-preview__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
}

.rb-deposit-preview__label {
	font-size: 14px;
	color: var(--rb-on-surface-variant);
}

.rb-deposit-preview__amount {
	font-weight: 700;
	font-size: 18px;
	color: var(--rb-on-surface);
}

.rb-deposit-preview__sub {
	font-size: 12px;
	font-weight: 400;
	color: var(--rb-on-surface-variant);
	margin-left: 4px;
}

.rb-deposit-preview__gst {
	font-size: 12px;
	color: var(--rb-on-surface-variant);
	margin-top: 4px;
	text-align: right;
}

/* Large party notice */
.rb-large-party {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 10px 14px;
	background: var(--rb-surface-low);
	border-radius: var(--rb-radius-sm);
	font-size: 13px;
	color: var(--rb-on-surface-variant);
	margin-top: 12px;
}
.rb-large-party .material-symbols-outlined { font-size: 16px; flex-shrink: 0; }

/* ── 5. Step 2 — Calendar ──────────────────────────────────────────────────── */

.rb-calendar {
	margin-top: 8px;
	user-select: none;
}

.rb-calendar__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.rb-calendar__month-year {
	font-family: var(--rb-heading-font);
	font-size: 18px;
	font-weight: 500;
	color: var(--rb-on-surface);
}

.rb-calendar__nav {
	width: 36px;
	height: 36px;
	border-radius: 9999px;
	border: 1.5px solid var(--rb-outline-variant);
	background: var(--rb-surface-card);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all var(--rb-transition);
	color: var(--rb-on-surface-variant);
}
.rb-calendar__nav:hover { border-color: var(--rb-primary); color: var(--rb-primary); }
.rb-calendar__nav:disabled { opacity: 0.3; cursor: not-allowed; }

.rb-calendar__weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	margin-bottom: 6px;
}

.rb-calendar__weekday {
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--rb-on-surface-variant);
	padding: 6px 0;
}

.rb-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

/* Calendar day button — rendered by JS */
.rb-cal-day {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 9999px;
	font-size: 14px;
	font-weight: 400;
	cursor: pointer;
	border: none;
	background: transparent;
	color: var(--rb-on-surface);
	transition: background var(--rb-transition), color var(--rb-transition);
	position: relative;
}

.rb-cal-day:hover:not(.rb-cal-day--unavailable):not(.rb-cal-day--empty) {
	background: var(--rb-surface-container);
}

.rb-cal-day--available:hover {
	background: var(--rb-surface-container);
}

.rb-cal-day--selected {
	background: var(--rb-primary);
	color: var(--rb-on-primary);
	font-weight: 600;
}

.rb-cal-day--today {
	font-weight: 700;
	text-decoration: underline;
}

.rb-cal-day--unavailable,
.rb-cal-day--full,
.rb-cal-day--closed,
.rb-cal-day--holiday {
	color: var(--rb-outline-variant);
	cursor: not-allowed;
	text-decoration: line-through;
}

.rb-cal-day--empty {
	cursor: default;
}

/* Availability indicator dot */
.rb-cal-day--available::after {
	content: '';
	position: absolute;
	bottom: 3px;
	left: 50%;
	transform: translateX(-50%);
	width: 4px;
	height: 4px;
	border-radius: 9999px;
	background: var(--rb-success);
}

.rb-cal-day--selected::after {
	display: none;
}

/* Legend */
.rb-calendar__legend {
	display: flex;
	gap: 16px;
	margin-top: 16px;
	flex-wrap: wrap;
}

.rb-legend-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--rb-on-surface-variant);
}

.rb-legend-dot {
	width: 10px;
	height: 10px;
	border-radius: 9999px;
}
.rb-legend-dot--available  { background: var(--rb-success); }
.rb-legend-dot--full       { background: var(--rb-outline-variant); }
.rb-legend-dot--closed     { background: var(--rb-surface-container); border: 1px solid var(--rb-outline-variant); }

/* Calendar loading */
.rb-calendar__loading {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 40px 0;
	color: var(--rb-on-surface-variant);
	font-size: 14px;
}

/* ── 6. Step 3 — Time Slots ─────────────────────────────────────────────────── */

.rb-slots-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 10px;
	margin-top: 8px;
}

/* Individual slot pill — rendered by JS */
.rb-slot {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 12px 10px;
	border-radius: 9999px;
	border: 1.5px solid var(--rb-outline-variant);
	background: var(--rb-surface-card);
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	color: var(--rb-on-surface);
	transition: all var(--rb-transition);
	text-align: center;
	line-height: 1.2;
	position: relative;
}

.rb-slot:hover:not(.rb-slot--full):not(.rb-slot--cutoff):not(.rb-slot--holiday) {
	border-color: var(--rb-primary);
	color: var(--rb-primary);
	background: var(--rb-surface-low);
}

.rb-slot--selected {
	background: var(--rb-primary);
	border-color: var(--rb-primary);
	color: var(--rb-on-primary);
}

.rb-slot--almost-full {
	border-color: var(--rb-warning);
}

.rb-slot--almost-full .rb-slot__badge {
	color: var(--rb-warning);
}

.rb-slot--full,
.rb-slot--cutoff,
.rb-slot--holiday {
	opacity: 0.45;
	cursor: not-allowed;
	text-decoration: line-through;
}

.rb-slot__time {
	display: block;
	font-size: 14px;
}

.rb-slot__badge {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--rb-on-surface-variant);
	margin-top: 2px;
}

.rb-slot--mini {
	padding: 4px 10px;
	font-size: 12px;
	pointer-events: none;
}

/* Loading / empty states */
.rb-slots-loading {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 40px 0;
	color: var(--rb-on-surface-variant);
	font-size: 14px;
}

.rb-slots-empty {
	text-align: center;
	padding: 40px 20px;
}
.rb-slots-empty__icon { font-size: 48px; color: var(--rb-outline-variant); display: block; }
.rb-slots-empty__msg  { color: var(--rb-on-surface-variant); margin-top: 8px; }

/* Slots legend */
.rb-slots-legend {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--rb-outline-variant);
}

/* Call widget */
.rb-call-widget {
	margin-top: 20px;
}
.rb-call-widget__msg {
	color: var(--rb-on-surface-variant);
	font-size: 14px;
	margin-bottom: 12px;
}

/* Next-slot suggestion */
.rb-next-slot-suggestion {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	background: var(--rb-surface-low);
	border-radius: var(--rb-radius-sm);
	font-size: 14px;
	color: var(--rb-on-surface-variant);
	margin-top: 16px;
}
.rb-next-slot-suggestion .material-symbols-outlined { color: var(--rb-primary); }

/* ── 7. Step 4 — Details ────────────────────────────────────────────────────── */

.rb-details-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.rb-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.rb-field-row--2col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.rb-field__label {
	font-size: 13px;
	font-weight: 600;
	color: var(--rb-on-surface);
	letter-spacing: 0.01em;
}

.rb-field__hint {
	font-size: 12px;
	color: var(--rb-on-surface-variant);
}

.rb-field__error {
	font-size: 12px;
	color: var(--rb-error);
	min-height: 16px;
}

.rb-required { color: var(--rb-error); margin-left: 2px; }
.rb-optional  { color: var(--rb-on-surface-variant); font-weight: 400; margin-left: 4px; }

.rb-input {
	width: 100%;
	box-sizing: border-box;
	padding: 0 18px;             /* horizontal only — vertical centering via line-height */
	line-height: 52px;           /* vertically centers placeholder and typed text */
	height: 52px;
	border: 1.5px solid var(--rb-outline-variant);
	border-radius: var(--rb-radius-sm);
	background: var(--rb-surface-card);
	color: var(--rb-on-surface);
	font-family: var(--rb-body-font, inherit);
	font-size: 15px;
	transition: border-color var(--rb-transition), box-shadow var(--rb-transition);
	appearance: none;
	-webkit-appearance: none;
	vertical-align: middle;
}

/* Textarea: restore padding-based spacing (line-height trick breaks multi-line) */
textarea.rb-input {
	height: auto;
	min-height: 96px;
	line-height: 1.5;
	padding: 14px 18px;
}

/* Select: needs padding because line-height trick unreliable across browsers */
select.rb-input {
	height: 52px;
	line-height: 52px;
	padding: 0 18px;
}

/* Pill-shaped inputs */
.rb-booking-wrap[data-input-style="pill"] .rb-input {
	border-radius: 26px;
	padding-left: 22px;
	padding-right: 22px;
}

/* Square inputs */
.rb-booking-wrap[data-input-style="square"] .rb-input {
	border-radius: 2px;
}

.rb-input:focus {
	outline: none;
	border-color: var(--rb-primary);
	box-shadow: 0 0 0 3px rgba(119,90,25,0.12);
}

.rb-input.rb-input--error {
	border-color: var(--rb-error);
}

.rb-textarea {
	resize: vertical;
	min-height: 88px;
}

.rb-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
	color: var(--rb-on-surface);
}
.rb-checkbox-label input[type="checkbox"] {
	margin-top: 2px;
	accent-color: var(--rb-primary);
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* ── 8. Step 5 — Summary ────────────────────────────────────────────────────── */

.rb-summary-card {
	border: 1.5px solid var(--rb-outline-variant);
	border-radius: var(--rb-card-radius);
	overflow: hidden;
}

.rb-summary-section {
	padding: 20px 24px;
}

.rb-summary-section__title {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--rb-on-surface-variant);
	margin-bottom: 12px;
	font-family: var(--rb-body-font);
}

.rb-summary-section--payment {
	background: var(--rb-surface-low);
}

.rb-summary-divider {
	height: 1px;
	background: var(--rb-outline-variant);
}

.rb-summary-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.rb-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	font-size: 14px;
}

.rb-summary-row__label {
	color: var(--rb-on-surface-variant);
	font-weight: 400;
}

.rb-summary-row__value {
	color: var(--rb-on-surface);
	font-weight: 500;
	text-align: right;
}

.rb-summary-row--total .rb-summary-row__label { font-weight: 600; color: var(--rb-on-surface); font-size: 15px; }
.rb-summary-row--total .rb-summary-row__value--price { font-size: 20px; font-weight: 700; color: var(--rb-primary); }
.rb-summary-row--gst .rb-summary-row__label,
.rb-summary-row--gst .rb-summary-row__value { font-size: 12px; color: var(--rb-on-surface-variant); }

.rb-btn-edit-details {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	color: var(--rb-primary);
	margin-top: 10px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
}
.rb-btn-edit-details .material-symbols-outlined { font-size: 14px; }

/* Cancellation policy */
.rb-cancellation-policy {
	border-radius: var(--rb-radius-sm);
	padding: 16px 18px;
	margin-top: 20px;
}

.rb-cancellation-policy__title {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 700;
	font-family: var(--rb-body-font);
	color: var(--rb-on-surface);
	margin-bottom: 8px;
}
.rb-cancellation-policy__title .material-symbols-outlined { font-size: 16px; }

.rb-cancellation-policy__text {
	font-size: 13px;
	color: var(--rb-on-surface-variant);
	margin-bottom: 14px;
}

.rb-cancellation-policy__checkbox {
	margin-top: 4px;
}

/* ── 9. Step 6 — Payment ────────────────────────────────────────────────────── */

.rb-payment-summary {
	background: var(--rb-surface-low);
	border-radius: var(--rb-radius-md);
	padding: 16px 20px;
	margin-bottom: 24px;
}

.rb-payment-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 14px;
	color: var(--rb-on-surface);
}

.rb-payment-summary__row--sub {
	margin-top: 4px;
	color: var(--rb-on-surface-variant);
	font-size: 13px;
}

.rb-payment-summary__amount {
	font-size: 20px;
	font-weight: 700;
	color: var(--rb-primary);
}

.rb-hold-notice {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	background: var(--rb-surface-container);
	border-radius: var(--rb-radius-sm);
	font-size: 13px;
	color: var(--rb-on-surface-variant);
	margin-bottom: 24px;
}
.rb-hold-notice .material-symbols-outlined { font-size: 18px; color: var(--rb-warning); }

.rb-hold-countdown {
	margin-left: auto;
	font-weight: 700;
	color: var(--rb-warning);
}

/* Payment step visibility guard — ensures step content is always visible */
.rb-step[data-step="payment"].rb-step--active {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}
.rb-step[data-step="payment"].rb-step--active .rb-step-inner {
	display: block !important;
	visibility: visible !important;
	min-height: 200px;
}

/* Stripe card element */
.rb-stripe-card-element {
	padding: 12px 14px;
	border: 1.5px solid var(--rb-outline-variant);
	border-radius: var(--rb-radius-sm);
	background: var(--rb-surface-card);
	transition: border-color var(--rb-transition), box-shadow var(--rb-transition);
}

.rb-stripe-card-element.StripeElement--focus {
	border-color: var(--rb-primary);
	box-shadow: 0 0 0 3px rgba(119,90,25,0.12);
}

.rb-stripe-card-element.StripeElement--invalid {
	border-color: var(--rb-error);
}

/* Trust badges */
.rb-payment-trust {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	margin-top: 16px;
}

.rb-payment-trust__item {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: var(--rb-on-surface-variant);
}
.rb-payment-trust__item .material-symbols-outlined { font-size: 15px; }

/* ── 10. Step 7 — Confirmed ─────────────────────────────────────────────────── */

.rb-confirmed-icon {
	margin-bottom: 24px;
}

.rb-confirmed-icon__circle {
	width: 72px;
	height: 72px;
	border-radius: 9999px;
	background: var(--rb-surface-low);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
	animation: rb-pop-in 0.5s ease both;
}

.rb-confirmed-icon__circle .material-symbols-outlined {
	font-size: 40px;
	color: var(--rb-success);
}

.rb-confirmed-header {
	margin-bottom: 20px;
}

.rb-confirmed-title {
	font-size: 28px;
	margin-bottom: 8px;
}

.rb-confirmed-subtitle {
	color: var(--rb-on-surface-variant);
	font-size: 15px;
}

.rb-confirmed-ref {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 20px;
	background: var(--rb-surface-low);
	border-radius: var(--rb-radius-sm);
	font-size: 13px;
	color: var(--rb-on-surface-variant);
	margin-bottom: 24px;
}

.rb-confirmed-ref__code {
	font-size: 20px;
	font-weight: 700;
	color: var(--rb-primary);
	letter-spacing: 0.04em;
}

.rb-confirmed-details {
	text-align: left;
	margin-bottom: 20px;
}

.rb-confirmed-email-notice {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 13px;
	color: var(--rb-on-surface-variant);
	margin-bottom: 20px;
}
.rb-confirmed-email-notice .material-symbols-outlined { font-size: 16px; }

.rb-confirmed-contact {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 28px;
}

.rb-confirmed-contact__item {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 14px;
	color: var(--rb-on-surface-variant);
}
.rb-confirmed-contact__item .material-symbols-outlined { font-size: 18px; }

.rb-confirmed-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ── 11. Sidebar ─────────────────────────────────────────────────────────────── */

.rb-sidebar {
	min-width: 0;
}

.rb-sidebar--sticky .rb-sidebar__inner {
	position: sticky;
	top: 20px;
}

.rb-sidebar__inner {
	background: var(--rb-surface-card);
	border-radius: var(--rb-card-radius);
	box-shadow: var(--rb-shadow-card);
	overflow: hidden;
}

.rb-sidebar__image {
	width: 100%;
	aspect-ratio: 3/2;
	overflow: hidden;
}

.rb-sidebar__image-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rb-sidebar__image--placeholder {
	background: linear-gradient(135deg, var(--rb-surface-container) 0%, var(--rb-surface-low) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}
.rb-sidebar__image--placeholder .material-symbols-outlined {
	font-size: 48px;
	color: var(--rb-outline-variant);
}

.rb-sidebar__restaurant {
	padding: 20px 20px 0;
}
.rb-sidebar__restaurant-name {
	font-size: 18px;
	font-weight: 500;
}

.rb-sidebar__summary {
	padding: 20px;
}

.rb-sidebar__summary-header {
	margin-bottom: 14px;
}

.rb-sidebar__summary-title {
	font-family: var(--rb-body-font);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--rb-on-surface-variant);
}

.rb-sidebar__summary-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.rb-sidebar-row {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.rb-sidebar-row__label {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--rb-on-surface-variant);
}
.rb-sidebar-row__label .material-symbols-outlined { font-size: 14px; }

.rb-sidebar-row__value {
	font-size: 15px;
	font-weight: 500;
	color: var(--rb-on-surface);
	padding-left: 19px;
}

.rb-sidebar__deposit {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--rb-outline-variant);
}

.rb-sidebar__deposit-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.rb-sidebar__deposit-label {
	font-size: 13px;
	color: var(--rb-on-surface-variant);
}

.rb-sidebar__deposit-amount {
	font-size: 18px;
	font-weight: 700;
	color: var(--rb-primary);
}

.rb-sidebar__deposit-gst {
	font-size: 11px;
	color: var(--rb-on-surface-variant);
	text-align: right;
	margin-top: 2px;
}

.rb-sidebar__placeholder {
	font-size: 13px;
	color: var(--rb-on-surface-variant);
	line-height: 1.5;
}

.rb-sidebar__info {
	padding: 16px 20px;
	border-top: 1px solid var(--rb-outline-variant);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.rb-sidebar__info-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	color: var(--rb-on-surface-variant);
}
.rb-sidebar__info-item .material-symbols-outlined { font-size: 16px; margin-top: 2px; flex-shrink: 0; }
.rb-sidebar__info-item a { color: var(--rb-on-surface-variant); }

/* ── 12. Shared components ──────────────────────────────────────────────────── */

/* Buttons */
.rb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 24px;
	border-radius: var(--rb-btn-radius);
	font-family: var(--rb-body-font, inherit);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	border: 1.5px solid transparent;
	transition: all var(--rb-transition);
	text-decoration: none;
	white-space: nowrap;
}

.rb-btn--primary {
	background: var(--rb-btn-bg);
	color: var(--rb-btn-text);
	border-color: var(--rb-btn-bg);
}
.rb-btn--primary:hover { background: var(--rb-btn-hover); border-color: var(--rb-btn-hover); color: var(--rb-on-primary); text-decoration: none; }

.rb-btn--secondary {
	background: transparent;
	color: var(--rb-on-surface-variant);
	border-color: var(--rb-outline-variant);
}
.rb-btn--secondary:hover { border-color: var(--rb-outline); color: var(--rb-on-surface); text-decoration: none; }

.rb-btn--outline {
	background: transparent;
	color: var(--rb-primary);
	border-color: var(--rb-primary);
}
.rb-btn--outline:hover { background: var(--rb-surface-low); text-decoration: none; }

.rb-btn--full { width: 100%; }

.rb-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	pointer-events: none;
}

.rb-btn .material-symbols-outlined { font-size: 18px; }

.rb-btn--pay {
	background: var(--rb-primary);
	color: var(--rb-on-primary);
	border-color: var(--rb-primary);
}
.rb-btn--pay:hover { background: var(--rb-btn-hover); border-color: var(--rb-btn-hover); }

.rb-btn__price {
	opacity: 0.8;
	font-size: 13px;
}

.rb-btn--call {
	background: transparent;
	color: var(--rb-primary);
	border-color: var(--rb-primary);
}

.rb-link {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: var(--rb-primary);
	font-size: inherit;
	text-decoration: underline;
}

/* Spinner */
.rb-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid var(--rb-outline-variant);
	border-top-color: var(--rb-primary);
	border-radius: 9999px;
	animation: rb-spin 0.7s linear infinite;
	display: inline-block;
	flex-shrink: 0;
}

/* Error message */
.rb-field__error:empty { display: none; }

/* Notice */
.rb-notice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 14px 16px;
	border-radius: var(--rb-radius-sm);
	font-size: 14px;
	margin-bottom: 20px;
}
.rb-notice .material-symbols-outlined { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.rb-notice--warning {
	background: #fef3c7;
	color: #92400e;
}
.rb-notice--warning .material-symbols-outlined { color: #d97706; }

.rb-notice--info {
	background: var(--rb-surface-low);
	color: var(--rb-on-surface-variant);
}

/* Global notice */
.rb-global-notice {
	padding: 14px 16px;
	border-radius: var(--rb-radius-sm);
	font-size: 14px;
	margin-top: 12px;
	background: #fee2e2;
	color: var(--rb-error);
}

/* Hold timer (global, bottom-right corner) */
.rb-hold-timer {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background: var(--rb-on-surface);
	color: var(--rb-surface-card);
	padding: 10px 16px;
	border-radius: 9999px;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	z-index: 100;
	box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.rb-hold-timer .material-symbols-outlined { font-size: 16px; }

/* ── 13. Mobile nav ──────────────────────────────────────────────────────────── */

.rb-mobile-nav {
	/* Single nav bar — visible on all breakpoints.
	   On desktop: sits at the bottom of the step card, inline.
	   On mobile:  sticky to the bottom of the viewport. */
	display: flex;
	gap: 12px;
	padding: 20px 0 4px;
	border-top: 1px solid var(--rb-outline-variant);
	margin-top: 24px;
	/* Not sticky on desktop — avoids overlap with sidebar */
	position: static;
	background: transparent;
	box-shadow: none;
}

/* ── 14. Animations ──────────────────────────────────────────────────────────── */

@keyframes rb-step-in {
	from { opacity: 0; transform: translateX(16px); }
	to   { opacity: 1; transform: translateX(0); }
}

@keyframes rb-step-out {
	from { opacity: 1; transform: translateX(0); }
	to   { opacity: 0; transform: translateX(-16px); }
}

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

@keyframes rb-pop-in {
	0%   { transform: scale(0.5); opacity: 0; }
	70%  { transform: scale(1.1); opacity: 1; }
	100% { transform: scale(1); }
}

/* ── Fully Booked Popup ──────────────────────────────────────────────────────── */

.rb-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0,0,0,0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.rb-popup {
	background: var(--rb-surface-card);
	border-radius: var(--rb-card-radius);
	max-width: 440px;
	width: 100%;
	padding: 36px 32px;
	text-align: center;
	position: relative;
	box-shadow: 0 20px 60px rgba(0,0,0,0.25);
	animation: rb-pop-in 0.3s ease;
}

.rb-popup__close {
	position: absolute;
	top: 14px;
	right: 14px;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--rb-on-surface-variant);
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background var(--rb-transition);
}
.rb-popup__close:hover { background: var(--rb-surface-low); }
.rb-popup__close .material-symbols-outlined { font-size: 20px; }

.rb-popup__icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--rb-surface-low);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
}
.rb-popup__icon .material-symbols-outlined {
	font-size: 32px;
	color: var(--rb-on-surface-variant);
}

.rb-popup__heading {
	font-size: 22px;
	font-weight: 600;
	margin: 0 0 12px;
	color: var(--rb-on-surface);
	font-family: var(--rb-heading-font, serif);
}

.rb-popup__message {
	color: var(--rb-on-surface-variant);
	font-size: 15px;
	line-height: 1.6;
	margin: 0 0 24px;
}

.rb-popup__actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.rb-popup__actions .rb-btn {
	flex: 1;
	min-width: 120px;
	max-width: 180px;
}


/* ── 15. Responsive ──────────────────────────────────────────────────────────── */

/* Mid breakpoint: when inside a Divi column or narrow container,
   switch to a narrower sidebar before the full mobile breakpoint. */
@media (max-width: 960px) {
	.rb-booking-grid {
		grid-template-columns: 1fr min(300px, 30%);
	}
}

@media (max-width: 768px) {
	.rb-booking-grid {
		grid-template-columns: 1fr;
	}

	.rb-sidebar {
		order: -1; /* Sidebar above form on mobile */
	}

	.rb-sidebar--sticky .rb-sidebar__inner {
		position: static;
	}

	/* On mobile: sidebar summary is collapsed by default */
	.rb-sidebar__summary,
	.rb-sidebar__info {
		display: none;
	}

	.rb-sidebar--summary-open .rb-sidebar__summary,
	.rb-sidebar--summary-open .rb-sidebar__info {
		display: block;
	}

	.rb-step-inner {
		padding: 24px 20px;
	}

	.rb-mobile-nav {
		position: sticky;
		bottom: 0;
		background: var(--rb-surface-card);
		padding: 12px 16px;
		margin-top: 0;
		border-top: 1px solid var(--rb-outline-variant);
		z-index: 40;
		box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
		border-radius: 0;
	}

	.rb-field-row--2col {
		grid-template-columns: 1fr;
	}

	.rb-progress__steps {
		overflow-x: auto;
	}

	.rb-progress__step-label {
		display: none;
	}

	.rb-slots-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 480px) {
	:root {
		--rb-step-pad: 18px;
	}

	.rb-step-title {
		font-size: 20px;
	}

	.rb-slots-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.rb-calendar__grid {
		gap: 2px;
	}

	.rb-cal-day {
		font-size: 12px;
	}
}

/* ── 16. Reduced motion ──────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.rb-step,
	.rb-progress__fill,
	.rb-stepper__btn,
	.rb-btn,
	.rb-slot,
	.rb-cal-day,
	.rb-input {
		transition: none;
	}

	.rb-spinner {
		animation: none;
		opacity: 0.6;
	}

	.rb-confirmed-icon__circle {
		animation: none;
	}

	@keyframes rb-step-in  { from { opacity: 1; transform: none; } }
	@keyframes rb-step-out { to   { opacity: 0; transform: none; } }
}
