/* Booko — שכבת השלמה לטמפלט Landrick (Bootstrap 5 RTL).
   הבסיס (טיפוגרפיה, רשת, כפתורים, טפסים, כרטיסים, טבלאות) מגיע מהטמפלט דרך /_theme/{kind}.css,
   שנצבע לפי המותג. כאן רק מה שאין בטמפלט: רכיבי תורים, מצבי טעינה, נגישות ותיקוני UX לישראל.
   צבעים: רק משתני Bootstrap (--bs-primary, --bs-primary-rgb...) — אין HEX של מותג בקבצים. */

:root { --bk-muted: #8492a6; --bk-border: #e9ecef; --bk-soft: rgba(var(--bs-primary-rgb), .08); --bk-radius: 10px; --bk-dark: #3c4858; }
[hidden] { display: none !important; }
.validation-summary-valid { display: none !important; }
[tabindex="-1"]:focus { outline: none; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { -webkit-font-smoothing: antialiased; }

/* נגישות: מיקוד גלוי תמיד במקלדת (הטמפלט מסיר אותו) */
:focus-visible { outline: 3px solid rgba(var(--bs-primary-rgb), .55) !important; outline-offset: 2px; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 2000; background: var(--bs-primary); color: #fff; padding: .75rem 1.25rem; border-radius: var(--bk-radius); font-weight: 700; }
.skip-link:focus { top: 1rem; color: #fff; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--bk-muted) !important; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1 1 auto; min-width: 0; }

/* Phosphor Icons (Regular, MIT) — ספרייט מקומי */
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; fill: currentColor; }
.ic.sm { width: 1em; height: 1em; }
.ic.lg { width: 1.6em; height: 1.6em; }
.ic.xl { width: 2.2em; height: 2.2em; }
.brand-logo { display: inline-flex; align-items: center; line-height: 0; }
.brand-logo svg { height: 32px; width: auto; }
/* אייקון בעיגול רך — כמו features של הטמפלט */
.icon-soft { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(var(--bs-primary-rgb), .1); color: var(--bs-primary); flex: none; }
.icon-soft.sm { width: 38px; height: 38px; }
.icon-soft.lg { width: 64px; height: 64px; }
.icon-soft.success { background: rgba(var(--bs-success-rgb), .12); color: var(--bs-success); }
.icon-soft.warning { background: rgba(var(--bs-warning-rgb), .12); color: var(--bs-warning); }
.icon-soft.danger { background: rgba(var(--bs-danger-rgb), .12); color: var(--bs-danger); }

/* כפתורים: מטרת מגע 44px (UX-06), מצב "עסוק" ללא שליחה כפולה */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; }
.btn-sm { min-height: 36px; }
.btn-icon { gap: 0; }
.btn .spinner { display: none; }
.btn.is-busy .spinner { display: inline-block; }
.btn.is-busy { pointer-events: none; opacity: .85; }
.spinner { width: 1em; height: 1em; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: mc-spin .7s linear infinite; }
@keyframes mc-spin { to { transform: rotate(360deg); } }
.btn-link-plain { background: none; border: 0; padding: 0; font: inherit; color: var(--bs-primary); text-decoration: underline; cursor: pointer; min-height: 44px; }

/* טפסים: 16px לפחות (אין זום אוטומטי ב-iOS), תוויות ברורות */
.form-control, .form-select { font-size: 1rem; min-height: 44px; }
textarea.form-control { min-height: 96px; }
.form-label { font-weight: 600; color: var(--bk-dark); margin-bottom: .35rem; }
.form-text { color: var(--bk-muted); }
input[type=tel], input[type=email], input[type=url], input.ltr-input { direction: ltr; text-align: right; }
.form-control[aria-invalid=true], .form-select[aria-invalid=true], .input-validation-error { border-color: var(--bs-danger) !important; }
.field-validation-error, .text-danger.field-error { color: var(--bs-danger); font-size: .9rem; font-weight: 600; display: block; margin-top: .25rem; }
.validation-summary-errors { color: var(--bs-danger); }
.validation-summary-errors ul { margin: 0; padding-inline-start: 1.2rem; }
.form-check-input { width: 1.25em; height: 1.25em; }
.form-check { min-height: 32px; display: flex; gap: .55rem; align-items: flex-start; padding-inline-start: 0; }
.form-check .form-check-input { float: none; margin: .15rem 0 0; flex: none; }
.req { color: var(--bs-danger); }
/* בחירה כגלולות (שירותים, ימים) — radio/checkbox אמיתיים מאחורי הקלעים */
.choice-group { display: flex; flex-wrap: wrap; gap: .5rem; border: 0; padding: 0; margin: 0; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .45rem 1rem; border: 1px solid var(--bk-border); border-radius: 50rem; background: #fff; font-weight: 600; box-shadow: 0 3px 5px 0 rgba(var(--bs-primary-rgb), .05); }
.choice input:checked + span { background: var(--bs-primary); color: #fff; border-color: var(--bs-primary); }
.choice input:focus-visible + span { outline: 3px solid rgba(var(--bs-primary-rgb), .55); outline-offset: 2px; }
details.more { border: 1px solid var(--bk-border); border-radius: var(--bk-radius); padding: .25rem 1rem; background: #fff; }
details.more > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; color: var(--bs-primary); }

/* תגיות מצב (UX-05): תמיד טקסט ואייקון, בגוונים הרכים של הטמפלט */
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .65rem; border-radius: 50rem; font-size: .82rem; font-weight: 600; background: #f8f9fa; color: var(--bk-dark); border: 1px solid var(--bk-border); white-space: nowrap; line-height: 1.5; }
.chip .ic { width: 1em; height: 1em; }
.chip.ok { background: rgba(var(--bs-success-rgb), .1); color: #1f8a5f; border-color: transparent; }
.chip.warn { background: rgba(var(--bs-warning-rgb), .12); color: #a8500f; border-color: transparent; }
.chip.bad { background: rgba(var(--bs-danger-rgb), .1); color: #c42d3f; border-color: transparent; }
.chip.info { background: rgba(var(--bs-info-rgb), .1); color: #0f7586; border-color: transparent; }
.chip.accent { background: rgba(var(--bs-primary-rgb), .1); color: var(--bs-primary); border-color: transparent; }
.chip.outline { background: transparent; }

/* התראות רכות (Bootstrap .alert + מצב) */
.alert { display: flex; gap: .75rem; align-items: flex-start; border-radius: var(--bk-radius); }
.alert > .ic { margin-top: .2rem; }
.alert > div > :last-child { margin-bottom: 0; }
.alert.ok { background: rgba(var(--bs-success-rgb), .1); border-color: rgba(var(--bs-success-rgb), .2); color: #1f6e4e; }
.alert.warn { background: rgba(var(--bs-warning-rgb), .1); border-color: rgba(var(--bs-warning-rgb), .25); color: #8a440e; }
.alert.bad { background: rgba(var(--bs-danger-rgb), .08); border-color: rgba(var(--bs-danger-rgb), .2); color: #a8283a; }
.alert.info { background: rgba(var(--bs-primary-rgb), .06); border-color: rgba(var(--bs-primary-rgb), .15); color: var(--bk-dark); }
.alert.info > .ic { color: var(--bs-primary); }
.alert p, .alert div { color: inherit; }
.demo-banner { background: #fff7ed; color: #8a440e; text-align: center; padding: .45rem 1rem; font-size: .9rem; border-bottom: 1px solid #fde4c8; position: relative; z-index: 1001; }

/* רשימות */
.list-card { border: 0; border-radius: var(--bk-radius); overflow: hidden; background: #fff; box-shadow: 0 0 3px rgba(60, 72, 88, .15); }
.list-item { display: flex; gap: .85rem; align-items: center; padding: .85rem 1rem; border-bottom: 1px solid var(--bk-border); background: #fff; text-decoration: none; color: inherit; min-height: 56px; }
.list-item:last-child, .list > li:last-child > .list-item { border-bottom: 0; }
a.list-item:hover { background: var(--bk-soft); color: inherit; }
.list { list-style: none; margin: 0; padding: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; }
.kv dt { color: var(--bk-muted); font-weight: 400; }
.kv dd { margin: 0; font-weight: 600; color: var(--bk-dark); }
.table-wrap { overflow-x: auto; border-radius: var(--bk-radius); background: #fff; box-shadow: 0 0 3px rgba(60, 72, 88, .15); }
.table-wrap .table { margin: 0; }
.table-wrap .table th { background: #f8f9fa; color: var(--bk-muted); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.table > :not(caption) > * > * { vertical-align: middle; }

/* אווטאר ראשי תיבות */
.avatar-initials { width: 40px; height: 40px; border-radius: 50%; background: rgba(var(--bs-primary-rgb), .1); color: var(--bs-primary); display: inline-grid; place-items: center; font-weight: 700; flex: none; font-size: .95rem; }
.avatar-initials.lg { width: 60px; height: 60px; font-size: 1.3rem; }
.avatar-initials.sm { width: 32px; height: 32px; font-size: .8rem; }

/* מצב ריק */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--bk-muted); }
.empty .icon-soft { margin-bottom: .75rem; }
.empty h3, .empty h5 { color: var(--bk-dark); }

/* skeleton — מקום שמור לתוכן בטעינה, באותן מידות של התוכן הסופי כדי שהמסך לא יקפוץ.
   הברק נע מימין לשמאל (כיוון הקריאה); ב-reduced-motion נשאר אפור סטטי. */
.sk { display: block; background: linear-gradient(90deg, #eef0f3 25%, #f8f9fa 50%, #eef0f3 75%); background-size: 200% 100%; animation: sk 1.4s ease-in-out infinite; border-radius: 8px; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk-wrap { display: contents; pointer-events: none; }
.sk-line { height: .85em; margin-block: .4em; width: 100%; }
.sk-line.w-20 { width: 20%; } .sk-line.w-30 { width: 30%; } .sk-line.w-50 { width: 50%; } .sk-line.w-70 { width: 70%; }
.sk-circle { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.sk-slot { min-height: 48px; border-radius: 8px; }
.sk-day { flex: none; width: 72px; min-height: 76px; border-radius: var(--bk-radius); }
.sk-row { display: flex; gap: .85rem; align-items: center; padding: .85rem 1rem; border-bottom: 1px solid var(--bk-border); min-height: 56px; }
.sk-row:last-child { border-bottom: 0; }
.sk-row .grow { flex: 1; }
.is-stale { opacity: .55; pointer-events: none; transition: opacity .15s ease .1s; }

/* הודעה קופצת (נפרדת מ-.toast של Bootstrap) */
.bk-toast-region { position: fixed; inset-inline: 0; bottom: 1rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; z-index: 2000; pointer-events: none; padding-inline: 1rem; }
.bk-toast { pointer-events: auto; background: #202942; color: #fff; padding: .8rem 1.2rem; border-radius: var(--bk-radius); box-shadow: 0 10px 25px rgba(32, 41, 66, .3); max-width: 520px; font-weight: 500; }
@media (max-width: 991.98px) { .has-bottom-nav .bk-toast-region { bottom: 84px; } }

/* דיאלוג (native <dialog>) במראה modal של הטמפלט */
dialog.bk-dialog { border: 0; padding: 0; border-radius: var(--bk-radius); max-width: min(540px, calc(100vw - 2rem)); width: 100%; color: inherit; box-shadow: 0 10px 40px rgba(32, 41, 66, .25); }
dialog.bk-dialog::backdrop { background: rgba(32, 41, 66, .55); }
dialog.bk-dialog .modal-header, dialog.bk-dialog .modal-body, dialog.bk-dialog .modal-footer { padding: 1rem 1.25rem; }
dialog.bk-dialog .modal-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--bk-border); }
dialog.bk-dialog .modal-footer { display: flex; gap: .5rem; justify-content: flex-start; flex-wrap: wrap; border-top: 1px solid var(--bk-border); }

/* שלבים */
.stepper { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; overflow-x: auto; }
.stepper li { flex: 1 1 0; min-width: 84px; display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; color: var(--bk-muted); }
.stepper li::before { content: ""; height: 5px; border-radius: 3px; background: var(--bk-border); }
.stepper li.done::before, .stepper li.current::before { background: var(--bs-primary); }
.stepper li.current { color: var(--bk-dark); font-weight: 700; }

/* בחירת שעה ויום — כפתורים, לא גרירה (A11Y-03) */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; }
.slot { min-height: 48px; border: 1px solid var(--bk-border); border-radius: 8px; background: #fff; font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; color: var(--bk-dark); box-shadow: 0 3px 5px 0 rgba(var(--bs-primary-rgb), .05); transition: all .15s; }
.slot:hover { border-color: var(--bs-primary); color: var(--bs-primary); }
.slot[aria-pressed=true] { background: var(--bs-primary); color: #fff; border-color: var(--bs-primary); box-shadow: 0 3px 8px rgba(var(--bs-primary-rgb), .3); }
.period-h { font-weight: 700; color: var(--bk-muted); font-size: .85rem; margin: 1rem 0 .5rem; }
.days { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem .1rem .6rem; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.day { flex: none; scroll-snap-align: start; width: 72px; min-height: 76px; border: 1px solid var(--bk-border); border-radius: var(--bk-radius); background: #fff; font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; color: var(--bk-dark); transition: all .15s; }
.day .dn { font-size: .8rem; color: var(--bk-muted); }
.day .dd { font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.day .dm { font-size: .75rem; color: var(--bk-muted); }
.day:hover:not(:disabled) { border-color: var(--bs-primary); }
.day[aria-pressed=true] { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; box-shadow: 0 3px 8px rgba(var(--bs-primary-rgb), .3); }
.day[aria-pressed=true] .dn, .day[aria-pressed=true] .dm { color: rgba(255, 255, 255, .85); }
.day:disabled { opacity: .4; cursor: not-allowed; }

/* ציר זמן */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding-inline-start: 1.75rem; padding-bottom: 1.1rem; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 6px; top: 8px; bottom: -4px; width: 2px; background: var(--bk-border); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 0; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--bs-primary); }
.timeline .when { font-size: .85rem; color: var(--bk-muted); }

/* כפתור הזמנה צף בנייד (PORTAL-04) */
.sticky-cta { position: fixed; inset-inline: 0; bottom: 0; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -4px 16px rgba(32, 41, 66, .08); z-index: 1000; display: none; }
.has-sticky-cta { padding-bottom: 88px; }
@media (max-width: 767.98px) { .sticky-cta { display: block; } }

@media print { .no-print, header, nav, footer, .sticky-cta, #sidebar, .top-header { display: none !important; } body { background: #fff; } }

/* תווית גרסה — מה רץ כאן. מחוץ לייצור: תג כתום עם שם הסביבה */
.app-version { font-size: .75rem; color: inherit; opacity: .75; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.app-version:hover { opacity: 1; text-decoration: underline; }
.app-version.is-dev { opacity: 1; background: #fff3e0; color: #a8500f; border-radius: 50rem; padding: .1rem .55rem; font-weight: 600; }
.sidebar-version { padding: 0 14px 10px; background: #fff; text-align: center; }

/* קרדיט הסטודיו בתחתית המסכים */
.studio-credit { color: inherit; opacity: .8; text-decoration: none; white-space: nowrap; }
.studio-credit:hover { opacity: 1; text-decoration: underline; color: inherit; }
