/* ==========================================================================
   Rooah CRM — Public Booking Widget (v0.8)
   ========================================================================== */

.rooah-booking-wrapper {
	/* Palette — distinct from the wpdevelop look. Indigo-leaning primary
	   with rounded squares, soft shadows, restrained type. */
	--rb-primary:        #4f46e5;
	--rb-primary-hover:  #4338ca;
	--rb-primary-soft:   #eef2ff;
	--rb-primary-tint:   #c7d2fe;
	--rb-text:           #111827;
	--rb-text-soft:      #374151;
	--rb-muted:          #6b7280;
	--rb-border:         #e5e7eb;
	--rb-border-strong:  #d1d5db;
	--rb-bg:             #ffffff;
	--rb-bg-soft:        #f9fafb;
	--rb-radius:         10px;
	--rb-radius-sm:      6px;
	--rb-radius-round:   999px;

	/* State colors. These are deliberately muted so the calendar reads
	   "calm and minimal" rather than "rainbow dashboard". */
	--rb-state-avail-bg:    #ecfdf5;  /* very light green */
	--rb-state-avail-text:  #047857;
	--rb-state-avail-dot:   #10b981;
	--rb-state-blocked-bg:  #f3f4f6;
	--rb-state-blocked-text:#9ca3af;
	--rb-state-past-text:   #d1d5db;
	/* v1.9.7: reverted to the pre-1.8 "soft red" treatment per user feedback —
	 * the v1.9.0 solid #fee2e2 block read as heavy. Option A uses a barely-pink
	 * fill (#fef2f2), brighter red text (#dc2626) and a thin red border
	 * (#fecaca) so unavailable/full slots read as "off" without a dense block. */
	--rb-state-full-bg:     #fef2f2;
	--rb-state-full-text:   #dc2626;
	--rb-state-full-border: #fecaca;
	--rb-state-partial-bg:  #fef3c7;
	--rb-state-partial-text:#92400e;

	--rb-error:          #b91c1c;
	--rb-error-bg:       #fef2f2;
	--rb-success:        #047857;

	max-width: 880px;
	margin: 0 auto 28px;
	color: var(--rb-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.5;
}

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

/* Theme-leak defense (v1.9.14): neutralize themes (e.g. Twenty Twenty) that
 * style bare button/input/select globally with heavy padding, full-width
 * display, uppercase brand-colored buttons, etc. The element list is wrapped
 * in :where() so it contributes ZERO specificity — the rule is (0,1,0) from
 * the wrapper class alone, which ties our component classes and loses to them
 * on source order (this block comes first), while still overriding the
 * theme's bare-element selectors. This avoids the trap where a wrapper-
 * descendant element selector (0,1,1) would outrank .rooah-booking-slot. */
.rooah-booking-wrapper :where(button, input, select) {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	font-family: inherit;
	font-size: inherit;
	line-height: normal;
	letter-spacing: normal;
	text-transform: none;
	color: inherit;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	margin: 0;
	padding: 0;
	width: auto;
	max-width: 100%;
	min-width: 0;
	font-weight: normal;
	opacity: 1;
	transition: none;
}

/* --- Header ---------------------------------------------------------- */
.rooah-booking-header {
	margin-bottom: 18px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--rb-border);
}
.rooah-booking-title {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 6px;
	color: var(--rb-text);
	line-height: 1.25;
}
.rooah-booking-description {
	color: var(--rb-muted);
	font-size: 14px;
	margin: 0 0 10px;
}
.rooah-booking-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 12px;
}
.rooah-booking-duration,
.rooah-booking-capacity {
	background: var(--rb-primary-soft);
	color: var(--rb-primary);
	font-weight: 600;
	padding: 4px 10px;
	border-radius: var(--rb-radius-round);
	display: inline-flex;
	align-items: center;
}

