/* Booking for Cleaning Service — frontend styles.
   Design: "service ticket" motif — a booking is an itemized job, so the
   progress bar reads as a checklist and the price summary reads as a
   receipt (dashed rule, right-aligned mono figures). Fraunces for display
   warmth, Inter for UI. Palette is grounded in "fresh/clean" (spruce +
   rinse-water blue), not a generic SaaS or terracotta default.
   Colors/radius/font are overridden per-site via CSS variables from
   Settings > Design (see BCS_Public::enqueue_styles()). */

.bcs-booking-form {
	--bcs-primary: #0B6E5C;
	--bcs-primary-dark: #085246;
	--bcs-rinse: #2E9BD6;
	--bcs-ink: #111827;
	--bcs-surface: #EFF4F1;
	--bcs-button: #0B6E5C;
	--bcs-radius: 14px;
	--bcs-font-display: 'Fraunces', Georgia, serif;
	--bcs-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	--bcs-font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
	--bcs-shadow-sm: 0 1px 2px rgba(17,24,39,.04), 0 1px 3px rgba(17,24,39,.06);
	--bcs-shadow-md: 0 10px 30px -10px rgba(17,24,39,.14), 0 2px 8px rgba(17,24,39,.05);
	font-family: var(--bcs-font-body);
	max-width: 1000px;
	margin: 0 auto;
	color: var(--bcs-ink);
	background: #FAFBFA;
	box-sizing: border-box;
}
.bcs-booking-form *, .bcs-booking-form *::before, .bcs-booking-form *::after {
	box-sizing: border-box;
}

