html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ===== Public booking pages ===== */
:root {
  --ob-primary: #635bff;
  --ob-primary-dark: #4f46e5;
  --ob-ink: #0a0f1e;
  --ob-muted: #6b7280;
  --ob-border: #e5e7eb;
  --ob-bg: #f7f7fb;
}

.public-body { background: var(--ob-bg); color: var(--ob-ink); }
.public-header { background: #fff; border-bottom: 1px solid var(--ob-border); }
.public-header .brand { font-weight: 800; font-size: 1.15rem; color: var(--ob-ink); text-decoration: none; }
.public-header .brand span { color: var(--ob-primary); }
.public-footer { font-size: .85rem; }

.ob-card {
  background: #fff;
  border: 1px solid var(--ob-border);
  border-radius: 16px;
  padding: 1.75rem;
}

.ob-project-list a.ob-project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--cal-line, #e4e4e7);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  margin-bottom: .85rem;
  transition: box-shadow .15s, border-color .15s;
}
.ob-project-list a.ob-project-card:hover {
  border-color: var(--cal-blue, #0069ff);
  box-shadow: 0 4px 16px rgba(0,105,255,.10);
}
.ob-project-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.ob-project-name { font-weight: 700; font-size: 1.05rem; color: var(--cal-ink, #1a1a1a); }
.ob-project-duration { color: var(--cal-muted, #6b7280); font-size: .88rem; font-weight: 600; white-space: nowrap; }
.ob-project-desc { color: #4b5563; font-size: .92rem; line-height: 1.55; margin: .5rem 0 0; }
.ob-project-go {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-top: .75rem; color: var(--cal-blue, #0069ff); font-weight: 700; font-size: .9rem;
}
.ob-project-list .ob-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; }

.ob-day-picker { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .5rem; }
.ob-day-picker a {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ob-ink);
  background: #fff;
  border: 1px solid var(--ob-border);
  border-radius: 10px;
  padding: .5rem .9rem;
  font-size: .85rem;
  text-align: center;
  min-width: 64px;
}
.ob-day-picker a.active { background: var(--ob-primary); border-color: var(--ob-primary); color: #fff; }
.ob-day-picker a small { display: block; color: inherit; opacity: .7; }

.ob-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem; }
.ob-slot-btn {
  border: 1px solid var(--ob-primary);
  color: var(--ob-primary);
  background: #fff;
  border-radius: 10px;
  padding: .55rem .5rem;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  text-align: center;
  display: block;
}
.ob-slot-btn:hover { background: var(--ob-primary); color: #fff; }

.ob-empty-slots { color: var(--ob-muted); padding: 1.5rem 0; }

/* ===== Admin dashboard ===== */
.admin-body { background: #f4f5fa; margin-bottom: 0; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px;
  flex: 0 0 220px;
  background: #12122b;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem;
}
.admin-brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.05rem; margin-bottom: 1.5rem; display: block; }
.admin-brand span { color: #8b83ff; }
.admin-nav { display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.admin-nav a { color: rgba(255,255,255,.75); text-decoration: none; padding: .6rem .75rem; border-radius: 8px; font-size: .92rem; }
.admin-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-logout { margin-top: 1rem; }
.admin-content { flex: 1; min-width: 0; }

.stat-card { background: #fff; border: 1px solid var(--ob-border); border-radius: 14px; padding: 1.25rem 1.5rem; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; }
.stat-card .stat-label { color: var(--ob-muted); font-size: .85rem; }

/* ===== Calendly-style booking widget (/{org}/{slug}) ===== */
:root {
  --cal-blue: #0069ff;
  --cal-blue-dark: #0055d4;
  --cal-blue-soft: #eef4ff;
  --cal-ink: #1a1a1a;
  --cal-muted: #6b7280;
  --cal-line: #e4e4e7;
}

.cal-body { background: #f8f8f9; margin: 0; min-height: 100vh; }
.cal-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.cal-widget {
  width: 100%;
  max-width: 1130px;
  min-height: 660px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 12px 42px rgba(0,0,0,.10);
  display: flex;
  position: relative;
  overflow: hidden;
}
.cal-ribbon { position: absolute; top: 0; right: 0; width: 132px; height: 132px; overflow: hidden; pointer-events: none; z-index: 3; }
.cal-ribbon span {
  position: absolute; top: 27px; right: -36px; width: 172px;
  transform: rotate(45deg);
  background: #4d4d4d; color: #fff;
  font-size: .6rem; font-weight: 700; letter-spacing: .05em;
  text-align: center; padding: 5px 0; text-transform: uppercase; line-height: 1.35;
}

/* ---- Sidebar ---- */
.cal-side {
  flex: 0 0 340px;
  border-right: 1px solid var(--cal-line);
  display: flex;
  flex-direction: column;
}
/* The wordmark sits in its own bordered band at the top, as a masthead. */
.cal-side-head {
  padding: 2rem 2rem 1.75rem;
  border-bottom: 1px solid var(--cal-line);
  display: flex;
  align-items: center;
  gap: .9rem;
}
.cal-side-logo { max-width: 210px; width: 100%; height: auto; display: block; }
.cal-side-body { padding: 1.75rem 2rem 1.5rem; display: flex; flex-direction: column; flex: 1; }

/* Square "OV" mark cropped from the wordmark — the full lockup is 3.46:1 and turns
   into an illegible smear at avatar size. */
.cal-side-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: contain; display: block; margin-bottom: .9rem; }

.cal-side-org { color: var(--cal-muted); font-size: .95rem; font-weight: 700; margin-bottom: .35rem; }
.cal-side-title { font-size: 1.75rem; font-weight: 800; color: var(--cal-ink); line-height: 1.2; margin-bottom: 1.1rem; letter-spacing: -.01em; }
.cal-side-meta { display: flex; align-items: center; gap: .6rem; color: #4b5563; font-size: 1rem; font-weight: 600; margin-bottom: .65rem; }
.cal-side-meta svg { color: var(--cal-muted); flex: 0 0 auto; }
.cal-side-desc { color: #4b5563; font-size: .95rem; line-height: 1.6; margin-bottom: .9rem; }
.cal-side-cta { font-weight: 700; color: var(--cal-ink); font-size: .95rem; margin-bottom: 1.25rem; }
.cal-side-footer { margin-top: auto; display: flex; gap: 1.5rem; padding-top: 1.25rem; }
.cal-side-footer a { color: var(--cal-blue); font-size: .85rem; text-decoration: none; font-weight: 600; }
.cal-side-footer a:hover { text-decoration: underline; }

/* Back arrow on the details step. */
.cal-back {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--cal-line); background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--cal-blue); text-decoration: none; flex: 0 0 auto;
}
.cal-back:hover { background: var(--cal-blue-soft); }

/* ---- Right panel ---- */
.cal-panel { flex: 1; min-width: 0; padding: 2rem 2.25rem 1.75rem; display: flex; flex-direction: column; }
.cal-panel-title { font-size: 1.4rem; font-weight: 800; color: var(--cal-ink); margin-bottom: 1.5rem; letter-spacing: -.01em; }
.cal-panel-body { display: flex; gap: 2.5rem; flex: 1; min-height: 0; }
.cal-grid-col { flex: 1 1 auto; min-width: 0; max-width: 420px; }
.cal-times-col { flex: 0 0 230px; max-height: 500px; overflow-y: auto; padding-right: .5rem; }

/* Slim scrollbar, like the reference. */
.cal-times-col::-webkit-scrollbar { width: 8px; }
.cal-times-col::-webkit-scrollbar-thumb { background: #b9c0ca; border-radius: 4px; }
.cal-times-col::-webkit-scrollbar-track { background: transparent; }

.cal-month-nav { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-bottom: 1.1rem; }
.cal-month-nav .cal-month-label { font-weight: 700; font-size: 1.05rem; min-width: 150px; text-align: center; color: var(--cal-ink); }
.cal-month-nav a, .cal-month-nav .cal-nav-disabled {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--cal-blue); text-decoration: none; font-size: 1.3rem; line-height: 1;
}
.cal-month-nav a:hover { background: var(--cal-blue-soft); }
.cal-month-nav .cal-nav-disabled { color: #cbd0d8; pointer-events: none; }

.cal-weekdays, .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-weekdays div { text-align: center; font-size: .78rem; font-weight: 700; color: var(--cal-muted); padding-bottom: .65rem; }
.cal-days a, .cal-days span {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  margin: 3px auto;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: .95rem;
  text-decoration: none;
  color: var(--cal-ink);
}
/* Bookable days read as active: tinted disc, blue bold numeral. Unavailable ones stay plain grey. */
.cal-days a { background: var(--cal-blue-soft); color: var(--cal-blue); font-weight: 700; }
.cal-days a:hover { background: #dde9ff; }
.cal-days span.cal-muted { color: #c3c8d0; background: none; font-weight: 400; }
.cal-days a.cal-selected { background: var(--cal-blue); color: #fff; }
.cal-days a.cal-today::after, .cal-days span.cal-today::after {
  content: ""; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--cal-blue);
}
.cal-days a.cal-selected.cal-today::after { background: #fff; }

.cal-tz { margin-top: 1.5rem; font-size: .9rem; color: var(--cal-ink); }
.cal-tz-label { font-weight: 700; margin-bottom: .5rem; }
.cal-tz-value { display: inline-flex; align-items: center; gap: .5rem; color: #374151; }
.cal-tz-value svg { color: var(--cal-muted); flex: 0 0 auto; }

.cal-times-date { font-weight: 700; font-size: 1.05rem; margin-bottom: 1rem; color: var(--cal-ink); }

/* A slot is a row so the "Next" button can slide in beside the selected time. */
.cal-slot { display: flex; gap: .5rem; margin-bottom: .65rem; }
.cal-time-btn {
  flex: 1 1 auto;
  display: block;
  text-align: center;
  border: 1px solid var(--cal-blue);
  color: var(--cal-blue);
  background: #fff;
  border-radius: 4px;
  padding: .8rem .5rem;
  font-weight: 700;
  font-size: .98rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.cal-time-btn:hover { background: var(--cal-blue-soft); color: var(--cal-blue); }
/* Selected: the time turns grey and a blue Next appears next to it. */
.cal-slot.is-selected .cal-time-btn { background: #6b7280; border-color: #6b7280; color: #fff; }
.cal-slot .cal-next-btn {
  flex: 1 1 auto;
  display: none;
  text-align: center;
  background: var(--cal-blue);
  border: 1px solid var(--cal-blue);
  color: #fff;
  border-radius: 4px;
  padding: .8rem .5rem;
  font-weight: 700;
  font-size: .98rem;
  text-decoration: none;
}
.cal-slot.is-selected .cal-next-btn { display: block; }
.cal-slot .cal-next-btn:hover { background: var(--cal-blue-dark); border-color: var(--cal-blue-dark); color: #fff; }
.cal-times-empty { color: var(--cal-muted); font-size: .92rem; padding-top: .5rem; }

/* ---- Details step (Enter Details) ---- */
.cal-form { max-width: 500px; }
.cal-form .form-label { font-weight: 600; font-size: .95rem; color: var(--cal-ink); margin-bottom: .4rem; }
.cal-form .form-label .req { color: #d93025; }
.cal-form .form-control {
  border: 1px solid #b9c0ca; border-radius: 4px; padding: .65rem .75rem; font-size: .98rem;
}
.cal-form .form-control:focus { border-color: var(--cal-blue); box-shadow: 0 0 0 1px var(--cal-blue); }
.cal-form .mb-field { margin-bottom: 1.25rem; }
.cal-submit {
  background: var(--cal-blue); border: none; color: #fff;
  border-radius: 999px; padding: .7rem 1.6rem; font-weight: 700; font-size: 1rem;
}
.cal-submit:hover { background: var(--cal-blue-dark); color: #fff; }
.cal-terms { color: #4b5563; font-size: .9rem; line-height: 1.5; margin: 1.25rem 0 1rem; }
.cal-terms a { color: var(--cal-blue); font-weight: 600; text-decoration: none; }
.cal-terms a:hover { text-decoration: underline; }

@media (max-width: 940px) {
  .cal-widget { flex-direction: column; min-height: 0; max-width: 620px; }
  .cal-side { flex: none; border-right: none; border-bottom: 1px solid var(--cal-line); }
  .cal-panel-body { flex-direction: column; gap: 1.5rem; }
  .cal-grid-col { max-width: none; }
  .cal-times-col { flex: none; max-height: none; }
}

/* ------------------------------------------------------------------ i18n / RTL
   The layouts swap in Bootstrap's own bootstrap.rtl.min.css for fa/ar, which handles
   the grid and utility direction. These rules cover the booking widget's own styles,
   which are hand-written and therefore not mirrored by that swap. */

.lang-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 1rem 0;
}

.lang-opt {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .55rem;
    border: 1px solid #e3e3ea;
    border-radius: 7px;
    background: #fff;
    color: var(--ob-muted, #6b7280);
    font-size: .78rem;
    line-height: 1;
    text-decoration: none;
    transition: border-color .15s, color .15s;
}

.lang-opt:hover { border-color: var(--ob-primary, #635bff); color: var(--ob-ink, #1a1a2e); }

.lang-opt.is-active {
    border-color: var(--ob-primary, #635bff);
    color: var(--ob-ink, #1a1a2e);
    font-weight: 600;
}

.lang-flag {
    width: 18px;
    height: 12px;
    flex: 0 0 auto;
    border-radius: 2px;
    overflow: hidden;
    display: inline-block;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .07);
}

.lang-flag svg { width: 100%; height: 100%; display: block; }

/* On the narrow booking sidebar the names crowd the flags out — show flags only. */
@media (max-width: 991px) {
    .lang-opt .lang-name { display: none; }
}

/* --- Right-to-left (fa, ar) ------------------------------------------------- */

[dir="rtl"] .cal-side,
[dir="rtl"] .cal-times-col,
[dir="rtl"] .cal-panel-title,
[dir="rtl"] .cal-times-date { text-align: right; }

/* The month arrows are drawn as ‹ / › literals, so they must be swapped rather than
   flipped: in RTL "previous" sits on the right and points that way. */
[dir="rtl"] .cal-month-nav { flex-direction: row-reverse; }

/* The "Powered by" ribbon is corner-pinned with a rotation; mirror both. */
[dir="rtl"] .cal-ribbon { right: auto; left: 0; transform: scaleX(-1); }
[dir="rtl"] .cal-ribbon span { display: inline-block; transform: scaleX(-1); }

/* Persian and Arabic text needs a little more line height to stay legible at these sizes. */
[dir="rtl"] body,
[dir="rtl"] .cal-side-desc,
[dir="rtl"] .cal-side-cta { line-height: 1.85; }

/* Keep the calendar grid itself left-to-right: dates read Mon→Sun in both scripts here,
   and mirroring the grid without mirroring the weekday header would misalign the two. */
[dir="rtl"] .cal-days,
[dir="rtl"] .cal-weekdays { direction: ltr; }
