/* الواجهة العامة للمريض — tokens + بطاقة الطبيب الموحّدة.
   كل القواعد محصورة تحت .pub حتى لا تتسرّب للوحة الطاقم.
   الخط: Cairo محمَّل أصلاً في layouts/app.blade.php فلا نحمّل خطاً ثانياً. */
.pub {
  --ink: #1C2B5B;
  --ink-2: #3D4768;
  --muted: #5A6382;
  --accent: #F86A5B;
  --ground: #F6F7FB;
  --surface: #FFFFFF;
  --line: #E3E6EF;
  --line-2: #D6DAE6;
  --chip: #E9ECF6;
  --ok-bg: #E8F5EE;  --ok: #0F6B45;
  --warn: #A63A1E;
  --star: #C98A0B;
  --r-card: 16px; --r-btn: 10px; --r-chip: 8px;
  font-family: 'Cairo', system-ui, sans-serif;
  font-size: 16px; line-height: 1.6; color: var(--ink);
}

/* ── أزرار ── */
.pub .pub-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--r-btn);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: filter .15s;
}
.pub .pub-btn-primary { background: var(--accent); color: var(--ink); }
.pub .pub-btn-primary:hover { filter: brightness(.95); color: var(--ink); }
.pub .pub-btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--ink); }

/* ── بطاقة الطبيب ── */
.pub.pub-card {
  display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 20px; margin-bottom: 16px; position: relative;
}
.pub .pub-id { display: flex; gap: 16px; flex: 1 1 340px; min-width: 0; }
.pub .pub-av {
  flex: 0 0 80px; width: 80px; height: 80px; border-radius: 50%; overflow: hidden;
  background: var(--chip); color: var(--ink); display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; text-decoration: none;
}
.pub .pub-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pub .pub-info { min-width: 0; }
.pub .pub-name { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.4; }
.pub .pub-name a { color: var(--ink); text-decoration: none; }
.pub .pub-name a:hover { text-decoration: underline; }
.pub .pub-spec { color: var(--ink-2); }
.pub .pub-loc { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pub .pub-rate { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.pub .pub-rate i { color: var(--star); }
.pub .pub-rate small { color: var(--muted); font-weight: 400; font-size: 16px; }
.pub .pub-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pub .pub-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px;
  border-radius: var(--r-chip); background: var(--chip); color: var(--ink-2); font-size: 16px;
}
.pub .pub-tag-ok { background: var(--ok-bg); color: var(--ok); }
.pub .pub-fav {
  position: absolute; top: 12px; inset-inline-start: 12px; width: 44px; height: 44px;
  border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; border-radius: 50%;
}
.pub .pub-fav.is-fav { color: var(--accent); }

/* ── الإتاحة ── */
.pub .pub-avail { flex: 1 1 300px; max-width: 420px; }
.pub .pub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pub .pub-day-label { display: block; text-align: center; font-weight: 700; margin-bottom: 6px; }
.pub .pub-slots { display: flex; flex-direction: column; gap: 6px; }
.pub .pub-slot {
  display: flex; align-items: center; justify-content: center; min-height: 44px;
  background: var(--chip); color: var(--ink); border-radius: var(--r-chip);
  text-decoration: none; font-weight: 600; direction: ltr;
}
.pub .pub-slot:hover { background: var(--line-2); color: var(--ink); }
.pub .pub-all { display: inline-block; margin-top: 8px; color: var(--ink); font-weight: 600; }
.pub .pub-note { color: var(--ink-2); margin: 0 0 12px; }
.pub .pub-none { color: var(--muted); margin: 0 0 8px; }

/* ── صفحة /doctors: شريط البحث والفلاتر وسطر النتيجة ── */
.pub .pub-h1 { font-size: 28px; font-weight: 700; margin: 0 0 16px; }
.pub .pub-bar {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
}
.pub .pub-bar select, .pub .pub-bar input[type="search"] {
  flex: 1 1 160px; min-width: 0; min-height: 44px; padding: 0 12px; font: inherit; font-size: 16px;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-btn);
}
.pub .pub-bar .pub-btn { flex: 0 0 auto; }
.pub .pub-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.pub .pub-fchip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600;
}
.pub .pub-fchip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pub .pub-result-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 16px; }
.pub .pub-sort {
  min-height: 44px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-btn);
}