/* --- Two-column layout: calendar + slots ----------------------------- */
/*
 * Layout switches based on CONTAINER width (not viewport) — the shortcode
 * is dropped into arbitrary site columns, so a viewport-based @media query
 * gave us bugs where a 600px column on a 1400px viewport was treated as
 * "desktop" and the 280px slot panel overlapped the calendar.
 *
 * JS adds .is-stepped via ResizeObserver when the grid width drops below
 * ~640px. We avoid CSS @container queries on purpose because we need JS
 * to manage the back-button navigation in stepped mode anyway — driving
 * the layout class from the same JS keeps a single source of truth.
 */
.rooah-booking-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 24px;
}

/* Stepped mode: single column, one panel visible at a time, driven by
 * the data-rooah-step attribute (set by JS to "calendar" or "slots"). */
.rooah-booking-grid.is-stepped {
	grid-template-columns: 1fr;
	gap: 0;
}
.rooah-booking-grid.is-stepped[data-rooah-step="calendar"] .rooah-booking-slots {
	display: none;
}
.rooah-booking-grid.is-stepped[data-rooah-step="slots"] .rooah-booking-calendar {
	display: none;
}

/* Slot list stays 2 columns in stepped mode too — the wider stepped view
 * actually has MORE horizontal room than the 280px slots column it replaces,
 * so 2 columns is more natural than a tall single-column list. */

/* Back arrow in slots header — only visible in stepped mode */
.rooah-booking-slots-header-row {
	display: flex;
	align-items: center;
	gap: 12px;
}
.rooah-booking-slots-back {
	display: none;
	background: transparent;
	border: 1px solid var(--rb-border);
	border-radius: 50%;
	width: 32px;
	height: 32px;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--rb-text);
	flex-shrink: 0;
	padding: 0;
	transition: background .12s, border-color .12s;
}
.rooah-booking-slots-back:hover {
	background: var(--rb-bg-alt, rgba(0, 0, 0, 0.04));
	border-color: var(--rb-text);
}
.rooah-booking-slots-back:focus-visible {
	outline: 2px solid var(--rb-primary, #4f46e5);
	outline-offset: 2px;
}
.rooah-booking-grid.is-stepped[data-rooah-step="slots"] .rooah-booking-slots-back {
	display: inline-flex;
}

/* --- Calendar -------------------------------------------------------- */
.rooah-booking-calendar {
	background: var(--rb-bg);
	border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius);
	padding: 14px;
}

.rooah-booking-calendar-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.rooah-booking-month-label {
	font-weight: 700;
	font-size: 15px;
	color: var(--rb-text);
}

.rooah-booking-prev,
.rooah-booking-next {
	background: var(--rb-bg);
	border: 1px solid var(--rb-border);
	width: 32px;
	height: 32px;
	border-radius: var(--rb-radius-sm);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	color: var(--rb-text-soft);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background .12s, border-color .12s, color .12s;
}
.rooah-booking-prev:hover,
.rooah-booking-next:hover {
	background: var(--rb-primary-soft);
	border-color: var(--rb-primary-tint);
	color: var(--rb-primary);
}

.rooah-booking-weekdays,
.rooah-booking-days {
	display: grid;
	grid-template-columns: repeat( 7, 1fr );
	gap: 4px;
}

.rooah-booking-weekday {
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	color: var(--rb-muted);
	padding: 6px 0;
	text-transform: uppercase;
	letter-spacing: 0.6px;
}

.rooah-booking-day {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	background: transparent;
	border: 1px solid transparent;
	border-radius: var(--rb-radius-sm);
	color: var(--rb-text);
	cursor: pointer;
	font-family: inherit;
	font-weight: 500;
	position: relative;
	transition: background .12s, border-color .12s, color .12s, transform .08s;
}

.rooah-booking-day-empty { visibility: hidden; pointer-events: none; }

