/* ==========================================================
   CourseLab — training-course parts, on top of kit/pl.css
   brand: «نَبْع» training academy (data-site="nabaa")
   ========================================================== */
[data-site="nabaa"] { --brand: #b5461f; --brand-rgb: 181, 70, 31; --brand-ink: #96391a; --accent: #e0a526; --accent-rgb: 224, 165, 38; --deep: #1b2440; --page: #fffaf5; --surface-2: #f8f1ea; --line: #ece2d8; }
[data-site="nabaa"][data-bs-theme="dark"] { --brand: #cf5a30; --brand-rgb: 207, 90, 48; --brand-ink: #f5a582; --accent: #f0bd4f; --deep: #0b0f1d; --page: #0e0d0f; --surface: #18161a; --surface-2: #201d22; --line: #332e35; }

.num { white-space: nowrap; }
small { font-size: 15px; } /* house minimum: Bootstrap's <small> would render at 13-14px */
.hide-s { }
@media (max-width: 767.98px) { .hide-s { display: none !important; } }
.av { width: 44px; height: 44px; flex: 0 0 auto; display: inline-grid; place-items: center; border-radius: 50%; background: hsl(var(--h, 20) 65% 91%); color: hsl(var(--h, 20) 55% 30%); font-weight: 800; font-size: 18px; }
[data-bs-theme="dark"] .av { background: hsl(var(--h, 20) 30% 24%); color: hsl(var(--h, 20) 70% 82%); }
.av.lg { width: 64px; height: 64px; font-size: 26px; }
.rt { display: inline-flex; align-items: center; gap: .25rem; font-weight: 800; color: var(--ink); white-space: nowrap; }
.rt i { color: #f59e0b; }
.rt small { color: var(--muted); font-weight: 600; }
.crumbs { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: 18px 0 0; list-style: none; color: var(--muted); font-size: 15px; }
.crumbs li + li::before { content: "/"; margin-inline-end: .3rem; opacity: .6; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.box { min-width: 0; padding: clamp(16px, 2vw, 24px); border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.box-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 14px; }
.box-h h2 { font-size: 20px; margin: 0; }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .05rem .7rem; border-radius: 999px; font-size: 15px; font-weight: 800; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.info { background: var(--info-bg); color: var(--info); }
.pill.bad { background: var(--danger-bg); color: var(--danger); } .pill.brand { background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); } .pill.gray { background: var(--surface-2); color: var(--muted); }
.btx.disabled, .btx[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* ---------- header + footer ---------- */
.nb-head { background: color-mix(in srgb, var(--page) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nb-logo .mk { border-radius: 14px 14px 14px 4px; }
.nb-logo small { display: block; color: var(--muted); font-size: 15px; font-weight: 600; line-height: 1.2; }
.nb-head .ph-nav { margin-inline-start: 1rem; }
.nb-user { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .4rem 0 .9rem; padding-inline: .4rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; }
.nb-user .av { width: 34px; height: 34px; font-size: 15px; }
.nb-foot { margin-top: clamp(56px, 7vw, 96px); background: var(--deep); color: #d9dbe6; }
.nb-foot h4 { color: #fff; }
.nb-foot .pf-cols ul a { color: #b9bdd0; }
.nb-foot .pf-cols ul a:hover { color: #fff; }
.nb-foot .pf-bottom { border-color: rgba(255,255,255,.12); color: #b9bdd0; }
.nb-foot .ph-logo { color: #fff; }
.nb-foot p { color: #b9bdd0; }
.nb-acc { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.nb-acc span { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); font-size: 15px; font-weight: 700; color: #e9eaf2; }

/* ---------- course card ---------- */
.cc { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease); }
.cc:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(var(--brand-rgb), .3); }
.cc-ph { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.cc-ph img { width: 100%; height: 100%; object-fit: cover; }
.cc-fmt { position: absolute; top: 12px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .75rem; border-radius: 999px; background: rgba(15, 18, 32, .78); backdrop-filter: blur(4px); color: #fff; font-size: 15px; font-weight: 700; }
.cc-fav { position: absolute; top: 8px; inset-inline-end: 8px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: #1b2440; font-size: 1.1rem; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.cc-fav[aria-pressed="true"] { color: #d92d20; }
.cc-fav[aria-pressed="true"] i::before { content: "\F415"; } /* bi-heart-fill */
.cc-hot { position: absolute; bottom: 12px; inset-inline-start: 12px; padding: .1rem .7rem; border-radius: 8px; background: var(--accent); color: #1b2440; font-size: 15px; font-weight: 800; }
.cc-b { flex: 1; display: flex; flex-direction: column; gap: .55rem; padding: 16px 18px 18px; }
.cc-f { color: var(--brand-ink); font-size: 15px; font-weight: 800; }
.cc h3 { margin: 0; font-size: 19px; line-height: 1.5; }
.cc h3 a { color: inherit; text-decoration: none; }
.cc h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card is the link */
.cc-fav { z-index: 2; } .cc .cc-tr a { position: relative; z-index: 2; }
.cc-tr { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: 15px; font-weight: 600; }
.cc-tr .av { width: 30px; height: 30px; font-size: 15px; }
.cc-m { display: flex; flex-wrap: wrap; gap: .25rem 1rem; color: var(--muted); font-size: 15px; }
.cc-m > span { display: inline-flex; align-items: center; gap: .35rem; }
.cc-when { display: flex; align-items: center; gap: .45rem; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-size: 15px; font-weight: 700; }
.cc-when i { color: var(--brand-ink); }
.cc-ft { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.cc-pr { font-size: 19px; font-weight: 800; }
.cc-pr.free { color: var(--ok); }

/* level: three steps */
.lvl { display: inline-flex; align-items: center; gap: .35rem; }
.lvl i { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.lvl i::before, .lvl i::after, .lvl i b { content: ""; display: block; width: 4px; border-radius: 2px; background: var(--line); }
.lvl i::before { height: 6px; } .lvl i b { height: 10px; } .lvl i::after { height: 14px; }
.lvl[data-l="1"] i::before, .lvl[data-l="2"] i::before, .lvl[data-l="2"] i b, .lvl[data-l="3"] i::before, .lvl[data-l="3"] i b, .lvl[data-l="3"] i::after { background: var(--brand); }

/* seats left */
.seats { display: grid; gap: 4px; font-size: 15px; font-weight: 700; }
.seats .bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.seats .bar i { display: block; height: 100%; width: var(--p, 50%); border-radius: inherit; background: var(--ok); }
.seats.low { color: var(--warn); } .seats.low .bar i { background: var(--warn); }
.seats.full { color: var(--danger); } .seats.full .bar i { background: var(--danger); }

/* progress */
.pbar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pbar i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--brand); transition: width 400ms ease; }
.pbar.ok i { background: var(--ok); }
.ring { --p: 0; --s: 64px; position: relative; width: var(--s); height: var(--s); flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.ring > span { position: relative; font-weight: 800; font-size: 15px; }
.ring.ok { background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--surface-2) 0); }

/* booking-style steps bar */
.steps-b { display: flex; gap: 6px; margin: 18px 0 6px; padding: 0; list-style: none; counter-reset: s; overflow-x: auto; }
.steps-b li { flex: 1 0 auto; display: flex; align-items: center; gap: .5rem; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 15px; white-space: nowrap; }
.steps-b li::before { counter-increment: s; content: counter(s); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); font-weight: 800; }
.steps-b li.done { color: var(--ok); } .steps-b li.done::before { content: "\F26E"; font-family: "bootstrap-icons"; background: var(--ok); color: #fff; }
.steps-b li[aria-current="step"] { background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); } .steps-b li[aria-current="step"]::before { background: var(--brand); color: #fff; }

/* stepper */
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.qty button { width: 44px; height: 44px; border: 0; background: none; color: var(--ink); font-size: 1.15rem; cursor: pointer; }
.qty button:hover:not([disabled]) { background: var(--surface-2); }
.qty button[disabled] { opacity: .35; cursor: not-allowed; }
.qty input { width: 52px; height: 44px; border: 0; background: none; text-align: center; font: 800 17px var(--font); color: var(--ink); direction: ltr; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* sticky summary + phone bar */
.sum { position: sticky; top: calc(var(--head-h) + 16px); display: grid; gap: 12px; padding: 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.sum h2 { font-size: 19px; margin: 0; }
.sum ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sum li { display: flex; justify-content: space-between; gap: .8rem; font-size: 15px; }
.sum li small { display: block; color: var(--muted); }
.sum .tot { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px dashed var(--line); font-weight: 800; }
.sum .tot b { font-size: 21px; }
.mbar { display: none; }
@media (max-width: 991.98px) {
  .sum { position: static; }
  .mbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 50; display: flex; align-items: center; gap: 1rem; padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0,0,0,.08); }
  .mbar .t { flex: 1; display: grid; line-height: 1.4; min-width: 0; }
  .mbar .t > span { color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mbar .t > b { font-size: 18px; }
  body:has(.mbar) { padding-bottom: 80px; }
  body:has(.mbar) .ov-toasts { bottom: 88px; }
}

/* empty / note */
.empty-c { display: grid; justify-items: center; gap: .4rem; padding: 40px 16px; text-align: center; border: 1.5px dashed var(--line); border-radius: 22px; color: var(--muted); }
.empty-c > i { font-size: 2.2rem; color: var(--brand-ink); }
.empty-c > b { color: var(--ink); font-size: 18px; }
.note-b { display: flex; gap: .7rem; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--info-bg); color: var(--ink); font-size: 15px; }
.note-b > i { color: var(--info); font-size: 1.2rem; line-height: 1.6; }
.note-b.warn { background: var(--warn-bg); } .note-b.warn > i { color: var(--warn); }
.note-b.ok { background: var(--ok-bg); } .note-b.ok > i { color: var(--ok); }

/* rows of cards that scroll sideways on phones */
.rail-x { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.rail-x > * { scroll-snap-align: start; }
@media (max-width: 575.98px) { .rail-x { grid-auto-columns: 84%; } }

/* notifications drawer */
.nt-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nt-list li { display: flex; gap: .8rem; padding: 12px; border-radius: 14px; }
.nt-list li.new { background: rgba(var(--brand-rgb), .06); }
.nt-list li > i { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--brand-ink); font-size: 1.1rem; }
.nt-list li > span > b { display: block; }
.nt-list li > span > span { color: var(--muted); font-size: 15px; }
.nb-head .ph-nav a { white-space: nowrap; }
@media (max-width: 1279.98px) { .nb-head .ph-nav li:nth-child(n+4) { display: none; } }
[data-fav][aria-pressed="true"] .bi-heart::before { content: "\F415"; color: #d92d20; } /* saved: filled heart */
/* the hidden input of a chip is absolute: keep it inside its label, or a scrolling chip row leaks it and widens the page */
.fm-chips label { position: relative; }
