/* BSFL Consultations — booking flow */
.bsfl-bk {
  --g-900: #0f3b2a;
  --g-800: #155239;
  --g-700: #1b6a49;
  --g-600: #22845b;
  --g-100: #e4f2e8;
  --g-50: #f2f9f4;
  --sun: #f4b63d;
  --sun-50: #fff6e3;
  --ink: #17251d;
  --muted: #5d6c63;
  --line: #d7e1da;
  --card: #ffffff;
  --bg: #f7f8f3;
  --err: #c0392b;
  --r-lg: 28px;
  --r: 16px;
  --font: "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, sans-serif;
  max-width: 760px !important;
  margin: 8px auto 48px !important;
  font-family: var(--font);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.bsfl-bk *, .bsfl-bk *::before, .bsfl-bk *::after { box-sizing: border-box; }
.bsfl-bk button, .bsfl-bk input, .bsfl-bk textarea { font-family: inherit; }

/* Shell */
.bk-shell {
  position: relative;
  background: var(--card);
  border: 1px solid #e3e9e4;
  border-radius: var(--r-lg);
  box-shadow: 0 1px 2px rgba(15, 59, 42, .05), 0 24px 60px -24px rgba(15, 59, 42, .28);
  overflow: hidden;
  isolation: isolate;
}
.bk-shell::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 220px; z-index: -1;
  background: radial-gradient(600px 180px at 85% -40px, rgba(34, 132, 91, .12), transparent 70%),
              radial-gradient(400px 160px at 0% -60px, rgba(244, 182, 61, .14), transparent 70%);
}
.bk-shell.is-welcome {
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .09) 1px, transparent 0) 0 0 / 22px 22px,
    radial-gradient(700px 360px at 100% 0%, #2a8f61 0%, transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(244, 182, 61, .28) 0%, transparent 60%),
    linear-gradient(160deg, var(--g-800), var(--g-900));
  color: #fff;
  border-color: transparent;
}
.bk-shell.is-welcome::before { display: none; }