/* ── صفحة الطبيب ── */
.pub .pub-doc { max-width: 1200px; margin: 0 auto; padding: 16px; }
.pub .pub-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); margin-bottom: 12px; }
.pub .pub-crumbs a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.pub .pub-crumbs span { color: var(--ink); font-weight: 700; }
.pub .pub-doc-cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.pub .pub-doc-main { flex: 999 1 560px; min-width: 0; }
.pub .pub-panel { flex: 1 1 360px; min-width: 0; }
.pub .pub-sec {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 20px; margin-bottom: 16px;
}
.pub .pub-h2 { font-size: 20px; font-weight: 700; margin: 0 0 12px; }
.pub .pub-text { margin: 0 0 12px; color: var(--ink-2); white-space: pre-line; }
.pub .pub-muted { color: var(--muted); }
.pub .pub-hero { display: flex; flex-wrap: wrap; gap: 16px; position: relative; }
.pub .pub-hero-av { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; background: var(--chip); }
.pub .pub-hero-info { flex: 1 1 260px; min-width: 0; }
.pub .pub-hero-name { font-size: 24px; font-weight: 700; margin: 0; line-height: 1.4; }
.pub .pub-hero-actions { display: flex; gap: 4px; align-items: flex-start; }
.pub .pub-icon-btn {
  width: 44px; height: 44px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  border-radius: 50%; font-size: 18px; cursor: pointer;
}
.pub .pub-icon-btn.is-fav { color: var(--accent); }
.pub .pub-phone { margin-top: 8px; color: var(--muted); }
.pub .pub-phone-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-inline-start: 8px; }
.pub .pub-linkbtn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; background: none; border: 0;
  color: var(--ink); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer;
}
.pub .pub-map { width: 100%; height: 240px; border-radius: var(--r-btn); margin-bottom: 12px; }
.pub .pub-rows, .pub .pub-links { list-style: none; margin: 0; padding: 0; }
.pub .pub-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pub .pub-rows li:last-child { border-bottom: 0; }
.pub .pub-row-val { font-weight: 600; }
.pub .pub-links li { padding: 6px 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.pub .pub-links a { color: var(--ink); font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.pub .pub-review { padding: 12px 0; border-bottom: 1px solid var(--line); }
.pub .pub-review:last-child { border-bottom: 0; }
.pub .pub-review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }

/* ── لوحة الحجز ── */
@media (min-width: 768px) { .pub .pub-panel { position: sticky; top: 120px; } }
.pub .pub-panel-price { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.pub .pub-btn-block { width: 100%; }
.pub .pub-btn[disabled] { opacity: .55; cursor: not-allowed; }
.pub .pub-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pub .pub-tab {
  display: flex; flex-direction: column; align-items: center; min-height: 56px; padding: 6px 4px; font: inherit;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-btn); cursor: pointer;
}
.pub .pub-tab small { color: var(--muted); font-size: 16px; }
.pub .pub-tab[aria-selected="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 700; }
.pub .pub-slotgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; max-height: 280px; overflow: auto; }
.pub .pub-slotgrid[hidden] { display: none; }
.pub .pub-slotbtn {
  min-height: 44px; font: inherit; font-weight: 600; direction: ltr; color: var(--ink);
  background: var(--chip); border: 1px solid transparent; border-radius: var(--r-chip); cursor: pointer;
}
.pub .pub-slotbtn.is-on { background: var(--ink); color: #fff; }
.pub .pub-trust { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 4px; }
.pub .pub-trust i { color: var(--ok); margin-inline-end: 6px; }

.pub .pub-fchip { min-height: 44px; }
.pub .pub-all { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 767px) {
  .pub.pub-page { padding-bottom: 150px !important; }
  /* الهوية ← لوحة الحجز ← بقية الأقسام */
  .pub .pub-doc-cols { flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .pub .pub-doc-main { display: contents; }
  .pub .pub-doc-main > * { order: 3; }
  .pub .pub-doc-main > .pub-hero { order: 1; }
  .pub .pub-panel { order: 2; width: 100%; flex: none; }

  /* الشريط السفلي: فوق شريط التنقّل السفلي للموقع (56px) */
  #bkStickyBar.bk-sticky-cta {
    display: flex !important; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed !important; inset-inline: 0; bottom: 56px; z-index: 998;
    padding: 8px 16px; background: #fff; border-top: 1px solid #E3E6EF; pointer-events: auto;
  }
  #bkStickyBar .bk-sticky-proof { margin: 0; font-size: 16px; font-weight: 600; color: #1C2B5B; text-align: start; }
  #bkStickyBar .bk-sticky-book {
    width: auto; flex: none; min-height: 44px; padding: 0 20px; border-radius: 10px;
    background: #F86A5B; color: #1C2B5B; box-shadow: none; font-weight: 700;
  }
  .pub .pub-hero-name { font-size: 20px; }
  .pub .pub-h1 { font-size: 22px; }
  .pub .pub-avail { max-width: none; }
  .pub.pub-card { padding: 16px; }
}