/* AVAILABLE — interactive, with a subtle dot indicator */
.rooah-booking-day-available {
	background: var(--rb-state-avail-bg);
	color: var(--rb-state-avail-text);
	font-weight: 600;
}
.rooah-booking-day-available::after {
	content: '';
	position: absolute;
	bottom: 4px;
	left: 50%;
	transform: translateX(-50%);
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--rb-state-avail-dot);
}
.rooah-booking-day-available:hover {
	background: var(--rb-primary);
	color: #fff;
	transform: scale( 1.04 );
}
.rooah-booking-day-available:hover::after { background: #fff; }

/* PAST / UNAVAILABLE / DISABLED */
.rooah-booking-day-disabled,
.rooah-booking-day-past {
	color: var(--rb-state-past-text);
	cursor: not-allowed;
	pointer-events: none;
	background: transparent;
}
.rooah-booking-day-past { text-decoration: line-through; }

.rooah-booking-day-unavailable {
	color: var(--rb-state-blocked-text);
	background: var(--rb-state-blocked-bg);
	cursor: not-allowed;
	pointer-events: none;
}

/* TODAY indicator (subtle outline) */
.rooah-booking-day-today {
	box-shadow: inset 0 0 0 1px var(--rb-primary-tint);
}

/* SELECTED — wins over everything */
.rooah-booking-day-selected,
.rooah-booking-day-selected.rooah-booking-day-available {
	background: var(--rb-primary) !important;
	color: #fff !important;
	box-shadow: 0 2px 4px rgba( 79, 70, 229, 0.25 ) !important;
}
.rooah-booking-day-selected::after { background: #fff !important; }

/* --- Slots panel ----------------------------------------------------- */
.rooah-booking-slots {
	background: var(--rb-bg);
	border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius);
	padding: 14px;
	min-height: 280px;
}

.rooah-booking-slots-header {
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--rb-border);
}

.rooah-booking-slots-title {
	font-size: 14px;
	font-weight: 700;
	color: var(--rb-text);
	display: block;
	margin-bottom: 2px;
}

.rooah-booking-tz-label {
	font-size: 11px;
	color: var(--rb-muted);
}

.rooah-booking-slot-list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
}
/* Always 2 columns — even on the narrowest viewports. Slot labels are short
 * ("2:00 pm – 3:00 pm" is ~17 chars at 13px), so two columns of ~130px each
 * still fit comfortably at a 320px viewport with site padding. */

.rooah-booking-slot {
	background: var(--rb-bg);
	border: 1px solid var(--rb-border);
	color: var(--rb-text);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 10px;
	border-radius: var(--rb-radius-sm);
	cursor: pointer;
	transition: background .12s, border-color .12s, color .12s, transform .08s;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}
.rooah-booking-slot:hover:not(:disabled):not(.is-unavailable):not(.is-full) {
	background: var(--rb-primary);
	color: #fff;
	border-color: var(--rb-primary);
	transform: translateY( -1px );
}
.rooah-booking-wrapper .rooah-booking-slot.is-unavailable,
.rooah-booking-wrapper .rooah-booking-slot.is-full,
.rooah-booking-wrapper .rooah-booking-slot.is-unavailable:disabled,
.rooah-booking-wrapper .rooah-booking-slot.is-full:disabled {
	/* v1.9.7: Option A "soft red". v1.9.11: forced with !important.
	 * v1.9.12: literal hex instead of var(--rb-state-full-*), higher
	 * specificity (wrapper-scoped + :disabled), because a disabled-button
	 * background rule from the theme/WP was winning the !important tie on
	 * specificity. The slot is a <button disabled>, so themes that style
	 * button:disabled were repainting it. This selector outranks those. */
	background: #fef2f2 !important;
	color: #dc2626 !important;
	cursor: not-allowed !important;
	border: 1px solid #fecaca !important;
	opacity: 1 !important;
	position: relative;
}
/* v1.9.11: faint diagonal strike on unavailable slots; also a deploy/cache
 * diagnostic. v1.9.12: literal color. */
.rooah-booking-wrapper .rooah-booking-slot.is-unavailable::after,
.rooah-booking-wrapper .rooah-booking-slot.is-full::after {
	content: "";
	position: absolute;
	left: 8px; right: 8px; top: 50%;
	height: 1px;
	background: #fecaca;
	opacity: .8;
	pointer-events: none;
}
.rooah-booking-slot-time { font-size: 13px; }
.rooah-booking-slot-seats {
	font-size: 10px;
	font-weight: 500;
	color: var(--rb-muted);
	text-transform: uppercase;
	letter-spacing: 0.3px;
}
.rooah-booking-slot:hover:not(:disabled) .rooah-booking-slot-seats { color: rgba( 255, 255, 255, 0.85 ); }