/* Checklist-style progress tracker */
.bcs-progress { margin-bottom: 32px; }
.bcs-progress ol {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}
.bcs-progress ol::before {
	content: '';
	position: absolute;
	top: 13px;
	left: 20px;
	right: 20px;
	height: 2px;
	background: #E2E8E5;
	z-index: 0;
}
.bcs-progress__step {
	position: relative;
	z-index: 1;
	flex: 1;
	text-align: center;
	font-size: 12.5px;
	font-weight: 600;
	color: #9CA8A2;
	padding-top: 34px;
}
.bcs-progress__step::before {
	content: attr(data-step);
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 26px;
	height: 26px;
	line-height: 26px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #E2E8E5;
	font-family: var(--bcs-font-mono);
	font-size: 12px;
	color: #9CA8A2;
	transition: border-color .2s, background .2s, color .2s;
}
.bcs-progress__step.is-active { color: var(--bcs-ink); }
.bcs-progress__step.is-active::before {
	border-color: var(--bcs-primary);
	background: linear-gradient(135deg, var(--bcs-primary), var(--bcs-rinse));
	color: #fff;
	box-shadow: 0 0 0 4px rgba(11,110,92,.12);
}
.bcs-progress__step.is-done { color: var(--bcs-primary); cursor: pointer; }
.bcs-progress__step.is-done::before { border-color: var(--bcs-primary); background: #F3FAF7; color: var(--bcs-primary); content: '✓'; font-size: 11px; }
.bcs-progress-caption { display: none; font-size: 12.5px; color: #6B7A73; margin: 10px 0 0; text-align: center; }

.bcs-booking-form__layout { display: flex; gap: 36px; align-items: flex-start; }
.bcs-booking-form__steps { flex: 1 1 62%; min-width: 0; }

.bcs-step h2 {
	font-family: var(--bcs-font-display);
	font-size: 26px;
	font-weight: 600;
	margin: 0 0 6px;
	letter-spacing: -0.01em;
}
.bcs-step-hint { font-size: 13.5px; color: #6B7A73; margin: 0 0 22px; }

/* Step-level validation banner (replaces alert() popups) */
.bcs-step-error {
	background: #FDECEC;
	color: #B42318;
	border-radius: var(--bcs-radius);
	padding: 12px 16px;
	font-size: 13.5px;
	margin-bottom: 18px;
}

/* Service cards */
.bcs-service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.bcs-service-card {
	text-align: left;
	background: #fff;
	border: 1px solid #E2E8E5;
	border-radius: var(--bcs-radius);
	padding: 20px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 8px;
	box-shadow: var(--bcs-shadow-sm);
	transition: border-color .15s, transform .15s, box-shadow .15s;
}
.bcs-service-card:hover { border-color: var(--bcs-rinse); transform: translateY(-3px); box-shadow: var(--bcs-shadow-md); }
.bcs-service-card.is-selected {
	border-color: var(--bcs-primary);
	box-shadow: inset 0 0 0 1.5px var(--bcs-primary), var(--bcs-shadow-md);
	background: linear-gradient(180deg, #F6FBF9 0%, #fff 60%);
}
.bcs-service-card__name { font-family: var(--bcs-font-display); font-weight: 600; font-size: 17px; }
.bcs-service-card__desc { font-size: 13px; color: #5B6B64; line-height: 1.5; }
.bcs-service-card__price { margin-top: auto; font-family: var(--bcs-font-mono); font-weight: 500; color: var(--bcs-primary); font-size: 14px; }
.bcs-service-card__check {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--bcs-primary);
	color: #fff;
	font-size: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: scale(.6);
	transition: opacity .15s, transform .15s;
}
.bcs-service-card { position: relative; }
.bcs-service-card.is-selected .bcs-service-card__check { opacity: 1; transform: scale(1); }

/* Segmented control (property type, frequency) */
.bcs-segmented {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 22px;
}
.bcs-segmented__btn {
	padding: 10px 16px;
	border: 1px solid #D7DEDA;
	border-radius: 999px;
	background: #fff;
	font-size: 13.5px;
	font-weight: 600;
	color: #374151;
	cursor: pointer;
	font-family: var(--bcs-font-body);
	transition: background .15s, border-color .15s, color .15s;
}
.bcs-segmented__btn.is-selected {
	background: linear-gradient(135deg, var(--bcs-primary), var(--bcs-primary-dark));
	border-color: var(--bcs-primary);
	color: #fff;
	box-shadow: 0 4px 10px rgba(11,110,92,.22);
}

/* Toggle card (urgent booking) */
.bcs-toggle-card {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	border: 1px solid #E2E8E5;
	border-radius: var(--bcs-radius);
	padding: 14px 16px;
	cursor: pointer;
	margin-top: 4px;
}
.bcs-toggle-card input { margin-top: 3px; }
.bcs-toggle-card__title { display: block; font-weight: 600; font-size: 14px; }
.bcs-toggle-card__desc { display: block; font-size: 12.5px; color: #6B7A73; margin-top: 2px; }
.bcs-toggle-card:has(input:checked) { border-color: var(--bcs-primary); background: #F3FAF7; }

/* Collapsible "more details" (step 5 notes) */
.bcs-more-details { margin-top: 22px; border-top: 1px solid #E2E8E5; padding-top: 16px; }
.bcs-more-details summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--bcs-primary); list-style: none; }
.bcs-more-details summary::-webkit-details-marker { display: none; }
.bcs-more-details summary::before { content: '+ '; }
.bcs-more-details[open] summary::before { content: '− '; }

.bcs-choice-block { margin-bottom: 18px; }
.bcs-choice-block__label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 8px; }

/* Fields */
.bcs-field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.bcs-field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; color: #374151; }
.bcs-field--wide { grid-column: 1 / -1; }
.bcs-field--checkbox { flex-direction: row; align-items: center; gap: 8px; }
.bcs-field input[type=text],
.bcs-field input[type=email],
.bcs-field input[type=tel],
.bcs-field input[type=number],
.bcs-field input[type=date],
.bcs-field select,
.bcs-field textarea {
	font-family: var(--bcs-font-body);
	font-weight: 400;
	padding: 11px 13px;
	border: 1px solid #D7DEDA;
	border-radius: calc(var(--bcs-radius) / 2);
	font-size: 14px;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.bcs-field input:focus, .bcs-field select:focus, .bcs-field textarea:focus {
	outline: none;
	border-color: var(--bcs-rinse);
	box-shadow: 0 0 0 3px rgba(46,155,214,.15);
}

/* Addons */
.bcs-addon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.bcs-addon-card {
	display: flex;
	align-items: center;
	gap: 10px;
	border: 1px solid #E2E8E5;
	border-radius: var(--bcs-radius);
	padding: 13px 15px;
	cursor: pointer;
	font-size: 14px;
	background: #fff;
	transition: border-color .15s;
}
.bcs-addon-card { transition: border-color .15s, box-shadow .15s, transform .15s; }
.bcs-addon-card:hover { transform: translateY(-1px); box-shadow: var(--bcs-shadow-sm); }
.bcs-addon-card:has(input:checked) { border-color: var(--bcs-primary); background: #F3FAF7; box-shadow: 0 0 0 1px var(--bcs-primary) inset; }
.bcs-addon-card__name { flex: 1; font-weight: 600; }
.bcs-addon-card__price { font-family: var(--bcs-font-mono); color: #5B6B64; font-size: 12.5px; }

/* Slot picker */
.bcs-slot-list { margin-top: 14px; }
.bcs-slot-group-label { font-size: 12px; font-weight: 600; color: #6B7A73; margin: 14px 0 8px; }
.bcs-slot-group-label:first-child { margin-top: 0; }
.bcs-slot-row { display: flex; flex-wrap: wrap; gap: 8px; }
.bcs-slot-btn {
	padding: 9px 15px;
	border: 1px solid #D7DEDA;
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	font-size: 13px;
	font-family: var(--bcs-font-mono);
}
.bcs-slot-btn { transition: border-color .15s, transform .1s, box-shadow .15s; }
.bcs-slot-btn:hover { border-color: var(--bcs-rinse); }
.bcs-slot-btn.is-selected {
	background: linear-gradient(135deg, var(--bcs-primary), var(--bcs-primary-dark));
	border-color: var(--bcs-primary);
	color: #fff;
	box-shadow: 0 4px 10px rgba(11,110,92,.22);
}

/* Payment / gateway choice */
.bcs-payment-choice, .bcs-gateway-choice { display: flex; gap: 18px; margin: 18px 0; flex-wrap: wrap; }
.bcs-radio { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; }

.bcs-confirm-result { margin: 18px 0; padding: 15px 18px; border-radius: var(--bcs-radius); font-size: 14px; }
.bcs-confirm-result.is-success { background: #E7F6EF; color: #0B6E5C; }
.bcs-confirm-result.is-error { background: #FDECEC; color: #B42318; }

/* Receipt-style sticky summary */
.bcs-summary {
	flex: 0 0 310px;
	position: sticky;
	top: 20px;
	background: #fff;
	border: 1px solid #E2E8E5;
	border-radius: calc(var(--bcs-radius) + 4px);
	padding: 22px;
	box-shadow: var(--bcs-shadow-md);
}
.bcs-summary h3 {
	font-family: var(--bcs-font-display);
	margin: 0 0 16px;
	font-size: 16px;
	font-weight: 600;
}
.bcs-summary__lines div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
	padding: 7px 0;
	color: #5B6B64;
	border-bottom: 1px dashed #D7DEDA;
}
.bcs-summary__lines dd { font-family: var(--bcs-font-mono); }
.bcs-summary__total {
	font-weight: 700;
	font-size: 16px;
	color: var(--bcs-ink);
	border-bottom: none !important;
	margin-top: 4px;
	padding-top: 12px !important;
	border-top: 1px solid var(--bcs-ink);
}
.bcs-summary__total dd {
	font-family: var(--bcs-font-mono);
	font-size: 19px;
	font-weight: 700;
	background: linear-gradient(135deg, var(--bcs-primary), var(--bcs-rinse));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

/* Mobile collapsible summary toggle (hidden on desktop) */
.bcs-summary__toggle {
	display: none;
	width: 100%;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	align-items: center;
	justify-content: space-between;
	font-family: var(--bcs-font-body);
	font-weight: 600;
	font-size: 14px;
}
.bcs-summary__toggle-total { font-family: var(--bcs-font-mono); color: var(--bcs-primary); }

/* Step transition — a single fade/slide on the active panel only */
.bcs-step { animation: bcs-step-in .25s ease; }
@keyframes bcs-step-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
	.bcs-step { animation: none; }
}

/* Buttons */
.bcs-btn {
	display: inline-block;
	padding: 13px 26px;
	border-radius: var(--bcs-radius);
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	border: none;
	font-family: var(--bcs-font-body);
	transition: transform .1s, opacity .15s, box-shadow .15s;
}
.bcs-btn:active { transform: scale(.98); }
.bcs-btn--primary {
	background: linear-gradient(135deg, var(--bcs-button), var(--bcs-primary-dark));
	color: #fff;
	box-shadow: 0 6px 16px rgba(11,110,92,.28);
}
.bcs-btn--primary:hover { opacity: .94; box-shadow: 0 8px 20px rgba(11,110,92,.34); }
.bcs-btn--ghost { background: transparent; color: #374151; border: 1px solid #D7DEDA; }
.bcs-btn--ghost:hover { border-color: #B7C2BC; }
.bcs-btn--block { display: block; width: 100%; text-align: center; margin-top: 8px; }

.bcs-nav { display: flex; justify-content: space-between; margin-top: 28px; }

.bcs-empty { color: #9CA8A2; font-size: 14px; }

/* Mobile: single column, sticky CTA (spec section 27) */
@media (max-width: 782px) {
	.bcs-booking-form { padding: 0 4px; }
	.bcs-booking-form__layout { flex-direction: column; }
	.bcs-summary { position: static; width: 100%; order: -1; padding: 16px 18px; }
	.bcs-summary__toggle { display: flex; }
	.bcs-summary__body { display: none; margin-top: 14px; }
	.bcs-summary.is-expanded .bcs-summary__body { display: block; }

	/* Progress bar: labels get cramped/overlap at phone widths — show only
	   the numbered/checkmark dots plus a "Step X of 6" caption instead. */
	.bcs-progress__step span { display: none; }
	.bcs-progress-caption { display: block; }

	/* The nav previously put two width:100% buttons in one flex row, which
	   squeezed each to ~50% instead of stacking — fixed by stacking full-
	   width, primary action first for easy thumb reach. */
	.bcs-nav {
		position: sticky;
		bottom: 0;
		background: #FAFBFA;
		padding: 12px 4px;
		border-top: 1px solid #E2E8E5;
		flex-direction: column-reverse;
		gap: 10px;
	}
	.bcs-btn { width: 100%; text-align: center; min-height: 46px; }

	.bcs-service-grid, .bcs-addon-grid, .bcs-field-grid { grid-template-columns: 1fr; }

	/* Segmented controls (property type, frequency): scroll horizontally
	   instead of wrapping to 2-3 ragged rows on a narrow screen. */
	.bcs-segmented { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
	.bcs-segmented__btn { flex: 0 0 auto; }

	/* Larger touch targets throughout (44px+ per accessibility guidance). */
	.bcs-slot-btn { padding: 11px 16px; }
	.bcs-service-card, .bcs-addon-card, .bcs-toggle-card { padding: 16px; }

	.bcs-payment-choice, .bcs-gateway-choice { flex-direction: column; gap: 10px; }
	.bcs-radio { padding: 10px 12px; border: 1px solid #E2E8E5; border-radius: calc(var(--bcs-radius) / 2); }
}

@media (prefers-reduced-motion: reduce) {
	.bcs-service-card, .bcs-btn { transition: none; }
}

/* Customer dashboard */
.bcs-dashboard-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.bcs-dashboard-table th { text-align: left; font-size: 12px; text-transform: none; color: #5B6B64; padding: 8px 10px; border-bottom: 1px solid #E2E8E5; }
.bcs-dashboard-table td { padding: 12px 10px; border-bottom: 1px solid #EEF2F0; }
.bcs-dashboard-modal { border: none; border-radius: var(--bcs-radius); padding: 24px; max-width: 400px; }
.bcs-dashboard-modal::backdrop { background: rgba(17,24,39,.4); }
.bcs-dashboard-modal label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.bcs-dashboard-modal input, .bcs-dashboard-modal select, .bcs-dashboard-modal textarea {
	display: block; width: 100%; margin-top: 6px; padding: 9px 11px;
	border: 1px solid #D7DEDA; border-radius: 8px; font-family: var(--bcs-font-body);
}

/* Quick (single-page) booking form — [cleaning_booking_form_quick].
   One card, no step navigation: reuses the same tokens, slot/button
   styles as the full wizard so it feels like the same product. */
.bcs-quick-form {
	--bcs-primary: #0B6E5C;
	--bcs-primary-dark: #085246;
	--bcs-rinse: #2E9BD6;
	--bcs-ink: #111827;
	--bcs-radius: 14px;
	--bcs-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	--bcs-font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
	--bcs-shadow-sm: 0 1px 2px rgba(17,24,39,.04), 0 1px 3px rgba(17,24,39,.06);
	--bcs-shadow-md: 0 10px 30px -10px rgba(17,24,39,.14), 0 2px 8px rgba(17,24,39,.05);
	font-family: var(--bcs-font-body);
	max-width: 640px;
	margin: 0 auto;
	color: var(--bcs-ink);
	box-sizing: border-box;
}
.bcs-quick-form *, .bcs-quick-form *::before, .bcs-quick-form *::after { box-sizing: border-box; }

.bcs-quick-card {
	background: #fff;
	border: 1px solid #E2E8E5;
	border-radius: calc(var(--bcs-radius) + 6px);
	padding: 28px;
	box-shadow: var(--bcs-shadow-md);
	display: flex;
	flex-direction: column;
	gap: 18px;
	transition: opacity .2s;
}
.bcs-quick-card.is-done { opacity: .7; }

.bcs-quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bcs-quick-field { display: flex; flex-direction: column; gap: 6px; }
.bcs-quick-field--wide { grid-column: 1 / -1; }
.bcs-quick-field label { font-size: 13px; font-weight: 600; color: #374151; }
.bcs-quick-field input[type=text],
.bcs-quick-field input[type=email],
.bcs-quick-field input[type=tel],
.bcs-quick-field input[type=date],
.bcs-quick-field select {
	font-family: var(--bcs-font-body);
	font-weight: 400;
	padding: 12px 14px;
	border: 1px solid #D7DEDA;
	border-radius: calc(var(--bcs-radius) / 2);
	font-size: 14.5px;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
	width: 100%;
}
.bcs-quick-field input:focus, .bcs-quick-field select:focus {
	outline: none;
	border-color: var(--bcs-rinse);
	box-shadow: 0 0 0 3px rgba(46,155,214,.15);
}
.bcs-quick-field select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235B6B64' stroke-width='1.6' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E") no-repeat right 14px center; }

.bcs-quick-divider { height: 1px; background: #EEF2F0; margin: 2px 0; }

.bcs-quick-slots { min-height: 44px; display: flex; align-items: center; }
.bcs-quick-slots .bcs-slot-row { flex-wrap: wrap; }

.bcs-quick-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 6px;
	padding-top: 18px;
	border-top: 1px dashed #D7DEDA;
	flex-wrap: wrap;
}
.bcs-quick-total { display: flex; flex-direction: column; gap: 2px; }
.bcs-quick-total__label { font-size: 12px; color: #6B7A73; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.bcs-quick-total__value {
	font-family: var(--bcs-font-mono);
	font-size: 22px;
	font-weight: 700;
	background: linear-gradient(135deg, var(--bcs-primary), var(--bcs-rinse));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
.bcs-quick-footer .bcs-btn { flex: 1 1 220px; min-width: 200px; }

@media (max-width: 560px) {
	.bcs-quick-card { padding: 20px; border-radius: var(--bcs-radius); }
	.bcs-quick-row { grid-template-columns: 1fr; }
	.bcs-quick-footer { flex-direction: column; align-items: stretch; }
	.bcs-quick-total { flex-direction: row; align-items: baseline; justify-content: space-between; }
}

/* WhatsApp support button */
.bcs-whatsapp-button {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background: #25D366;
	color: #fff;
	border-radius: 999px;
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 18px rgba(0,0,0,.18);
	text-decoration: none;
	font-size: 24px;
	z-index: 9999;
}
