/* LTV Đặt lịch – kiểu cơ bản. Theme đổi màu qua --an-primary (nền chọn), --an-cta (nút), --an-cta-text, --an-radius. */
.an-bk { --_p: var(--an-primary, #1f2937); --_r: var(--an-radius, 6px); }
.an-bk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-bottom: 18px; }
.an-bk-compact .an-bk-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.an-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.an-f-full { grid-column: 1 / -1; }
.an-f > span { font-weight: 600; font-size: 14px; color: var(--_p); }
.an-f b { color: #c2410c; }
.an-f input:not([type="radio"]), .an-f select, .an-f textarea {
	width: 100%; min-width: 0; font: inherit; font-size: 15px; padding: 11px 13px; border: 1.5px solid #d6d3d1; border-radius: var(--_r); background: #fff; color: inherit;
}
.an-f input:focus, .an-f select:focus, .an-f textarea:focus { outline: none; border-color: var(--_p); box-shadow: 0 0 0 3px color-mix(in srgb, var(--_p) 18%, transparent); }
.an-slot-msg { font-weight: 500; color: #b45309; margin-left: 6px; }
.an-slots { display: flex; flex-wrap: wrap; gap: 8px; min-height: 42px; }
.an-slots[aria-busy="true"] { opacity: .5; }
.an-slot { position: relative; cursor: pointer; }
.an-slot input { position: absolute; opacity: 0; pointer-events: none; }
.an-slot span { display: inline-block; min-width: 68px; text-align: center; padding: 9px 12px; border: 1.5px solid #d6d3d1; border-radius: var(--_r); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; background: #fff; }
.an-slot input:checked + span { background: var(--_p); border-color: var(--_p); color: #fff; }
.an-slot input:focus-visible + span { outline: 2px solid var(--_p); outline-offset: 2px; }
.an-slot.is-full { cursor: not-allowed; }
.an-slot.is-full span { color: #a8a29e; background: #f5f5f4; text-decoration: line-through; }
.an-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.an-bk-err { background: #fef2f2; color: #991b1b; border-radius: var(--_r, 6px); padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.an-btn { display: block; width: 100%; padding: 14px 18px; border: 0; border-radius: var(--an-radius, 6px); background: var(--an-cta, #1f2937); color: var(--an-cta-text, #fff); font: inherit; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; }
.an-bk-ok { border: 1.5px solid #86efac; background: #f0fdf4; border-radius: var(--an-radius, 6px); padding: 20px; }
.an-bk-ok-title { font-size: 18px; margin: 0 0 10px; color: #166534; }
.an-bk-sum { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.an-bk-sum li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed #bbf7d0; padding-bottom: 6px; font-size: 15px; }
.an-bk-sum li span { color: #4b5563; }
.an-bk-sum li strong { text-align: right; }
.an-bk-ok-actions { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 14px 0 0; }
.an-bk-ok-actions .an-btn, .an-bk-ok-actions .btn { width: auto; }
.an-link { text-decoration: underline; }
.an-f[hidden] { display: none; }
.an-f > span small { font-weight: 400; opacity: .75; }
.an-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.an-choice { position: relative; cursor: pointer; }
.an-choice input { position: absolute; opacity: 0; pointer-events: none; }
.an-choice span { display: inline-block; padding: 9px 14px; border: 1.5px solid #d6d3d1; border-radius: var(--_r); font-size: 14px; font-weight: 600; background: #fff; }
.an-choice input:checked + span { background: var(--_p); border-color: var(--_p); color: #fff; }
.an-choice input:focus-visible + span { outline: 2px solid var(--_p); outline-offset: 2px; }
.an-f input[type="file"] { padding: 9px 10px; background: #fafaf9; border-style: dashed; cursor: pointer; }
@media (max-width: 600px) {
	.an-bk-grid { grid-template-columns: minmax(0, 1fr); }
	.an-slot span { min-width: 62px; padding: 9px 8px; }
}

/* ---------- Lịch chọn ngày riêng ---------- */
.an-date { position: relative; }
.an-date-btn {
	display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; font: inherit; font-size: 15px; text-align: left; cursor: pointer;
	padding: 12px 14px; border: 1.5px solid #d6d3d1; border-radius: var(--_r); background: #fff; color: inherit; transition: border-color .15s, box-shadow .15s;
}
.an-date-btn > span { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-date-btn > svg:first-child { color: var(--_p); flex: none; }
.an-date-btn > svg:last-child { flex: none; opacity: .55; transform: rotate(90deg); transition: transform .2s; }
.an-date-btn:hover, .an-date.is-open .an-date-btn { border-color: var(--_p); }
.an-date.is-open .an-date-btn { box-shadow: 0 0 0 3px color-mix(in srgb, var(--_p) 16%, transparent); }
.an-date.is-open .an-date-btn > svg:last-child { transform: rotate(-90deg); }
.an-date-btn:focus-visible { outline: none; border-color: var(--_p); box-shadow: 0 0 0 3px color-mix(in srgb, var(--_p) 22%, transparent); }
.an-cal {
	position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: 330px; max-width: 100%; box-sizing: border-box; padding: 14px 14px 10px;
	background: #fff; border: 1px solid color-mix(in srgb, var(--_p) 14%, #e7e5e4); border-radius: calc(var(--_r) + 4px);
	box-shadow: 0 18px 40px -12px rgba(40, 20, 30, .28), 0 2px 6px rgba(40, 20, 30, .06); animation: an-pop .16s ease-out;
}
.an-cal[hidden] { display: none; }
@keyframes an-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.an-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.an-cal-head strong { font-size: 15px; color: var(--_p); }
.an-cal-nav { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.an-cal-nav:hover:not(:disabled) { background: color-mix(in srgb, var(--_p) 10%, transparent); color: var(--_p); }
.an-cal-nav:disabled { opacity: .25; cursor: default; }
.an-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.an-cal-wd { text-align: center; font-size: 12px; font-weight: 700; color: #a8a29e; padding: 4px 0 6px; }
.an-cal-wd.is-sun { color: color-mix(in srgb, var(--_p) 70%, #a8a29e); }
.an-date.is-open { z-index: 41; }
.an-bk-dialog .an-cal { position: static; width: 100%; margin-top: 8px; box-shadow: 0 10px 28px -16px rgba(40, 20, 30, .3); }
.an-bk-dialog .an-cal-grid { row-gap: 4px; }
.an-cal-day {
	position: relative; justify-self: center; aspect-ratio: 1; width: 100%; max-width: 42px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit;
	font: inherit; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .12s, color .12s;
}
.an-cal-day:hover:not(.is-off) { background: color-mix(in srgb, var(--_p) 12%, transparent); color: var(--_p); }
.an-cal-day:focus-visible { outline: 2px solid var(--_p); outline-offset: 1px; }
.an-cal-day.is-today::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--_p); }
.an-cal-day.is-sel { background: var(--_p); color: #fff; box-shadow: 0 4px 10px -3px color-mix(in srgb, var(--_p) 60%, transparent); }
.an-cal-day.is-sel:hover { background: var(--_p); color: #fff; }
.an-cal-day.is-sel::after { background: #fff; }
.an-cal-day.is-off { color: #d6d3d1; font-weight: 500; cursor: default; }
.an-cal-note { display: flex; align-items: center; gap: 6px; margin: 8px 2px 0; padding-top: 8px; border-top: 1px solid #f0eeec; font-size: 12px; color: #78716c; }
.an-cal-note i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--_p); }
.an-cal-note i.is-off { width: 8px; height: 8px; margin-left: 8px; background: #e7e5e4; }

/* ---------- Form chia bước ---------- */
.an-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.an-step-title { display: flex; align-items: center; gap: 8px; padding: 0; margin: 6px 0 12px; font-weight: 700; font-size: 16px; color: var(--_p); }
.an-step-title > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--_p); color: #fff; font-size: 13px; }
.an-bk.is-stepped .an-step-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.an-bk.is-stepped .an-step[hidden] { display: none; }
.an-steps-bar { display: flex; list-style: none; margin: 0 0 20px; padding: 0; }
.an-steps-bar li { position: relative; flex: 1; min-width: 0; }
.an-steps-bar li + li::before { content: ""; position: absolute; top: 15px; right: calc(50% + 20px); left: calc(-50% + 20px); height: 2px; border-radius: 2px; background: #e7e5e4; }
.an-steps-bar li.is-done + li::before { background: var(--_p); }
.an-steps-bar button { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 0; border: 0; background: none; color: #a8a29e; font: inherit; cursor: pointer; }
.an-steps-bar button:disabled { cursor: default; }
.an-steps-bar b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid #e7e5e4; background: #fff; font-size: 14px; transition: .2s; }
.an-steps-bar span { font-size: 13px; font-weight: 600; line-height: 1.25; text-align: center; }
.an-steps-bar .is-cur button, .an-steps-bar .is-done button { color: var(--_p); }
.an-steps-bar .is-cur b { background: var(--_p); border-color: var(--_p); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--_p) 15%, transparent); }
.an-steps-bar .is-done b { border-color: var(--_p); color: var(--_p); }
.an-steps-bar .is-done button:hover b { background: color-mix(in srgb, var(--_p) 10%, #fff); }
.an-step-sum { grid-column: 1 / -1; margin: 0; padding: 10px 14px; border-radius: var(--_r); background: color-mix(in srgb, var(--_p) 8%, #fff); color: var(--_p); font-size: 14px; font-weight: 600; }
.an-step-sum[hidden] { display: none; }
.an-step-nav { display: flex; align-items: center; gap: 12px; }
.an-step-nav > * { margin: 0; }
.an-step-nav > [hidden] { display: none !important; }
.an-bk .an-step-nav .an-step-next, .an-bk .an-step-nav button[type="submit"] { flex: 1 1 auto; width: auto; }
.an-step-back { flex: none; padding: 12px 6px; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; opacity: .75; cursor: pointer; }
.an-step-back:hover { opacity: 1; color: var(--_p); }
.an-bk button.is-busy { opacity: .65; cursor: progress; }

/* ---------- Cửa sổ nổi ---------- */
.an-bk-launch { --_p: var(--an-primary, #1f2937); --_r: var(--an-radius, 6px); }
.an-launch-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.an-launch-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--_r); background: color-mix(in srgb, var(--_p) 6%, #fff); font-weight: 600; }
.an-launch-steps b { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--_p); color: #fff; font-size: 13px; }
.an-bk-launch .an-bk-open { display: block; width: 100%; }
.an-launch-note { margin: 10px 0 0; text-align: center; font-size: 13px; opacity: .7; }
.an-bk-dialog {
	--_p: var(--an-primary, #1f2937); width: min(620px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 40px); padding: 0; border: 0;
	border-radius: 22px; background: #fff; color: inherit; box-shadow: 0 30px 80px -20px rgba(30, 15, 25, .45); overflow: hidden;
}
.an-bk-dialog[open] { display: flex; flex-direction: column; animation: an-dlg .22s ease-out; }
@keyframes an-dlg { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes an-sheet { from { opacity: .6; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.an-bk-dialog::backdrop { background: rgba(35, 20, 28, .45); backdrop-filter: blur(3px); }
.an-bk-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px 24px; border-bottom: 1px solid #f0eeec; }
.an-bk-dialog-head strong { font-size: 18px; color: var(--_p); }
.an-bk-close { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #f5f5f4; color: inherit; cursor: pointer; }
.an-bk-close:hover { background: color-mix(in srgb, var(--_p) 12%, #fff); color: var(--_p); }
.an-bk-dialog-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 20px 24px 24px; }
.an-bk-dialog .an-step-nav { position: sticky; bottom: -24px; z-index: 5; margin: 8px -24px -24px; padding: 14px 24px 18px; background: linear-gradient(to top, #fff 75%, rgba(255, 255, 255, 0)); }
html.an-bk-locked { overflow: hidden; }
@media (max-width: 600px) {
	.an-bk-dialog { width: 100%; max-height: 94dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
	.an-bk-dialog[open] { animation-name: an-sheet; }
	.an-bk-dialog-body { padding: 16px 16px 20px; }
	.an-bk-dialog .an-step-nav { bottom: -20px; margin: 8px -16px -20px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
	.an-steps-bar span { font-size: 12px; }
	.an-cal { width: 100%; }
}
