.cerbo-booking-form {
	/* Defaults here are what the form looks like with no branding configured;
	   the Branding section in the form builder overrides these per form via
	   a scoped <style> block that sets these same variable names. These are
	   deliberately reasserted with !important on the interactive elements
	   below, since some themes/page builders (Elementor global styles, etc.)
	   apply their own broad defaults directly to <button>/<input> tags that
	   would otherwise outrank a plugin's plain CSS. */
	--cerbo-primary: #2271b1;
	--cerbo-button-text: #ffffff;
	--cerbo-radius: 6px;
	--cerbo-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--cerbo-field-border: #cccccc;
	--cerbo-field-bg: #ffffff;
	--cerbo-field-gap: 18px;
	--cerbo-field-padding: 10px 12px;
	/* --cerbo-form-bg, --cerbo-form-card-padding, --cerbo-form-card-shadow are
	   only set (via the scoped <style> block) when a Form Background Color is
	   configured, that's what turns this into a "card" rather than blending
	   into the page, so they intentionally have no default here. */

	max-width: 480px;
	margin: 0 auto;
	font-family: var(--cerbo-font);
	background: var(--cerbo-form-bg, transparent);
	padding: var(--cerbo-form-card-padding, 0);
	border-radius: var(--cerbo-radius);
	box-shadow: var(--cerbo-form-card-shadow, none);
	box-sizing: border-box;
}

.cerbo-booking-form .cerbo-field {
	margin-bottom: var(--cerbo-field-gap);
}

.cerbo-form-title {
	margin: 0 0 6px;
	font-size: 24px;
	font-weight: 700;
}

.cerbo-form-intro {
	margin: 0 0 var(--cerbo-field-gap);
	color: #555;
	font-size: 15px;
}

.cerbo-personal-info-heading {
	width: 100%;
	margin: 8px 0 var(--cerbo-field-gap);
	font-size: 16px;
	font-weight: 600;
	color: var(--cerbo-label-color, #333);
}

.cerbo-booking-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--cerbo-label-color, inherit);
}

.cerbo-booking-form select,
.cerbo-booking-form input[type="text"],
.cerbo-booking-form input[type="email"],
.cerbo-booking-form input[type="tel"],
.cerbo-booking-form input[type="date"],
.cerbo-booking-form textarea {
	width: 100% !important;
	height: 44px !important;
	padding: var(--cerbo-field-padding) !important;
	border: 1px solid var(--cerbo-field-border) !important;
	background: var(--cerbo-field-bg) !important;
	color: #1d2327 !important;
	border-radius: var(--cerbo-radius) !important;
	box-shadow: none !important;
	outline: none !important;
	font-size: 15px !important;
	line-height: 1.4 !important;
	font-family: inherit !important;
	box-sizing: border-box !important;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

/* textarea is intentionally multi-line, undo the fixed single-line height above */
.cerbo-booking-form textarea {
	height: auto !important;
	min-height: 90px !important;
}

/* appearance:none above strips the native dropdown arrow, redraw a simple one so
   a <select> still reads as a dropdown rather than a plain text field */
.cerbo-booking-form select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
	padding-right: 34px !important;
}

/* appearance:none also strips Chrome/Safari's built-in calendar icon on
   input[type=date], this restores just its clickable/visible presence */
.cerbo-booking-form input[type="date"]::-webkit-calendar-picker-indicator {
	opacity: 1;
	cursor: pointer;
}

.cerbo-booking-form select:focus,
.cerbo-booking-form input:focus,
.cerbo-booking-form textarea:focus {
	border-color: var(--cerbo-primary) !important;
	box-shadow: 0 0 0 1px var(--cerbo-primary) !important;
}

/* -------- Compact layout: pairs of fields side by side -------- */
.cerbo-contact-fields.cerbo-layout-compact {
	display: flex;
	flex-wrap: wrap;
	gap: 0 16px;
}

.cerbo-contact-fields.cerbo-layout-compact .cerbo-field-row-pair {
	display: flex;
	gap: 16px;
	width: 100%;
	margin-bottom: var(--cerbo-field-gap);
}