/* Top bar */
.bk-top {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 18px clamp(18px, 4vw, 34px) 0;
}
.bk-brand { font-weight: 700; font-size: .9rem; letter-spacing: .02em; color: var(--g-700); }
.is-welcome .bk-brand { color: #cfe9d9; }
.bk-back {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted);
  font-size: .92rem; font-weight: 600; padding: 8px 10px; margin-inline-start: -10px; border-radius: 999px; cursor: pointer;
}
.bk-back:hover { background: var(--g-50); color: var(--g-800); }
.bk-bar { height: 6px; border-radius: 999px; background: #e7eee9; overflow: hidden; }
.bk-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--g-600), #3fb27f); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
[dir="rtl"] .bk-bar span { margin-inline-start: 0; background: linear-gradient(270deg, var(--g-600), #3fb27f); }
.is-welcome .bk-bar { visibility: hidden; }
.bk-lang {
  border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px;
  padding: 6px 14px; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.bk-lang:hover { border-color: var(--g-600); color: var(--g-700); }
.is-welcome .bk-lang { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .28); color: #fff; }
.is-welcome .bk-lang:hover { background: rgba(255, 255, 255, .18); }

/* Stage + motion */
.bk-stage { padding: clamp(22px, 5vw, 44px) clamp(18px, 5vw, 48px) clamp(26px, 5vw, 44px); min-height: 440px; }
.bk-stage.is-fwd > * { animation: bk-in-fwd .42s cubic-bezier(.2, .8, .2, 1) both; }
.bk-stage.is-back > * { animation: bk-in-back .42s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes bk-in-fwd { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes bk-in-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
[dir="rtl"] .bk-stage.is-fwd > * { animation-name: bk-in-back; }
[dir="rtl"] .bk-stage.is-back > * { animation-name: bk-in-fwd; }
@keyframes bk-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Type */
.bk-counter, .bk-kicker {
  display: inline-block; font-size: .82rem; font-weight: 700; color: var(--g-700);
  background: var(--g-50); border: 1px solid var(--g-100); padding: 4px 12px; border-radius: 999px; margin: 0 0 14px;
}
.bk-title {
  margin: 0 0 8px; font-family: var(--font); font-size: clamp(1.45rem, 3.6vw, 1.95rem); line-height: 1.35;
  font-weight: 700; letter-spacing: -.01em; color: var(--ink); outline: none;
}
.bk-sub { margin: 0 0 22px; color: var(--muted); font-size: 1rem; }

/* Welcome */
.bk-welcome { color: #fff; padding-top: 6px; }
.bk-welcome .bk-kicker { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); color: #d9f2e3; }
.bk-hero {
  margin: 4px 0 12px; font-family: var(--font); font-size: clamp(1.9rem, 5.4vw, 2.85rem); line-height: 1.22;
  font-weight: 700; color: #fff; letter-spacing: -.015em; outline: none; max-width: 18ch;
}
.bk-lead { margin: 0 0 26px; color: #d3e8db; font-size: 1.06rem; max-width: 46ch; }
.bk-facts { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bk-facts li {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(4px);
}
.bk-fact-ico { font-size: 1.3rem; }
.bk-facts small { display: block; color: #b9d8c6; font-size: .78rem; line-height: 1.2; }
.bk-facts b { display: block; color: #fff; font-size: 1rem; line-height: 1.3; }
.bk-path { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: #d3e8db; font-size: .95rem; }
.bk-path li { display: flex; align-items: center; gap: 8px; }
.bk-path li span {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700;
  background: var(--sun); color: var(--g-900);
}
.is-welcome .bk-btn { background: var(--sun); color: var(--g-900); box-shadow: 0 10px 24px -10px rgba(244, 182, 61, .8); }
.is-welcome .bk-btn:hover { background: #ffc552; }
.is-welcome .bk-hint { color: #b9d8c6; }
@media (max-width: 560px) {
  .bk-facts { grid-template-columns: 1fr 1fr; }
  .bk-facts li:last-child { grid-column: 1 / -1; }
}

/* Options */
.bk-options { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0 0 8px; }
@media (min-width: 680px) { .bk-options.is-many { grid-template-columns: 1fr 1fr; } }
.bk-opt {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; text-align: start;
  background: #fff; color: var(--ink); border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 12px 14px; min-height: 64px; cursor: pointer; font-size: 1rem; font-weight: 600; line-height: 1.4;
  transition: border-color .15s, background-color .15s, transform .15s, box-shadow .15s;
}
.bk-stage.is-fwd .bk-opt, .bk-stage.is-back .bk-opt { animation: bk-rise .38s cubic-bezier(.2, .8, .2, 1) both; }
.bk-opt:hover { border-color: var(--g-600); transform: translateY(-1px); box-shadow: 0 8px 20px -14px rgba(15, 59, 42, .5); }
.bk-opt:active { transform: scale(.99); }
.bk-opt-icon {
  flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem;
  background: var(--g-50); transition: background-color .15s, transform .2s;
}
.bk-opt-text { flex: 1; }
.bk-opt-mark {
  flex: none; position: relative; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #b9c7be;
  display: grid; place-items: center; transition: all .15s;
}
.bk-opt-mark.is-box { border-radius: 7px; }
.bk-key {
  flex: none; font-size: .72rem; font-weight: 700; color: #94a39a;
  border: 1px solid #dbe3de; border-radius: 6px; padding: 0 6px; line-height: 18px; display: none;
}
@media (hover: hover) and (min-width: 680px) { .bk-key { display: block; } .bk-opt:hover .bk-key { color: var(--g-700); border-color: var(--g-100); } }
.bk-opt.is-on { border-color: var(--g-600); background: var(--g-50); box-shadow: inset 0 0 0 1px var(--g-600); }
.bk-opt.is-on .bk-opt-icon { background: #fff; transform: scale(1.06); }
.bk-opt.is-on .bk-opt-mark { background: var(--g-600); border-color: var(--g-600); }
.bk-opt.is-on .bk-opt-mark::after {
  content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg);
}
.bk-opt.is-on .bk-key { display: none; }

/* Inputs */
.bk-fields { display: grid; gap: 16px; margin: 0 0 6px; }
.bk-label { display: flex; align-items: baseline; gap: 8px; font-weight: 600; font-size: .98rem; margin: 0 0 6px; }
.bk-optional { font-weight: 500; font-size: .8rem; color: var(--muted); background: #f1f4f2; padding: 1px 8px; border-radius: 999px; }
.bsfl-bk .bk-input {
  width: 100%; font-size: 1.08rem; color: var(--ink); background: #fff; border: 1.5px solid var(--line);
  border-radius: 14px; padding: 14px 16px; min-height: 56px; transition: border-color .15s, box-shadow .15s; margin: 0;
}
.bsfl-bk .bk-input::placeholder { color: #a3b0a8; }
.bsfl-bk .bk-input:hover { border-color: #b7c6bc; }
.bsfl-bk .bk-input:focus { outline: none; border-color: var(--g-600); box-shadow: 0 0 0 4px rgba(34, 132, 91, .14); }
.bsfl-bk .bk-textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.bk-field.has-error .bk-input { border-color: var(--err); box-shadow: 0 0 0 4px rgba(192, 57, 43, .1); }
.bk-error {
  display: flex; align-items: center; gap: 8px; color: var(--err); font-size: .92rem; font-weight: 500; margin: 8px 0 0;
  animation: bk-rise .25s ease both;
}
.bk-error > span {
  flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--err); color: #fff; display: grid; place-items: center;
  font-size: .72rem; font-weight: 700;
}

/* Buttons */
.bk-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 26px; }
.bk-actions-start { margin-top: 0; }
.bk-actions-center { justify-content: center; }
.bk-actions-split { justify-content: space-between; }
.bk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, var(--g-600), var(--g-700)); color: #fff; font-size: 1.05rem; font-weight: 700;
  box-shadow: 0 10px 24px -12px rgba(27, 106, 73, .9); text-decoration: none;
  transition: transform .15s, box-shadow .15s, opacity .15s, background-color .15s;
}
.bk-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgba(27, 106, 73, .95); }
.bk-btn:active { transform: translateY(0); }
.bk-btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.bk-btn-wide { width: 100%; }
.bk-arrow { display: inline-block; transition: transform .2s; }
.bk-btn:hover .bk-arrow { transform: translateX(4px); }
[dir="rtl"] .bk-btn:hover .bk-arrow { transform: translateX(-4px); }
.bk-btn-ghost { background: #fff; color: var(--g-700); border: 1.5px solid var(--g-100); box-shadow: none; }
.bk-btn-ghost:hover { background: var(--g-50); box-shadow: none; }
.bk-hint { font-size: .85rem; color: var(--muted); }
.bk-link {
  background: none; border: 0; padding: 4px 2px; color: var(--g-700); font-weight: 600; font-size: .95rem;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.bk-link:hover { color: var(--g-900); }
.bk-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: bk-spin .7s linear infinite; }
@keyframes bk-spin { to { transform: rotate(360deg); } }

/* Focus */
.bsfl-bk button:focus-visible, .bsfl-bk a:focus-visible, .bsfl-bk label:focus-within .bk-check, .bk-drop:focus-visible {
  outline: 3px solid rgba(34, 132, 91, .45); outline-offset: 3px;
}

/* Time */
.bk-days { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 14px; margin: 0 -2px 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.bk-day {
  flex: none; scroll-snap-align: start; width: 74px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center;
  background: #fff; border: 1.5px solid var(--line); border-radius: 18px; cursor: pointer; color: var(--ink); line-height: 1.25;
  transition: all .15s;
}
.bk-day:hover { border-color: var(--g-600); }
.bk-day-w { font-size: .78rem; color: var(--muted); font-weight: 600; }
.bk-day-d { font-size: 1.55rem; font-weight: 700; margin: 2px 0; }
.bk-day-m { font-size: .78rem; font-weight: 600; }
.bk-day.is-on { background: var(--g-700); border-color: var(--g-700); color: #fff; box-shadow: 0 10px 22px -12px rgba(27, 106, 73, .9); }
.bk-day.is-on .bk-day-w { color: #cfe9d9; }
.bk-day-title { font-weight: 700; margin: 6px 0 12px; }
.bk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.bk-time {
  min-height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: all .15s;
}
.bk-stage.is-fwd .bk-time, .bk-stage.is-back .bk-time { animation: bk-rise .3s ease both; }
.bk-time:hover { border-color: var(--g-600); color: var(--g-700); }
.bk-time.is-on { background: var(--g-700); border-color: var(--g-700); color: #fff; }
.bk-skeleton { display: flex; gap: 10px; }
.bk-skeleton span { width: 74px; height: 86px; border-radius: 18px; background: linear-gradient(90deg, #eef2ef, #f7f9f7, #eef2ef); background-size: 200% 100%; animation: bk-shimmer 1.2s infinite; }
@keyframes bk-shimmer { to { background-position: -200% 0; } }
.bk-empty { padding: 26px; border-radius: var(--r); background: var(--g-50); text-align: center; }
.bk-empty p { margin: 0 0 14px; }

/* Review */
.bk-ticket {
  display: grid; grid-template-columns: 1fr auto; border-radius: 20px; overflow: hidden; margin: 18px 0 14px;
  border: 1.5px solid var(--g-100); background: var(--g-50);
}
.bk-ticket-main { padding: 18px 20px; display: grid; gap: 2px; justify-items: start; }
.bk-ticket-date { font-weight: 700; font-size: 1.05rem; }
.bk-ticket-time { font-size: 2rem; font-weight: 700; color: var(--g-700); line-height: 1.15; }
.bk-ticket-tz { color: var(--muted); font-size: .9rem; }
.bk-ticket-side {
  display: grid; align-content: center; justify-items: center; padding: 18px 22px; background: var(--g-700); color: #fff;
  border-inline-start: 2px dashed rgba(255, 255, 255, .35); text-align: center;
}
.bk-ticket-side small { color: #cfe9d9; font-size: .8rem; }
.bk-ticket-side b { font-size: 1.35rem; }
.bk-ticket-small { grid-template-columns: auto 1fr; max-width: 520px; margin: 22px auto 0; text-align: start; }
.bk-ticket-small .bk-ticket-side { font-weight: 600; font-size: .95rem; }
.bk-who {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px;
  border: 1.5px solid var(--line); border-radius: 14px; margin: 0 0 18px;
}
.bk-who div { display: grid; }
.bk-who span { color: var(--muted); font-size: .92rem; }
.bk-consent { position: relative; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .98rem; padding: 14px 16px; border-radius: 14px; background: #fafbf9; border: 1.5px solid transparent; }
.bk-consent.has-error { border-color: var(--err); }
.bk-consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bk-check { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid #b9c7be; background: #fff; display: grid; place-items: center; margin-top: 2px; transition: all .15s; }
.bk-consent input:checked + .bk-check { background: var(--g-600); border-color: var(--g-600); }
.bk-consent input:checked + .bk-check::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.bk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Payment */
.bk-amount-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 14px; }
.bk-amount { font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 700; color: var(--g-700); line-height: 1.1; }
.bk-amount-slot { color: var(--muted); font-size: .95rem; }
.bk-hold { display: flex; gap: 10px; align-items: flex-start; background: var(--sun-50); border-radius: 14px; padding: 12px 14px; font-size: .94rem; margin: 0 0 18px; }
.bk-hold-ico { font-size: 1.1rem; }
.bk-paystep { border: 1.5px solid var(--line); border-radius: 20px; padding: 16px; margin: 0 0 12px; }
.bk-paystep-head { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 0 0 12px; }
.bk-paystep-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--g-700); color: #fff; font-size: .85rem; }
.bk-seg { display: inline-flex; padding: 4px; border-radius: 999px; background: #eef2ef; margin: 0 0 12px; }
.bk-seg-btn { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font-weight: 600; cursor: pointer; color: var(--muted); }
.bk-seg-btn.is-on { background: #fff; color: var(--g-800); box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.bk-method { text-align: center; }
.bk-qr { display: block; width: 200px; max-width: 70%; height: auto; margin: 4px auto 10px; padding: 10px; background: #fff; border-radius: 16px; border: 1.5px solid var(--line); }
.bk-acct-name { font-weight: 700; }
.bk-acct { display: inline-flex; gap: 8px; align-items: baseline; margin-top: 6px; padding: 8px 14px; border-radius: 12px; background: var(--g-50); }
.bk-acct small { color: var(--muted); }
.bk-pre { white-space: pre-wrap; text-align: start; margin: 0; padding: 12px 14px; background: #fafbf9; border-radius: 12px; }
.bk-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.bk-drop {
  display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; cursor: pointer;
  border: 2px dashed #b9c7be; background: #fafbf9; transition: all .15s;
}
.bk-drop:hover, .bk-file-input:focus-visible + .bk-drop { border-color: var(--g-600); background: var(--g-50); }
.bk-drop.has-file { border-style: solid; border-color: var(--g-600); background: var(--g-50); }
.bk-drop-ico { font-size: 1.6rem; }
.bk-drop-text { display: grid; min-width: 0; }
.bk-drop-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-drop-text small { color: var(--muted); }
.bk-preview { flex: none; width: 56px; height: 56px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.bk-preview-doc { display: grid; place-items: center; background: #fff; font-weight: 700; color: var(--err); font-size: .8rem; }
.bk-copy { display: flex; gap: 10px; margin: 16px 0 0; }
.bsfl-bk .bk-copy-input { flex: 1; min-width: 0; font-size: .9rem; min-height: 50px; }

/* Done */
.bk-done { text-align: center; display: grid; justify-items: center; padding: 18px 0 6px; }
.bk-done .bk-sub { max-width: 44ch; }
.bk-done-badge {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 0 18px; position: relative;
  background: radial-gradient(circle at 30% 30%, #3fb27f, var(--g-700));
  box-shadow: 0 0 0 10px var(--g-50), 0 18px 40px -14px rgba(27, 106, 73, .9);
  animation: bk-pop .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
.bk-done-badge::after {
  content: ""; position: absolute; left: 50%; top: 46%; width: 16px; height: 30px;
  border: solid #fff; border-width: 0 5px 5px 0; transform: translate(-50%, -50%) rotate(45deg);
}
@keyframes bk-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 560px) {
  .bsfl-bk { font-size: 16px; margin-top: 0 !important; }
  .bk-shell { border-radius: 22px; }
  .bk-stage { min-height: 0; }
  .bk-back-text { display: none; }
  .bk-actions .bk-btn { flex: 1; }
  .bk-actions-start { flex-direction: column; align-items: stretch; gap: 10px; }
  .bk-actions-start .bk-hint { text-align: center; }
  .bk-actions-split { flex-direction: column-reverse; align-items: stretch; }
  .bk-ticket { grid-template-columns: 1fr; }
  .bk-ticket-side { border-inline-start: 0; border-top: 2px dashed rgba(255, 255, 255, .35); grid-auto-flow: column; gap: 10px; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .bsfl-bk *, .bsfl-bk *::before, .bsfl-bk *::after { animation: none !important; transition: none !important; }
}