.rooah-booking-placeholder,
.rooah-booking-loading {
	color: var(--rb-muted);
	font-style: italic;
	font-size: 13px;
	text-align: center;
	padding: 36px 12px;
	grid-column: 1 / -1;
}

.rooah-booking-error {
	background: var(--rb-error-bg);
	color: var(--rb-error);
	padding: 10px 12px;
	border-radius: var(--rb-radius-sm);
	font-size: 13px;
	margin-bottom: 10px;
}

.rooah-booking-spinner {
	width: 24px;
	height: 24px;
	border: 2px solid var(--rb-border);
	border-top-color: var(--rb-primary);
	border-radius: 50%;
	animation: rooah-spin .8s linear infinite;
	margin: 30px auto;
}
@keyframes rooah-spin { to { transform: rotate( 360deg ); } }

/* --- Step 2: intake form area --------------------------------------- */
.rooah-booking-step-form {
	margin-top: 14px;
}
.rooah-booking-selected-slot {
	background: var(--rb-primary-soft);
	color: var(--rb-text);
	padding: 10px 14px;
	border-radius: var(--rb-radius-sm);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	margin-bottom: 16px;
}
.rooah-booking-selected-label { color: var(--rb-muted); font-size: 13px; }
.rooah-booking-selected-text { color: var(--rb-text); }
.rooah-booking-change-slot {
	background: transparent;
	border: 0;
	color: var(--rb-primary);
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	margin-left: auto;
	padding: 0;
}
.rooah-booking-change-slot:hover { text-decoration: underline; }

.rooah-booking-no-intake p { margin: 0 0 12px; }
.rooah-booking-no-intake .rooah-label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	color: var(--rb-text-soft);
	margin-bottom: 4px;
}
.rooah-booking-fallback-input {
	width: 100%;
	border: 1px solid var(--rb-border-strong);
	border-radius: var(--rb-radius-sm);
	padding: 10px 12px;
	font-size: 14px;
	font-family: inherit;
}
.rooah-booking-fallback-input:focus {
	outline: none;
	border-color: var(--rb-primary);
	box-shadow: 0 0 0 3px var(--rb-primary-soft);
}

.rooah-booking-fallback-submit,
.rooah-booking-wrapper .rooah-submit-button {
	background: var(--rb-primary);
	color: #fff;
	border: 0;
	padding: 10px 18px;
	border-radius: var(--rb-radius-sm);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	transition: background .12s;
	text-decoration: none;
}
/* Higher-specificity hover rule + explicit color so themes can't make the
   button's label transparent / match its background on hover. The most common
   real-world failure mode (e.g. several WP block themes set
   `button:hover { color: var(--theme-link-hover); }` which can match our
   indigo bg, making the label "vanish"). Pin color + bg here. */
.rooah-booking-fallback-submit:hover,
.rooah-booking-fallback-submit:focus,
.rooah-booking-wrapper .rooah-submit-button:hover,
.rooah-booking-wrapper .rooah-submit-button:focus {
	background: var(--rb-primary-hover);
	color: #fff;
	border: 0;
	text-decoration: none;
	opacity: 1;
}
.rooah-booking-fallback-submit.is-loading,
.rooah-booking-wrapper .rooah-submit-button.is-loading { opacity: 0.7; cursor: wait; }

/* --- Step 3: confirmation ------------------------------------------- */
.rooah-booking-step-done { padding: 28px 16px; text-align: center; }
.rooah-booking-success {
	max-width: 420px;
	margin: 0 auto;
	background: var(--rb-bg);
	border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius);
	padding: 28px 22px;
}
.rooah-booking-success-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: var(--rb-state-avail-bg);
	color: var(--rb-state-avail-text);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	font-weight: 700;
}
.rooah-booking-success-title {
	margin: 0 0 8px;
	font-size: 18px;
	color: var(--rb-text);
}
.rooah-booking-success-message {
	color: var(--rb-text-soft);
	margin: 0 0 12px;
	font-size: 14px;
}
.rooah-booking-success-meta {
	color: var(--rb-muted);
	font-size: 13px;
	margin: 0;
}

