/**
 * Service wizard summary box (all layouts: classic, accordion, popup).
 * Colors: Service tokens (--bk-svc-summary-*, theme defaults). The Popups → Summary box settings
 * belong to the archive Book popup only, so they are reset on the service wrapper below.
 * Typography: Settings → Styling → Headings / Body (--bk-heading-*, --bk-body-*).
 */

.service-booking {
	--bk-popup-summary-bg: var(--bk-svc-summary-bg);
	--bk-popup-summary-text: var(--bk-svc-summary-text);
	--bk-popup-summary-border-color: var(--bk-svc-shell-border);
	--bk-popup-summary-divider: var(--bk-svc-shell-border);
	--bk-popup-summary-border-width: 1px;
	--bk-popup-summary-border-radius: 8px;
	--bk-popup-summary-dividers: 1;
}

.service-booking .booking-summary {
	background: var(--bk-popup-summary-bg, var(--bk-svc-summary-bg, #f8f9fa));
	border: var(--bk-popup-summary-border-width, 1px) solid
		var(--bk-popup-summary-border-color, var(--bk-svc-shell-border, #e2e8f0));
	border-radius: var(--bk-popup-summary-border-radius, var(--bs-radius-sm, 8px));
	padding: 1rem 1.1rem;
	margin-bottom: 1rem;
	box-sizing: border-box;
	font-family: var(--bk-body-font-family, inherit);
	font-size: var(--bk-svc-wizard-body-font-size, var(--bk-body-font-size, 1rem));
	color: var(
		--bk-popup-summary-text,
		var(--bk-svc-summary-text, var(--bk-body-color, #1c1917))
	);
}

.service-booking .booking-summary :is(
	.summary-item,
	.summary-item span,
	.summary-total,
	.summary-total span,
	.summary-total strong,
	#summary-extras-list
) {
	color: inherit;
}

.service-booking .booking-summary .summary-item {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: 0.45rem 0;
	margin: 0;
	border-bottom: calc(var(--bk-popup-summary-dividers, 1) * 1px) solid var(
		--bk-popup-summary-divider,
		var(
			--bk-popup-summary-text,
			var(--bk-svc-summary-text, var(--bk-body-color, currentColor))
		)
	);
}

/* Labels in capitals, like the summaries of the other booking modules. */
.service-booking .booking-summary .summary-item > span:first-child {
	font-family: var(--bk-heading-font-family, inherit);
	font-weight: 700;
	font-size: var(--bk-svc-wizard-label-font-size, inherit);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	line-height: 1.35;
}

.service-booking .booking-summary .summary-item > span:not(:first-child),
.service-booking .booking-summary .summary-item #summary-extras-list {
	font-family: var(--bk-body-font-family, inherit);
	font-size: var(--bk-svc-wizard-body-font-size, inherit);
	font-weight: 400;
	line-height: 1.45;
	text-align: right;
}

/* Total row supplies the separator above it — avoid double rule with the last detail row. */
.service-booking .booking-summary .summary-item--extras {
	border-bottom: none;
}

/* Fee rows sit above Total — one divider above the block, one on .summary-total (not per fee row). */
.service-booking .booking-summary .summary-fees-wrap:not([hidden]) {
	border-top: calc(var(--bk-popup-summary-dividers, 1) * 1px) solid var(
		--bk-popup-summary-divider,
		var(
			--bk-popup-summary-text,
			var(--bk-svc-summary-text, var(--bk-body-color, currentColor))
		)
	);
	padding-top: 0.45rem;
	margin-top: 0;
}

.service-booking .booking-summary .summary-fees-wrap .summary-item--fee {
	border-bottom: none;
	padding-bottom: 0;
}

.service-booking .booking-summary .summary-item--tax {
	border-bottom: none;
	border-top: none;
	padding-bottom: 0;
}

.service-booking .booking-summary .summary-item--tax-after-total {
	border-top: none;
	padding-top: 0.35rem;
	margin-top: 0;
	text-align: right;
}

.service-booking .booking-summary .summary-item--tax .bs-booking-tax-note,
.service-booking .booking-summary .summary-item--tax-after-total .bs-booking-tax-note {
	margin: 0;
	font-size: 0.72rem;
	line-height: 1.35;
	opacity: 0.92;
	color: inherit;
}

.service-booking .booking-summary .summary-total {
	margin-top: 0.85rem;
	padding-top: 0.85rem;
	border-top: calc(var(--bk-popup-summary-dividers, 1) * 1px) solid var(
		--bk-popup-summary-divider,
		var(
			--bk-popup-summary-text,
			var(--bk-svc-summary-text, var(--bk-body-color, currentColor))
		)
	);
	text-align: right;
	font-size: var(--bk-svc-wizard-total-font-size, 1rem);
	font-family: var(--bk-body-font-family, inherit);
}

/* Pay-on-location notice: right-aligned under tax line in summary step. */
.service-booking .booking-summary + .booking-wizard-pay-on-site-notice,
.service-booking .bs-svc-panel--summary > .booking-wizard-pay-on-site-notice {
	display: block;
	width: 100%;
	max-width: none;
	margin: 0.35rem 0 0;
	padding: 0;
	text-align: right;
	box-sizing: border-box;
	line-height: 1.35;
	font-size: var(--bk-svc-wizard-body-font-size, 0.8125rem);
	font-weight: 600;
	/* Service has no pay-notice setting: theme body text (not the Combined tab). */
	color: var(--bk-body-color, inherit);
}

.service-booking .booking-summary .summary-total strong {
	font-family: var(--bk-heading-font-family, inherit);
	font-weight: 700;
	color: inherit;
}
