.clinic-booking-widget {
	--cb-color: #216e62;
	--cb-color-dark: #18564d;
	--cb-border: #d7dddb;
	--cb-bg-soft: #f5f8f7;
	--cb-text: #202624;
	box-sizing: border-box;
	color: var(--cb-text);
	font-size: 16px;
	line-height: 1.6;
	margin: 24px auto;
	max-width: 720px;
}

.clinic-booking-widget *,
.clinic-booking-widget *::before,
.clinic-booking-widget *::after { box-sizing: inherit; }
.clinic-booking-widget [hidden] { display: none !important; }
.clinic-booking-widget button,
.clinic-booking-widget input { font: inherit; }
.clinic-booking-widget h2 { font-size: 1.35rem; margin: 0 0 8px; }

.cb-progress {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 4px;
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.cb-progress li {
	background: var(--cb-bg-soft);
	border-radius: 6px;
	color: #66706d;
	font-size: 13px;
	padding: 7px 3px;
	text-align: center;
}
.cb-progress li span { display: block; }
.cb-progress li.is-current { background: var(--cb-color); color: #fff; font-weight: 700; }

.cb-step {
	background: #fff;
	border: 1px solid var(--cb-border);
	border-radius: 10px;
	padding: clamp(18px, 4vw, 30px);
}

.cb-card-list { display: grid; gap: 12px; margin: 20px 0; }
.cb-card {
	align-items: center;
	background: #fff;
	border: 2px solid var(--cb-border);
	border-radius: 9px;
	color: inherit;
	cursor: pointer;
	display: flex;
	gap: 14px;
	min-height: 68px;
	padding: 14px;
	text-align: left;
	width: 100%;
}
.cb-card:hover, .cb-card:focus { border-color: var(--cb-color); outline: none; }
.cb-card.is-selected { background: var(--cb-bg-soft); border-color: var(--cb-color); }
.cb-card img { border-radius: 50%; flex: 0 0 56px; height: 56px; object-fit: cover; width: 56px; }
.cb-card-body { display: block; flex: 1; }
.cb-card-title { display: block; font-size: 1.05rem; font-weight: 700; }
.cb-card-meta, .cb-card-description { display: block; font-size: .9rem; margin-top: 3px; }
.cb-card-description { color: #59615f; }

.cb-field { display: block; margin: 0 0 18px; }
.cb-field > span { display: block; font-weight: 700; margin-bottom: 5px; }
.cb-field em { background: #b32d2e; border-radius: 3px; color: #fff; font-size: 11px; font-style: normal; padding: 2px 5px; }
.cb-field small { color: #66706d; font-weight: 400; }
.cb-field input {
	background: #fff;
	border: 1px solid #8c9693;
	border-radius: 6px;
	font-size: 16px;
	min-height: 48px;
	padding: 9px 11px;
	width: 100%;
}
.cb-fieldset { border: 0; margin: 0 0 20px; padding: 0; }
.cb-fieldset legend { font-weight: 700; margin-bottom: 8px; }
.cb-fieldset label { display: block; margin: 9px 0; }
.cb-fieldset input { height: 20px; vertical-align: middle; width: 20px; }

.cb-button {
	background: var(--cb-color);
	border: 0;
	border-radius: 7px;
	color: #fff;
	cursor: pointer;
	font-weight: 700;
	min-height: 48px;
	padding: 11px 18px;
}
.cb-button:hover, .cb-button:focus { background: var(--cb-color-dark); color: #fff; }
.cb-button:disabled { cursor: wait; opacity: .6; }
.cb-button-secondary { background: #eef1f0; color: var(--cb-text); }
.cb-button-secondary:hover, .cb-button-secondary:focus { background: #dfe5e3; color: var(--cb-text); }
.cb-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 22px; }

.cb-time-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 18px 0; }
.cb-time { background: #fff; border: 2px solid var(--cb-color); border-radius: 7px; color: var(--cb-color-dark); cursor: pointer; min-height: 46px; }
.cb-time:hover, .cb-time:focus, .cb-time.is-selected { background: var(--cb-color); color: #fff; }
.cb-week-nav {
	align-items: center;
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 10px;
	margin: 16px 0;
	text-align: center;
}
.cb-week-nav .cb-button { min-height: 42px; padding: 8px 12px; }
.cb-week-scroll {
	border: 1px solid var(--cb-border);
	margin: 14px 0 20px;
	max-height: min(65vh, 680px);
	overflow: auto;
}
.cb-week-table {
	background: #fff;
	border-collapse: separate;
	border-spacing: 0;
	min-width: 590px;
	width: 100%;
}
.cb-week-table th,
.cb-week-table td {
	border-bottom: 1px solid var(--cb-border);
	border-right: 1px solid var(--cb-border);
	height: 52px;
	min-width: 68px;
	padding: 3px;
	text-align: center;
}
.cb-week-table thead th {
	background: var(--cb-bg-soft);
	position: sticky;
	top: 0;
	z-index: 3;
}
.cb-week-time-head,
.cb-week-time {
	background: var(--cb-bg-soft);
	left: 0;
	min-width: 70px !important;
	position: sticky;
	z-index: 2;
}
.cb-week-time-head { z-index: 4 !important; }
.cb-week-date strong,
.cb-week-date span { display: block; line-height: 1.2; }
.cb-week-date.is-today { box-shadow: inset 0 3px 0 var(--cb-color); }
.cb-week-date.is-saturday { color: #2768a8; }
.cb-week-date.is-sunday { color: #b32d2e; }
.cb-week-open {
	background: #fff;
	border: 2px solid var(--cb-color);
	border-radius: 50%;
	color: var(--cb-color-dark);
	cursor: pointer;
	font-size: 20px;
	font-weight: 700;
	height: 42px;
	line-height: 1;
	width: 42px;
}
.cb-week-open:hover,
.cb-week-open:focus,
.cb-week-open.is-selected { background: var(--cb-color); color: #fff; outline: none; }
.cb-week-tel {
	align-items: center;
	background: #fff3cd;
	border: 2px solid #d39e00;
	border-radius: 7px;
	color: #5f4700;
	cursor: pointer;
	display: inline-flex;
	flex-direction: column;
	font-weight: 700;
	height: 44px;
	justify-content: center;
	line-height: 1;
	min-width: 48px;
	padding: 3px 7px;
}
.cb-week-tel:hover,
.cb-week-tel:focus { background: #ffe69c; border-color: #a77b00; outline: 2px solid transparent; }
.cb-week-tel-mark { font-size: 17px; }
.cb-week-tel-label { font-size: 10px; letter-spacing: .04em; margin-top: 2px; }
.cb-week-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	list-style: none;
	margin: 10px 0;
	padding: 0;
}
.cb-week-legend li { align-items: center; display: inline-flex; font-size: 13px; gap: 5px; }
.cb-legend-open { color: var(--cb-color-dark); font-size: 18px; font-weight: 700; }
.cb-legend-tel { background: #fff3cd; border: 1px solid #d39e00; border-radius: 4px; color: #5f4700; font-size: 11px; font-weight: 700; padding: 2px 5px; }
.cb-legend-unavailable { color: #7b3334; font-size: 18px; }
.cb-legend-outside { color: #9ba29f; font-size: 18px; }
.cb-tel-dialog {
	background: #fff;
	border: 0;
	border-radius: 12px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
	color: var(--cb-text);
	max-width: min(440px, calc(100vw - 32px));
	padding: 24px;
	text-align: center;
}
.cb-tel-dialog::backdrop { background: rgba(20, 28, 26, .55); }
.cb-tel-dialog h2 { margin-bottom: 12px; }
.cb-tel-dialog [data-tel-dialog-time] { font-weight: 700; }
.cb-tel-dialog .cb-button { min-width: 120px; }
.cb-week-unavailable { color: #7b3334; font-size: 19px; }
.cb-week-outside { color: #9ba29f; }
.cb-loading, .cb-empty { background: var(--cb-bg-soft); border-radius: 6px; margin: 15px 0; padding: 12px; }
.cb-message { border-radius: 7px; margin-bottom: 14px; padding: 12px 14px; }
.cb-message.is-error { background: #fcf0f1; border: 1px solid #d63638; color: #8a2424; }
.cb-message.is-success { background: #edfaef; border: 1px solid #00a32a; color: #155724; }
.cb-button-danger { background: #b32d2e; }
.cb-button-danger:hover, .cb-button-danger:focus { background: #8a2424; }
.cb-manage-link { display: inline-block; text-decoration: none; }
.cb-policy { background: var(--cb-bg-soft); border-left: 4px solid var(--cb-color); padding: 12px; white-space: pre-wrap; }

.cb-confirm, .cb-complete dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; }
.cb-confirm dt, .cb-complete dt { font-weight: 700; }
.cb-confirm dd, .cb-complete dd { margin: 0; overflow-wrap: anywhere; }
.cb-complete { text-align: center; }
.cb-complete dl { margin: 22px auto; max-width: 480px; text-align: left; }

@media (max-width: 520px) {
	.clinic-booking-widget { font-size: 15px; margin: 14px auto; }
	.cb-progress li { font-size: 11px; }
	.cb-progress li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.cb-step { border-left: 0; border-radius: 0; border-right: 0; padding-left: 14px; padding-right: 14px; }
	.cb-time-grid { grid-template-columns: repeat(3, 1fr); }
	.cb-week-nav { grid-template-columns: 1fr 1fr; }
	.cb-week-nav strong { grid-column: 1 / -1; grid-row: 1; }
	.cb-week-nav [data-week-prev] { grid-column: 1; grid-row: 2; }
	.cb-week-nav [data-week-next] { grid-column: 2; grid-row: 2; }
	.cb-week-scroll { margin-left: -14px; margin-right: -14px; max-height: 62vh; }
	.cb-week-legend { gap: 5px 10px; }
	.cb-week-legend li { font-size: 12px; }
	.cb-actions { flex-direction: column-reverse; }
	.cb-actions .cb-button { width: 100%; }
	.cb-confirm, .cb-complete dl { grid-template-columns: 90px 1fr; }
}
.cb-ancillary-options { display: grid; gap: 12px; margin-top: 12px; }
.cb-ancillary-option { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 16px; border: 1px solid #ccd5dc; border-radius: 10px; background: #fff; cursor: pointer; font-size: 1rem; }
.cb-ancillary-option input { width: 22px; height: 22px; flex: 0 0 auto; }
.cb-symptom-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.cb-symptom-option { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border: 1px solid #ccd5dc; border-radius: 8px; background: #fff; cursor: pointer; }
.cb-symptom-option input { width: 22px; height: 22px; flex: 0 0 auto; }
.cb-symptom-other-field { margin-top: 16px; }
.cb-symptom-other-field textarea { background: #fff; border: 1px solid #8c9693; border-radius: 6px; box-sizing: border-box; font-size: 16px; line-height: 1.6; min-height: 96px; padding: 9px 11px; resize: vertical; width: 100%; }
.cb-symptom-other-field > small { display: block; margin-top: 6px; }
.cb-preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 520px) { .cb-symptom-options { grid-template-columns: 1fr; } }