/* Legend below calendar */
.rooah-booking-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid var(--rb-border);
	font-size: 11px;
	color: var(--rb-muted);
}
.rooah-booking-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.rooah-booking-legend-swatch {
	width: 12px;
	height: 12px;
	border-radius: 3px;
	display: inline-block;
}
.rooah-booking-legend-swatch-avail { background: var(--rb-state-avail-bg); border: 1px solid var(--rb-state-avail-dot); }
.rooah-booking-legend-swatch-past { background: transparent; border: 1px solid var(--rb-state-past-text); }
.rooah-booking-legend-swatch-unavail { background: var(--rb-state-blocked-bg); }
.rooah-booking-legend-swatch-selected { background: var(--rb-primary); }

/* Public cancel page */
.rooah-cancel-page {
	max-width: 480px;
	margin: 40px auto;
	padding: 0 20px;
}
.rooah-cancel-card {
	background: var(--rb-bg);
	border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius);
	padding: 28px 24px;
	text-align: center;
}
.rooah-cancel-card h2 { margin-top: 0; }

/* ----- Service picker (Step 0 of widget) ----------------------------- */
.rooah-booking-services {
	background: var(--rb-bg);
	border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius);
	padding: 16px;
}
.rooah-booking-services-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--rb-border);
}
.rooah-booking-services-title { font-size: 14px; color: var(--rb-text); }
.rooah-booking-services-total {
	background: var(--rb-primary-soft);
	color: var(--rb-primary);
	font-weight: 600;
	padding: 3px 10px;
	border-radius: var(--rb-radius-round);
	font-size: 12px;
}
.rooah-booking-services-actions {
	margin-top: 14px;
	text-align: right;
}

.rooah-service-picker {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.rooah-service-option {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px;
	border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius-sm);
	cursor: pointer;
	background: var(--rb-bg);
	transition: border-color .12s, background .12s;
}
.rooah-service-option:hover {
	border-color: var(--rb-primary-tint);
	background: var(--rb-primary-soft);
}
.rooah-service-option input[type="radio"],
.rooah-service-option input[type="checkbox"] {
	margin-top: 3px;
	flex: 0 0 auto;
	cursor: pointer;
}
.rooah-service-option input:checked + .rooah-service-option-body {
	color: var(--rb-text);
}
.rooah-service-option:has(input:checked) {
	border-color: var(--rb-primary);
	background: var(--rb-primary-soft);
	box-shadow: inset 0 0 0 1px var(--rb-primary-tint);
}
.rooah-service-option-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	color: var(--rb-text);
}
.rooah-service-option-name {
	font-weight: 600;
	font-size: 14px;
}
.rooah-service-option-meta {
	font-size: 12px;
	color: var(--rb-muted);
}
.rooah-service-option-desc {
	font-size: 12px;
	color: var(--rb-text-soft);
	margin-top: 2px;
}

