/* Smart Booking – frontend v1.1 (matches 4-step card design) */
.sb-form-wrap {
	--sb-primary: #2563eb;
	--sb-primary-d: #1d4ed8;
	--sb-primary-l: #eff4ff;
	--sb-ink: #0f172a;
	--sb-text: #334155;
	--sb-muted: #64748b;
	--sb-line: #e2e8f0;
	--sb-bg: #f8fafc;
	--sb-green: #16a34a;
	--sb-btn-text: #ffffff;
	--sb-card: #ffffff;
	--sb-green-l: #f0fdf4;
	--sb-radius: 10px;
	max-width: 560px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--sb-ink);
	box-sizing: border-box;
	line-height: 1.45;
}
.sb-form-wrap *, .sb-form-wrap *::before, .sb-form-wrap *::after { box-sizing: border-box; }
.sb-form-wrap [hidden] { display: none !important; }
.sb-form-wrap svg { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.sb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sb-hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.sb-card-fe {
	position: relative;
	background: var(--sb-card);
	border: 1px solid var(--sb-line);
	border-radius: 16px;
	padding: 10px 28px 28px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

/* ---------- Progress ---------- */
.sb-progress { display: flex; align-items: center; list-style: none; margin: 0 0 26px; padding: 0; }
.sb-step-ind { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; position: relative; }
.sb-step-ind:not(:last-child) { flex: 1 1 auto; }
.sb-step-ind:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: var(--sb-line); margin: 0 10px; min-width: 14px; }
.sb-step-ind.sb-done:not(:last-child)::after { background: var(--sb-primary); }
.sb-dot {
	width: 30px; height: 30px; border-radius: 50%; flex: none;
	display: inline-flex; align-items: center; justify-content: center;
	border: 2px solid var(--sb-line); color: var(--sb-muted);
	font-size: 13px; font-weight: 700; background: #fff; transition: all .2s;
}
.sb-dot-check { display: none; }
.sb-step-ind.sb-active .sb-dot { background: var(--sb-primary); border-color: var(--sb-primary); color: var(--sb-btn-text); box-shadow: 0 0 0 4px var(--sb-primary-l); }
.sb-step-ind.sb-done .sb-dot { background: var(--sb-primary); border-color: var(--sb-primary); color: var(--sb-btn-text); }
.sb-step-ind.sb-done .sb-dot-num { display: none; }
.sb-step-ind.sb-done .sb-dot-check { display: inline; font-size: 12px; }
.sb-step-text { display: none; flex-direction: column; line-height: 1.2; }
.sb-step-text strong { font-size: 13px; font-weight: 700; color: var(--sb-ink); }
.sb-step-text small { font-size: 11px; color: var(--sb-muted); }
.sb-step-ind.sb-active .sb-step-text { display: flex; }

/* ---------- Headings ---------- */
.sb-step-title { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: var(--sb-ink); }
.sb-step-sub { margin: 0 0 18px; font-size: 13.5px; color: var(--sb-muted); }
.sb-error-banner { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: var(--sb-radius); padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px; }

/* ---------- Fields ---------- */
/* Step-1 field grid: half-width fields sit two per row (First/Last name) */
.sb-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.sb-fields-grid .sb-field { grid-column: 1 / -1; }
.sb-fields-grid .sb-field.sb-half { grid-column: auto / span 1; }
@media (max-width: 480px) { .sb-fields-grid .sb-field.sb-half { grid-column: 1 / -1; } }

.sb-field { margin-bottom: 16px; position: relative; }
.sb-label { display: block; font-size: 13.5px; font-weight: 700; color: var(--sb-ink); margin: 0 0 7px; }
.sb-req { color: #dc2626; margin-left: 2px; font-weight: 700; }

/* Phone input with country-code selector */
.sb-phone-row { display: flex; align-items: stretch; }
.sb-phone-row .sb-cc {
	width: auto; min-width: 72px; flex: none; border-top-right-radius: 0; border-bottom-right-radius: 0;
	border-right: 0; padding: 12px 8px; font-size: 12px; font-weight: 700; letter-spacing: .02em;
	color: var(--sb-ink) !important; background-color: #eee; cursor: pointer;
}
.sb-phone-row input[type="tel"] { border-top-left-radius: 0; border-bottom-left-radius: 0; flex: 1; min-width: 0; }
.sb-phone-row:focus-within .sb-cc { border-color: var(--sb-primary); }
.sb-field.sb-invalid .sb-phone-row .sb-cc { border-color: #ef4444; }
.sb-field input, .sb-field select, .sb-field textarea {
	width: 100%;
	font: inherit;
	font-size: 16px;
	color: var(--sb-ink);
	background: #eee;
	border: 1px solid var(--sb-line);
	border-radius: var(--sb-radius);
	padding: 13px 14px;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
	-webkit-appearance: none;
	appearance: none;
}
.sb-field input::placeholder, .sb-field textarea::placeholder { color: #94a3b8; }
.sb-field select { color: #94a3b8; padding-right: 40px; cursor: pointer; }
.sb-field select:has(option:checked:not([value=""])) { color: var(--sb-ink); }
.sb-select-wrap::after { content: ""; position: absolute; right: 16px; top: 17px; width: 8px; height: 8px; border-right: 2px solid var(--sb-muted); border-bottom: 2px solid var(--sb-muted); transform: rotate(45deg); pointer-events: none; }
.sb-field textarea { min-height: 96px; resize: vertical; }
.sb-field input:focus, .sb-field select:focus, .sb-field textarea:focus { border-color: var(--sb-primary); box-shadow: 0 0 0 3px var(--sb-primary-l); }
.sb-field.sb-invalid input, .sb-field.sb-invalid select { border-color: #ef4444; }
.sb-field-error { display: block; font-size: 12px; color: #dc2626; margin-top: 4px; min-height: 0; }
.sb-field-error:empty { display: none; }


/* Checkbox field */
.sb-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--sb-text); cursor: pointer; padding: 4px 2px; }
.sb-check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--sb-primary); flex: none; }

/* ---------- Buttons ---------- */
.sb-btn-fe {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font: inherit; font-size: 14px; font-weight: 600; line-height: 1;
	padding: 12px 18px; border-radius: var(--sb-radius); border: 1px solid transparent;
	cursor: pointer; text-decoration: none; transition: all .15s;
}
.sb-btn-fe .sb-arrow { font-size: 15px; }
.sb-primary { background: var(--sb-primary); color: var(--sb-btn-text); }
.sb-primary:hover { background: var(--sb-primary-d); color: var(--sb-btn-text); }
.sb-primary:disabled { background: #cbd5e1; cursor: not-allowed; }
.sb-ghost { background: #fff; color: var(--sb-text); border-color: var(--sb-line); }
.sb-ghost:hover { background: var(--sb-bg); }
.sb-outline { background: #fff; color: var(--sb-primary); border-color: var(--sb-line); flex: 1; padding: 12px 14px; }
.sb-outline:hover { border-color: var(--sb-primary); background: var(--sb-primary-l); }
.sb-block { width: 100%; padding: 14px; font-size: 15px; margin-top: 6px; }
.sb-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.sb-secure { text-align: center; font-size: 12px; color: var(--sb-muted); margin: 12px 0 0; }
.sb-secure svg { width: 12px; height: 12px; }

/* ---------- Calendar ---------- */
.sb-calendar { position: relative; border: 1px solid var(--sb-line); border-radius: 12px; padding: 14px 14px 12px; }
.sb-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sb-cal-title { font-size: 14.5px; font-weight: 700; }
.sb-cal-nav { width: 30px; height: 30px; border: none; background: transparent; border-radius: 8px; font-size: 20px; line-height: 1; cursor: pointer; color: var(--sb-text); }
.sb-cal-nav:hover { background: var(--sb-bg); }
.sb-cal-nav:disabled { opacity: .3; cursor: default; }
.sb-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px 2px; text-align: center; }
.sb-cal-dow { font-size: 11.5px; font-weight: 600; color: var(--sb-muted); padding: 4px 0 6px; }
.sb-cal-day {
	height: 34px; border: none; background: transparent; border-radius: 50%;
	font: inherit; font-size: 13px; font-weight: 600; color: var(--sb-ink); cursor: pointer;
	width: 34px; margin: 0 auto; display: flex; align-items: center; justify-content: center; transition: all .12s;
}
.sb-cal-day:disabled { color: #cbd5e1; cursor: default; font-weight: 500; }
.sb-cal-day.sb-avail:hover { background: var(--sb-primary-l); color: var(--sb-primary); }
.sb-cal-day.sb-today { color: var(--sb-primary); }
.sb-cal-day.sb-selected, .sb-cal-day.sb-selected:hover { background: var(--sb-primary); color: var(--sb-btn-text); }
.sb-cal-selected { text-align: center; font-size: 13.5px; font-weight: 700; margin-top: 10px; min-height: 20px; }
.sb-cal-loading, .sb-overlay { position: absolute; inset: 0; background: rgba(255,255,255,.75); display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: inherit; z-index: 2; font-size: 14px; color: var(--sb-muted); }
.sb-spinner { width: 22px; height: 22px; border: 3px solid var(--sb-line); border-top-color: var(--sb-primary); border-radius: 50%; animation: sb-spin .8s linear infinite; }
@keyframes sb-spin { to { transform: rotate(360deg); } }

/* ---------- Slots ---------- */
.sb-slots { margin-top: 14px; }
.sb-slots-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sb-slots-list .sb-note { grid-column: 1 / -1; text-align: center; font-size: 13.5px; color: var(--sb-muted); margin: 8px 0; }
.sb-slot {
	font: inherit; font-size: 13.5px; font-weight: 600; color: var(--sb-ink);
	background: #fff; border: 1px solid var(--sb-line); border-radius: var(--sb-radius);
	padding: 11px 6px; cursor: pointer; transition: all .12s;
}
.sb-slot:hover { border-color: var(--sb-primary); color: var(--sb-primary); }
.sb-slot.sb-selected { border-color: var(--sb-primary); background: var(--sb-primary-l); color: var(--sb-primary); box-shadow: 0 0 0 1px var(--sb-primary); }
.sb-tz-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--sb-muted); margin: 16px 0 0; }
.sb-tz-note svg { width: 13px; height: 13px; }

/* ---------- Review ---------- */
.sb-review-block { border: 1px solid var(--sb-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.sb-review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sb-review-head .sb-ico { width: 28px; height: 28px; border-radius: 7px; background: var(--sb-primary-l); color: var(--sb-primary); display: inline-flex; align-items: center; justify-content: center; }
.sb-review-head .sb-ico svg { width: 15px; height: 15px; }
.sb-review-head h4 { flex: 1; margin: 0; font-size: 14px; font-weight: 700; }
.sb-edit-link { background: none; border: none; color: var(--sb-primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.sb-edit-link:hover { text-decoration: underline; }
.sb-review-list { margin: 0; padding: 0; }
.sb-review-list > div { display: grid; grid-template-columns: 130px 1fr; gap: 8px; padding: 6px 0; border-top: 1px solid #f1f5f9; font-size: 13.5px; }
.sb-review-list > div:first-child { border-top: none; }
.sb-review-list dt { color: var(--sb-muted); margin: 0; display: flex; align-items: center; gap: 7px; }
.sb-review-list dt svg { width: 14px; height: 14px; color: var(--sb-primary); }
.sb-review-list dd { margin: 0; font-weight: 600; color: var(--sb-ink); word-break: break-word; }
.sb-consent { display: flex; align-items: flex-start; gap: 10px; background: var(--sb-bg); border: 1px solid var(--sb-line); border-radius: var(--sb-radius); padding: 12px 14px; font-size: 13px; color: var(--sb-text); cursor: pointer; }
.sb-consent input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--sb-primary); flex: none; }
.sb-consent a { color: var(--sb-primary); font-weight: 600; }

/* ---------- Success ---------- */
.sb-success-step { text-align: center; }
.sb-success-anim { margin: 6px 0 4px; }
.sb-success-anim svg { width: 180px; height: 150px; }
.sb-ck-circle { transform-origin: 80px 76px; animation: sb-pop .45s cubic-bezier(.2,1.4,.5,1) both; }
.sb-ck-check { stroke-dasharray: 40; stroke-dashoffset: 40; animation: sb-draw .4s .3s ease-out forwards; }
.sb-confetti { animation: sb-float 2.4s ease-in-out infinite alternate; }
@keyframes sb-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes sb-draw { to { stroke-dashoffset: 0; } }
@keyframes sb-float { from { transform: translateY(0); } to { transform: translateY(-4px); } }
.sb-success-title { margin: 0 0 4px; font-size: 21px; font-weight: 800; }
.sb-success-thanks { margin: 0; color: var(--sb-primary); font-weight: 700; font-size: 14px; }
.sb-success-msg { margin: 4px 0 16px; color: var(--sb-muted); font-size: 13.5px; }
.sb-success-msg:empty { margin-bottom: 12px; }
.sb-success-card { background: var(--sb-green-l); border: 1px solid #bbf7d0; border-radius: 12px; padding: 6px 16px; text-align: left; }
.sb-success-card > div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; padding: 9px 0; font-size: 13.5px; border-top: 1px solid #dcfce7; }
.sb-success-card > div:first-child { border-top: none; }
.sb-success-card span { color: var(--sb-text); }
.sb-success-card strong { color: var(--sb-ink); display: flex; align-items: center; gap: 8px; min-width: 0; }
.sb-success-card a { color: var(--sb-primary); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-copy { position: relative; border: 1px solid var(--sb-line); background: #fff; border-radius: 6px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--sb-primary); flex: none; }
.sb-copy svg { width: 13px; height: 13px; }
.sb-copy.sb-copied::after { content: attr(data-tip); position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%); background: var(--sb-ink); color: #fff; font-size: 11px; padding: 3px 7px; border-radius: 5px; white-space: nowrap; }
.sb-cal-links { display: flex; gap: 12px; margin: 16px 0; }
.sb-cal-links svg { width: 16px; height: 16px; }
.sb-info-box { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: var(--sb-bg); border: 1px solid var(--sb-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.sb-info-box > svg { width: 18px; height: 18px; color: var(--sb-primary); margin-top: 2px; }
.sb-info-box strong { display: block; font-size: 13.5px; }
.sb-info-box span { font-size: 12.5px; color: var(--sb-muted); }
.sb-done { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
	.sb-card-fe { padding: 10px 16px 22px; border-radius: 14px; }
	.sb-slots-list { grid-template-columns: repeat(2, 1fr); }
	.sb-review-list > div, .sb-success-card > div { grid-template-columns: 1fr; gap: 2px; }
	.sb-cal-links { flex-direction: column; }
	.sb-step-text small { display: none; }
}
