/* Public reservation form. Special modes and legal dialogs retain their existing styles. */
body.is-booking { background: #fff; }
body.is-booking header { background: #fff; color: var(--text); border-bottom: 1.5px solid var(--border-light); padding: 1.2rem 2rem; }
body.is-booking header h1 { font-size: .95rem !important; font-weight: 500; }
body.is-booking header p, body.is-booking .badge-sec { display: none; }
body.is-booking .header-inner { max-width: 760px; }
body.is-booking .container { max-width: 824px; padding: 2rem; }
.booking-page { max-width: 760px; margin: 0 auto; }
.booking-page [hidden] { display: none !important; }
.booking-page h2, .booking-page h3, .booking-page h4, .booking-page p { margin: 0; }
.booking-page h2, .booking-page h3, .booking-page h4, .booking-page strong { font-weight: 600; }
.booking-intro { margin-bottom: 1.75rem; }
.booking-intro h2 { font-size: 1.5rem; line-height: 1.3; letter-spacing: -.02em; }
.booking-page .booking-intro p { margin-top: .375rem; color: var(--muted); }
.booking-layout, .booking-panel { min-width: 0; }
.booking-page button, .booking-page select, .booking-page input, .booking-page textarea { min-height: 44px; }
.booking-page button { font-family: inherit; }
.booking-page button:focus-visible, .booking-page summary:focus-visible, .booking-page a:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.booking-page .btn { box-shadow: none; border-radius: 8px; }
.booking-page .btn:hover { transform: none; box-shadow: none; }
.booking-page button:disabled { cursor: default; color: var(--muted); background: #f8fafc; border-color: var(--border-light); box-shadow: none; transform: none; }
.booking-page label { font-weight: 500; }
.booking-page select, .booking-page input, .booking-page textarea { color: var(--text); border-radius: 8px; }
.booking-service select { width: 100%; text-overflow: ellipsis; }
.booking-service-meta { display: flex; gap: 1rem; margin-top: .6rem; color: var(--muted); font-size: .85rem; }
.booking-service-meta, .booking-week-title>span, .booking-day-number, .booking-page time, .booking-summary-facts, .booking-appointment, #selected_slot_display { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.booking-calendar { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1.5px solid var(--border-light); }
.booking-calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.booking-calendar h3, .booking-details h3 { font-size: 1rem; }
.booking-day-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .6rem 0 0; padding: 0; list-style: none; color: #475569; font-size: .8rem; }
.booking-day-legend li { display: flex; align-items: center; gap: .375rem; }
.booking-day-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #047857; }
.booking-day:disabled .booking-day-dot, .booking-day-dot-unavailable { background: #b91c1c; }
.booking-text-button { padding: .35rem 0; border: 0; background: transparent; color: var(--primary); font-size: .85rem; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.booking-text-button:hover { color: var(--primary-dark); }
.booking-week-nav { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: .6rem 0 1rem; }
.booking-week-nav .btn { width: 44px; justify-content: center; padding: 0; font-size: 1.5rem; line-height: 1; }
.booking-week-title { min-width: 0; display: flex; flex-direction: column; gap: .25rem; text-align: center; }
.booking-week-title>strong { font-size: 1.15rem; line-height: 1.4; }
.booking-week-title>span { font-size: .8rem; color: var(--muted); }
.booking-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; }
.booking-day { min-width: 0; border: 2px solid #475569; border-radius: 8px; padding: .5rem 0; background: #fff; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: .25rem; font-size: .8rem; cursor: pointer; }
.booking-day-number { font-size: .95rem; font-weight: 500; white-space: nowrap; }
.booking-page .booking-day:disabled { border-color: #94a3b8; border-style: dashed; background: #e9eef2; color: #475569; opacity: 1; }
.booking-day[aria-pressed="true"]:enabled { border-color: var(--primary); color: var(--primary); background: #ecfdf5; box-shadow: inset 0 0 0 1px var(--primary); }
.booking-day:enabled:hover { border-color: var(--primary); background: #ecfdf5; }
.booking-day-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .4rem; margin: 1.25rem 0 .8rem; }
.booking-day-heading h4 { font-size: .9rem; font-weight: 500; }
.booking-day-heading>span { color: var(--muted); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .75rem; }
.booking-times { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; }
.booking-page .booking-times .slot-pill { width: 100%; min-height: 46px; justify-content: center; gap: .5rem; border: 2px solid var(--border-heavy); border-radius: 8px; font: 500 .94rem 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; box-shadow: none; }
.booking-times .status-dot { background: #10b981; flex-shrink: 0; }
.booking-page .booking-times .slot-available.selected { background: #f8fafc; border-color: var(--primary); color: var(--primary); box-shadow: none; }
.booking-page .booking-times .slot-available.selected .status-dot { background: var(--primary) !important; }
.booking-waitlist { margin-top: .65rem; }
.booking-notice, .booking-empty-day { padding: .85rem; border: 1.5px solid var(--border-light); border-left: 4px solid var(--primary); border-radius: 8px; background: #f8fafc; font-size: .85rem; color: var(--muted); }
.booking-page .booking-empty-day { margin-top: .75rem; }
.booking-summary { display: none; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.25rem 0; margin-top: .75rem; border-top: 1.5px solid var(--border-light); }
.booking-page[data-selected="true"] .booking-summary { display: flex; }
.booking-summary-content { min-width: 0; }
.booking-appointment { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .88rem; }
#booking-summary-time { font-size: 1rem; }
#booking-summary-service, .booking-summary-facts { display: none; }
#booking-continue { justify-content: center; padding: .7rem 1.5rem; flex-shrink: 0; }
.booking-page[data-step="details"] .booking-summary { margin-top: 0; padding-top: 0; padding-bottom: 1.25rem; border-top: 0; border-bottom: 1.5px solid var(--border-light); }
.booking-page[data-step="details"] #booking-summary-service { display: block; margin-top: .5rem; font-size: .9rem; overflow-wrap: anywhere; }
.booking-page[data-step="details"] .booking-summary-facts { display: flex; gap: 1rem; margin-top: .4rem; font-size: .85rem; color: var(--muted); }
.booking-details h3 { margin: .5rem 0 1.25rem; }
.booking-selected-field { display: none; }
.booking-details .form-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
.booking-details .form-grid>div:first-child { grid-column: 1 / -1; }
.booking-note { margin-top: 1rem; }
.booking-note summary { color: var(--primary); cursor: pointer; font-size: .85rem; min-height: 44px; padding: .5rem 0; }
.booking-note label { margin-top: .75rem; }
.booking-package-choice { margin-top: 1rem; padding: 1rem; background: var(--bg); border: 1.5px solid var(--border-light); border-left: 4px solid var(--primary); border-radius: 8px; }
.booking-package-choice label { display: flex; align-items: center; gap: .75rem; margin: 0; cursor: pointer; font-weight: 500; }
.booking-page .booking-package-choice input { width: 20px; height: 20px; min-height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--primary); }
.booking-package-choice p { margin: .65rem 0 0; color: var(--muted); font-size: .82rem; line-height: 1.6; }
.booking-consents { margin-top: 1rem; padding-top: 1.25rem; border-top: 1.5px solid var(--border-light); }
.booking-consents label { display: flex; align-items: start; gap: .75rem; font-size: .82rem; line-height: 1.6; margin: 0; cursor: pointer; }
.booking-consents label+label { margin-top: 1rem; }
.booking-page .booking-consents input { width: 20px; height: 20px; min-height: 20px; margin: 3px 0 0; flex-shrink: 0; accent-color: var(--primary); }
.booking-consents a { color: var(--primary); text-underline-offset: 3px; }
.booking-submit { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.booking-submit p { font-size: .8rem; color: var(--muted); }
.booking-submit .btn { justify-content: center; padding: .85rem 1.25rem; }
.booking-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.booking-page:not(.booking-enhanced) .booking-week+.booking-week { margin-top: 1.5rem; }
@media (max-width: 520px) {
    body.is-booking .container { padding: 1.5rem .75rem; }
    body.is-booking header { padding: 1rem .75rem; }
    .booking-intro { margin-bottom: 1.25rem; }
    .booking-page input, .booking-page select, .booking-page textarea { font-size: 16px; }
    .booking-days { gap: 3px; }
    .booking-day { font-size: .7rem; }
    .booking-times { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
    .booking-week-title>strong { font-size: 1.05rem; }
    .booking-week-title>span { font-size: .72rem; }
    .booking-day-number { font-size: .72rem; }
    .booking-summary { flex-wrap: wrap; gap: .8rem; }
    #booking-continue { width: 100%; }
    .booking-details .form-grid { grid-template-columns: 1fr; }
    .booking-submit .btn { width: 100%; }
}
@media (max-width: 360px) {
    .booking-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .booking-day-number { font-size: .85rem; }
    .booking-times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    .booking-page *, .booking-page *::before, .booking-page *::after { transition: none !important; scroll-behavior: auto !important; }
}

html.is-embed, html.is-embed body.is-embed { background: transparent; }
body.is-embed { --primary: #153328; --primary-dark: #234738; }
body.is-embed,
body.is-embed * {
    font-family: "Aptos", "Segoe UI", system-ui, -apple-system, sans-serif !important;
    font-variant-numeric: tabular-nums;
}
body.is-embed > #booking-embed-content { display: flow-root; max-width: 100%; margin: 0; padding: .25rem 4px .5rem; }
body.is-embed :is(input, select, textarea):focus,
body.is-embed :is(input, select, textarea):focus-visible {
    outline: none !important;
    border-color: #153328 !important;
    box-shadow: 0 0 0 3px rgba(21, 51, 40, 0.18) !important;
}
body.is-embed :is(button, a):focus-visible { outline: 2px solid #153328; outline-offset: 2px; }

body.is-embed .booking-page { font-size: 15px; line-height: 1.45; color: #153328; }
body.is-embed .booking-calendar h3,
body.is-embed .booking-details h3 { font-size: 1.05rem; font-weight: 600; color: #153328; }
body.is-embed .booking-week-title > strong { font-size: 1rem; font-weight: 600; color: #153328; }
body.is-embed .booking-week-title > span,
body.is-embed .booking-service-meta,
body.is-embed .booking-day-heading > span,
body.is-embed .booking-consents label,
body.is-embed .booking-submit p { font-size: .84rem; color: #4e6358; }

/* Sekundární tlačítka: Nejbližší volný, Zpět na termíny, Hlídat uvolněný termín */
body.is-embed #booking-earliest,
body.is-embed #booking-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    text-decoration: none;
    background: #ffffff;
    border: 1.5px solid #a8b6ab;
    color: #153328;
    padding: .4rem .85rem;
    min-height: 36px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
}
body.is-embed #booking-earliest { border-color: #153328; }
body.is-embed #booking-back { margin-bottom: .75rem; }
body.is-embed #booking-earliest:hover:enabled,
body.is-embed #booking-back:hover { background: #153328; color: #f6f5ef; border-color: #153328; }

body.is-embed .booking-waitlist { margin-top: 1rem; }
body.is-embed .booking-waitlist .booking-text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #efede5;
    border: 1.5px solid #a8b6ab;
    color: #153328;
    padding: .5rem 1rem;
    min-height: 40px;
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 600;
}
body.is-embed .booking-waitlist .booking-text-button:hover { background: #e3e6dc; border-color: #153328; }

/* Krok 1: klidný kalendář a sloty */
body.is-embed .booking-calendar { margin-top: 1.15rem; padding-top: 1rem; border-top: 1px solid #d5ddd6; }
body.is-embed .booking-day-legend { display: none; }
body.is-embed .booking-week-nav { margin: .55rem 0 .85rem; }
body.is-embed .booking-week-nav .btn { font-size: 1.1rem; width: 38px; min-height: 38px; border-width: 1.5px; border-color: #a8b6ab; }
body.is-embed .booking-day { padding: .45rem .2rem; gap: .15rem; border-width: 1.5px; border-color: #b7c4ba; border-radius: 10px; font-size: .78rem; }
body.is-embed .booking-day-number { font-size: .9rem; font-weight: 600; }
body.is-embed .booking-page .booking-day:disabled { border-style: solid; border-color: #e2e6de; background: #f0efe8; color: #8b9a90; }
body.is-embed .booking-day:disabled .booking-day-dot { display: none; }
body.is-embed .booking-day[aria-pressed="true"]:enabled { background: #153328; color: #f6f5ef; border-color: #153328; box-shadow: none; }
body.is-embed .booking-day[aria-pressed="true"]:enabled .booking-day-dot { background: #9fd3b4; }
body.is-embed .booking-day-heading { margin: 1rem 0 .6rem; }
body.is-embed .booking-day-heading h4 { font-size: .95rem; font-weight: 600; color: #153328; }

body.is-embed .booking-page .booking-times .slot-pill { font-size: .94rem; min-height: 42px; border-width: 1.5px; border-color: #a8b6ab; border-radius: 10px; background: #ffffff; }
body.is-embed .booking-times .status-dot { display: none; }
body.is-embed .booking-page .booking-times .slot-available.selected { background: #153328; border-color: #153328; color: #f6f5ef; }

/* Krok 1: datum + čas přímo v tlačítku Pokračovat */
body.is-embed .booking-page[data-step="selection"] .booking-summary { padding: 1rem 0 .25rem; margin-top: 1rem; border-top: 1px solid #d5ddd6; }
body.is-embed .booking-page[data-step="selection"] .booking-summary-content { display: none; }
body.is-embed .booking-page[data-step="selection"] #booking-continue { width: 100%; min-height: 48px; font-size: .96rem; font-weight: 600; border-radius: 10px; }

/* Krok 2: teplý souhrn a sbalená nápověda permanentky */
body.is-embed .booking-page[data-step="details"] .booking-summary { background: #edece3; border: 1px solid #d5ddd6; border-radius: 12px; padding: .85rem 1rem; margin-bottom: 1rem; }
body.is-embed .booking-appointment,
body.is-embed #booking-summary-time { font-size: .95rem; font-weight: 600; color: #153328; }
body.is-embed .booking-package-choice { background: #efede5; border: 1px solid #d5ddd6; border-left: 3px solid #153328; border-radius: 10px; padding: .75rem .9rem; }
body.is-embed .booking-package-choice:not(:has(input:checked)) p { display: none; }
body.is-embed .booking-consents { padding-top: 1rem; border-top: 1px solid #d5ddd6; }
body.is-embed .booking-consents label { line-height: 1.45; }
body.is-embed .booking-consents label + label { margin-top: .75rem; }

/* Poslední stránka (potvrzení rezervace / QR platba bez zbytečných vnořených rámečků) */
body.is-embed #booking-embed-content:has(> .booking-confirmation-card) > .alert-success { display: none !important; }
body.is-embed .booking-confirmation-card {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: .25rem 0 0 !important;
    box-shadow: none !important;
    color: #153328 !important;
}
body.is-embed .booking-confirmation-card h2 { font-size: 1.25rem !important; font-weight: 600 !important; color: #153328 !important; margin: .5rem 0 .25rem !important; }
body.is-embed .booking-confirmation-card .badge-today {
    background: #edf4ef !important;
    border: 1px solid #b7c9bd !important;
    color: #153328 !important;
    font-size: .82rem !important;
    font-weight: 600 !important;
    border-radius: 999px !important;
    padding: .25rem .7rem !important;
}
body.is-embed .booking-confirm-email-box {
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid #d5ddd6 !important;
    border-radius: 0 !important;
    padding: .9rem 0 .25rem !important;
    margin: .9rem 0 1.1rem !important;
    color: #153328 !important;
}
body.is-embed .booking-confirm-accent { color: #153328 !important; font-weight: 600 !important; }
body.is-embed .booking-confirm-package-box,
body.is-embed .booking-confirm-qr-panel {
    background: #ffffff !important;
    border: 1px solid #d5ddd6 !important;
    border-radius: 14px !important;
    padding: 1.15rem 1.25rem !important;
}
body.is-embed .booking-confirm-qr-note {
    background: transparent !important;
    padding: .5rem 0 0 !important;
    border-top: 1px solid #e6ebe7 !important;
    border-radius: 0 !important;
    color: #4e6358 !important;
}
body.is-embed .booking-confirm-qr-img { border: 0 !important; box-shadow: none !important; }
body.is-embed .booking-confirm-actions { border-top-color: #d5ddd6 !important; }
body.is-embed .booking-confirm-actions .btn-primary {
    background: #153328 !important;
    border-color: #153328 !important;
    color: #f6f5ef !important;
    border-radius: 10px !important;
    padding: .65rem 1.15rem !important;
    min-height: 44px;
}
body.is-embed .booking-confirm-new-btn {
    text-decoration: none !important;
    background: #ffffff !important;
    border: 1.5px solid #a8b6ab !important;
    color: #153328 !important;
    border-radius: 10px !important;
    padding: .65rem 1.1rem !important;
    min-height: 44px;
    font-weight: 600 !important;
}
body.is-embed .booking-confirm-new-btn:hover { background: #efede5 !important; border-color: #153328 !important; }

/* Modal: Hlídání uvolněného termínu (náhradníci) */
body.is-embed #modal-waitlist { background: rgba(21, 51, 40, 0.45) !important; backdrop-filter: blur(2px); padding: 1rem; }
body.is-embed #modal-waitlist .legal-modal-box {
    background: #f6f5ef !important;
    border: 1.5px solid #a8b6ab !important;
    border-radius: 16px !important;
    padding: 1.25rem 1.35rem !important;
    box-shadow: 0 18px 40px rgba(21, 51, 40, 0.22) !important;
    color: #153328 !important;
}
body.is-embed #modal-waitlist .legal-modal-header { border-bottom: 1px solid #d5ddd6 !important; padding-bottom: .75rem !important; margin-bottom: .9rem !important; }
body.is-embed #modal-waitlist .legal-modal-header h3 { font-size: 1.1rem !important; font-weight: 600 !important; color: #153328 !important; }
body.is-embed #modal-waitlist .legal-modal-close {
    width: 34px; height: 34px; border-radius: 8px;
    border: 1.5px solid #a8b6ab; background: #ffffff; color: #153328;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
body.is-embed #modal-waitlist .legal-modal-close:hover { background: #153328; color: #f6f5ef; border-color: #153328; }
body.is-embed #modal-waitlist label { color: #153328 !important; font-size: .85rem !important; font-weight: 600 !important; }
body.is-embed #modal-waitlist input:not([type="checkbox"]),
body.is-embed #modal-waitlist select,
body.is-embed #modal-waitlist textarea {
    background: #ffffff !important;
    border: 1.5px solid #a8b6ab !important;
    border-radius: 8px !important;
    padding: .5rem .7rem !important;
    font-size: .94rem !important;
    color: #153328 !important;
}
body.is-embed #modal-waitlist label:has(input[name="preferred_days[]"]) {
    background: #ffffff !important;
    border: 1.5px solid #b7c4ba !important;
    border-radius: 8px !important;
    padding: .35rem .65rem !important;
    font-size: .84rem !important;
    font-weight: 500 !important;
    color: #153328 !important;
}
body.is-embed #modal-waitlist label:has(input[name="preferred_days[]"]:checked) {
    background: #153328 !important;
    border-color: #153328 !important;
    color: #f6f5ef !important;
}
body.is-embed #modal-waitlist input[name="preferred_days[]"] { accent-color: #153328; }
body.is-embed #modal-waitlist button[type="submit"] {
    background: #153328 !important;
    border-color: #153328 !important;
    color: #f6f5ef !important;
    border-radius: 10px !important;
    min-height: 44px;
    font-weight: 600;
}

input.field-invalid, select.field-invalid, textarea.field-invalid {
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
}
input.field-invalid:focus, select.field-invalid:focus, textarea.field-invalid:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.22) !important;
}
.field-error-msg {
    display: block;
    margin-top: .3rem;
    font-size: .8rem;
    font-weight: 500;
    color: #dc2626;
    line-height: 1.35;
}