/* ===== Customer-facing staff picker (S3a polish) ===== */
.rooah-booking-staff {
	margin: 0 0 14px;
	padding: 12px 14px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
}
.rooah-booking-staff-header {
	margin-bottom: 10px;
}
.rooah-booking-staff-title {
	font-size: 14px;
	color: var(--rb-text, #1f2937);
}
.rooah-booking-staff-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.rooah-booking-staff-option {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px 6px 8px;
	background: #fff;
	border: 1.5px solid #e2e8f0;
	border-radius: 999px;
	cursor: pointer;
	font-size: 13px;
	transition: border-color .12s, background .12s;
}
.rooah-booking-staff-option:hover { border-color: #94a3b8; }
.rooah-booking-staff-option.is-selected {
	border-color: var(--rb-primary);
	background: var(--rb-primary-soft);
}
.rooah-booking-staff-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.rooah-booking-staff-avatar--any {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px; height: 22px;
	border-radius: 50%;
	background: #e5e7eb;
	color: #4b5563;
	font-size: 12px;
}

/* ===== Staff avatar (shared circle/initials primitive) =====
   Mirrors the rules in admin.css so the customer-facing booking picker
   shows circular avatars just like the admin views. */
.rooah-booking-staff .rooah-staff-avatar,
.rooah-booking-staff-option .rooah-staff-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	object-fit: cover;
	vertical-align: middle;
	flex-shrink: 0;
	color: #fff;
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
	box-shadow: 0 0 0 2px #fff;
}
.rooah-booking-staff .rooah-staff-avatar-initials,
.rooah-booking-staff-option .rooah-staff-avatar-initials { letter-spacing: 0.5px; }

/* Staff-conflict warning shown above the picker options. */
.rooah-booking-staff-warning {
	margin: 0 0 10px;
	padding: 10px 12px;
	background: #fef3c7;
	color: #92400e;
	border: 1px solid #fcd34d;
	border-radius: 6px;
	font-size: 13px;
	line-height: 1.5;
}

/* ===== Staff picker — dropdown variant (large pools, 8+) =====
   Custom combobox so option rows keep the avatar + name layout used by the
   chip variant, with a type-to-filter search. */
.rooah-booking-staff-options--dropdown {
	display: block;
}
.rooah-booking-staff-dd {
	position: relative;
	max-width: 320px;
}
.rooah-booking-staff-dd-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	padding: 9px 12px;
	background: #fff;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	cursor: pointer;
	font-size: 13px;
	color: var(--rb-text, #1f2937);
	text-align: left;
	transition: border-color .12s;
}
.rooah-booking-staff-dd-toggle:hover { border-color: #94a3b8; }
.rooah-booking-staff-dd-toggle[aria-expanded="true"] {
	border-color: var(--rb-primary);
}
.rooah-booking-staff-dd-current {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.rooah-booking-staff-dd-caret {
	flex-shrink: 0;
	font-size: 10px;
	color: #6b7280;
}
.rooah-booking-staff-dd-panel {
	position: absolute;
	z-index: 20;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
	overflow: hidden;
}
.rooah-booking-staff-dd-search {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 9px 12px;
	border: 0;
	border-bottom: 1px solid #e2e8f0;
	font-size: 13px;
	outline: none;
}
.rooah-booking-staff-dd-search:focus {
	box-shadow: inset 0 -2px 0 var(--rb-primary);
}
.rooah-booking-staff-dd-list {
	list-style: none;
	margin: 0;
	padding: 4px;
	max-height: 260px;
	overflow-y: auto;
}
.rooah-booking-staff-dd-option {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 8px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
}
.rooah-booking-staff-dd-option:hover { background: #f1f5f9; }
.rooah-booking-staff-dd-option.is-selected {
	background: var(--rb-primary-soft);
	font-weight: 600;
}
.rooah-booking-staff-dd-empty {
	padding: 12px;
	font-size: 13px;
	color: #6b7280;
	text-align: center;
}

/* Avatars inside dropdown rows reuse the shared circle primitive. */
.rooah-booking-staff-dd-option .rooah-staff-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	color: #fff;
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
}

/* ============================================================
 * v1.1.0 — Calendar theme "rounded" (refined v1.1.1)
 * ============================================================
 * Available days carry a SOFT circular background tint (not just colored
 * text — that turned out too subtle, available days were barely
 * distinguishable from unavailable ones at a glance). Selected day is the
 * solid filled circle.
 *
 * Activated when admin picks "Rounded" in Settings → Theme.
 * Class added by the renderer: .rooah-booking-theme--rounded.
 */
.rooah-booking-theme--rounded .rooah-booking-day {
	border-radius: 50%;
	font-weight: 500;
}
/* Available: light primary-soft tint circle, primary-colored text.
 * Same coloring as the Classic theme, but the round border-radius is
 * what differentiates Rounded visually. */
.rooah-booking-theme--rounded .rooah-booking-day-available {
	background: var(--rb-primary-soft);
	color: var(--rb-primary);
	font-weight: 600;
}
.rooah-booking-theme--rounded .rooah-booking-day-available:hover {
	background: var(--rb-primary);
	color: #fff;
	transform: scale( 1.04 );
}
.rooah-booking-theme--rounded .rooah-booking-day-available:hover::after {
	background: #fff;
}
.rooah-booking-theme--rounded .rooah-booking-day-selected,
.rooah-booking-theme--rounded .rooah-booking-day-selected.rooah-booking-day-available {
	background: var(--rb-primary) !important;
	color: #fff !important;
	box-shadow: none !important;
	border-radius: 50% !important;
}
/* Hide the under-number dot when selected in rounded theme — the solid
 * filled circle is signal enough; the dot would clutter it. */
.rooah-booking-theme--rounded .rooah-booking-day-selected::after {
	display: none;
}

/* ==========================================================================
   Calendar groups (v1.12.0) — public "choose a service" card grid.
   Reuses .rooah-booking-wrapper for the theme-leak defense + tokens.
   ========================================================================== */
.rooah-group-header { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--rb-border); }
/* Assert the widget font on the heading/search rather than relying on
 * inheritance: the bare embed page has no CSS reset (so an <h2> can fall back
 * to the browser's serif default), and host themes restyle headings/inputs —
 * either makes the embed and shortcode renders diverge. Pinning font-family +
 * the design tokens here keeps both contexts identical. */
.rooah-group-title {
	margin: 0 0 4px; font-size: 24px; font-weight: 700; line-height: 1.25;
	color: var(--rb-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.rooah-group-description {
	margin: 0; color: var(--rb-muted, #6b7280);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.rooah-group-search { margin: 16px 0; }
.rooah-group-search-input {
	width: 100%; max-width: 320px; padding: 10px 14px; font-size: 14px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	border: 1px solid var(--rb-border); border-radius: var(--rb-radius, 10px);
	background: #fff; color: var(--rb-text); box-sizing: border-box;
	line-height: 1.4; -webkit-appearance: none; appearance: none;
}
.rooah-group-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
}
/* Very narrow embeds (e.g. a left/right-aligned Elementor column) collapse to
 * a single column cleanly rather than squeezing two cramped cards. */
@media (max-width: 520px) { .rooah-group-grid { grid-template-columns: 1fr; } }
.rooah-group-card {
	display: flex; flex-direction: column; align-items: stretch;
	min-height: 150px; padding: 20px; gap: 8px; text-align: left; cursor: pointer;
	background: #fff; border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius, 12px); font: inherit; color: var(--rb-text);
	transition: border-color .15s, box-shadow .15s, background-color .15s, transform .05s;
}
/* Hover uses the plugin PRIMARY color family (not the theme's button hover,
 * which was bleeding through — these are <button> elements). A light primary
 * tint background + primary border + primary box-shadow. When style
 * enforcement is on, the strict-mode block locks these with !important. */
.rooah-group-card:hover,
.rooah-group-card:focus-visible {
	border-color: var(--rb-primary, #4f46e5);
	background: var(--rb-primary-soft, #eef2ff);
	box-shadow: 0 4px 14px var(--rb-primary-tint, rgba(79,70,229,.25));
	color: var(--rb-text);
	outline: none;
}
/* Keep the title/price readable on the tinted hover background. */
.rooah-group-card:hover .rooah-group-card-title,
.rooah-group-card:hover .rooah-group-card-price { color: var(--rb-primary, #4f46e5); }
.rooah-group-card:active { transform: translateY(1px); }
.rooah-group-card-title { font-size: 18px; font-weight: 700; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.rooah-group-card-meta {
	margin-top: auto; display: flex; align-items: center; justify-content: space-between;
	gap: 12px; color: var(--rb-muted, #6b7280); font-size: 14px;
}
.rooah-group-card-duration { display: inline-flex; align-items: center; gap: 6px; }
.rooah-group-card-price { font-weight: 700; color: var(--rb-text); white-space: nowrap; }
.rooah-group-card.is-hidden { display: none; }
.rooah-group-back {
	display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px;
	padding: 6px 10px; font: inherit; font-size: 14px; cursor: pointer;
	background: none; border: 0; color: var(--rb-primary, #4f46e5);
}
.rooah-group-back:hover { text-decoration: underline; }
.rooah-group-empty { color: var(--rb-muted, #6b7280); }