.cerbo-contact-fields.cerbo-layout-compact .cerbo-field-row-pair .cerbo-field {
	flex: 1;
	min-width: 0;
	margin-bottom: 0;
}

.cerbo-contact-fields.cerbo-layout-compact .cerbo-field-full-width {
	width: 100%;
	margin-bottom: var(--cerbo-field-gap);
}

.cerbo-time-slots {
	display: grid;
	grid-template-columns: repeat(var(--cerbo-slots-per-row, 4), 1fr);
	gap: 8px;
}

.cerbo-field-error {
	display: block;
	color: #b00020;
	font-size: 13px;
	margin-top: 4px;
	min-height: 16px;
}

.cerbo-has-error input,
.cerbo-has-error select,
.cerbo-has-error textarea {
	border-color: #b00020 !important;
}

/* Match flatpickr's calendar day highlighting to this form's primary color */
.cerbo-booking-form .flatpickr-day.selected,
.cerbo-booking-form .flatpickr-day.selected:hover {
	background: var(--cerbo-primary);
	border-color: var(--cerbo-primary);
}

.cerbo-date-select.cerbo-loading {
	cursor: wait;
	opacity: 0.7;
}

button.cerbo-time-slot-btn {
	width: 100%;
	padding: 8px 6px !important;
	border: 1px solid var(--cerbo-field-border) !important;
	background: var(--cerbo-field-bg) !important;
	color: #333 !important;
	border-radius: var(--cerbo-radius) !important;
	box-shadow: none !important;
	outline: none !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: normal !important;
	text-transform: none !important;
	text-align: center;
	cursor: pointer;
}

button.cerbo-time-slot-btn.selected {
	background: var(--cerbo-primary) !important;
	border-color: var(--cerbo-primary) !important;
	color: var(--cerbo-button-text) !important;
}

button.cerbo-submit-btn {
	width: 100%;
	padding: 12px !important;
	font-size: 16px !important;
	font-family: inherit !important;
	font-weight: 600 !important;
	line-height: normal !important;
	text-transform: none !important;
	border: none !important;
	border-radius: var(--cerbo-radius) !important;
	background: var(--cerbo-primary) !important;
	color: var(--cerbo-button-text) !important;
	box-shadow: none !important;
	cursor: pointer;
}

button.cerbo-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.cerbo-message {
	margin-top: 16px;
	font-weight: 600;
}

/* -------- Select2 (searchable dropdowns) sized/styled to match the rest -------- */
.cerbo-booking-form .select2-container {
	width: 100% !important;
}

.cerbo-booking-form .select2-container .select2-selection--single {
	height: 44px !important;
	padding: var(--cerbo-field-padding) !important;
	border: 1px solid var(--cerbo-field-border) !important;
	background: var(--cerbo-field-bg) !important;
	border-radius: var(--cerbo-radius) !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	display: flex !important;
	align-items: center !important;
}

.cerbo-booking-form .select2-container .select2-selection__rendered {
	padding: 0 !important;
	line-height: normal !important;
	font-size: 15px !important;
	color: #1d2327 !important;
}

.cerbo-booking-form .select2-container .select2-selection__arrow {
	height: 100% !important;
	top: 0 !important;
	right: 8px !important;
}

.cerbo-booking-form .select2-dropdown {
	border-color: var(--cerbo-field-border) !important;
	border-radius: var(--cerbo-radius) !important;
}

.cerbo-booking-form .select2-container--default .select2-results__option--highlighted[aria-selected] {
	background: var(--cerbo-primary) !important;
}

/* On narrow screens, cap the time-slot grid at 3 columns regardless of the
   admin's chosen desktop column count, a 5-column grid on a phone-width
   screen leaves each button too small to comfortably tap. */
@media (max-width: 480px) {
	.cerbo-time-slots {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}

.cerbo-booking-form .cerbo-field-checkbox .cerbo-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 400;
	line-height: 1.5;
	cursor: pointer;
}

.cerbo-booking-form .cerbo-field-checkbox input[type="checkbox"] {
	width: auto;
	margin-top: 4px;
	flex: 0 0 auto;
}

.cerbo-booking-form .cerbo-tz-note {
	margin: 10px 0 0;
	font-size: 14px;
	opacity: 0.8;
}
