/*
 * Black Horse components (D-120). Colors, type and scales come only from the tokens in
 * theme.css. No inline styles in the templates: every look is a class here.
 */

/* ===== Base ======================================================================== */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  line-height: 1.4;
  font-weight: 700;
}

/* Links: never underlined; a clear color, and a clear change on hover and focus. */
a {
  color: var(--bs-link-color);
  text-decoration: none;
  transition: color var(--bh-ease), background-color var(--bh-ease);
}

a:hover {
  color: var(--bs-link-hover-color);
}

/* Keyboard focus: always visible, in the brand's gold. */
:focus-visible {
  outline: 3px solid var(--bh-gold);
  outline-offset: 2px;
  border-radius: var(--bh-radius-sm);
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  outline: none;
  box-shadow: var(--bh-focus);
}

/* Icons: one fixed gap before the text, in RTL too (icons come first). */
.bi {
  margin-inline-end: 0.45em;
  line-height: 1;
}

.btn .bi,
.badge .bi,
.nav-link .bi,
.bh-icon-only .bi,
.bi.bh-solo {
  margin-inline-end: 0;
}

/* Numbers and codes written left to right inside Arabic text (D-133): an English value
   (username, phone, serial, amount) is isolated, so it never reorders the Arabic line
   around it, and it stays on the RIGHT like the rest of the page. */
.bh-ltr,
[dir="ltr"] {
  unicode-bidi: isolate;
}

.bh-ltr {
  direction: ltr;
}

:is(td, th, dd, div, p, li, span)[dir="ltr"] {
  text-align: right;
}

/* Boxes that hold numbers and codes (phone, days, amounts, dates, e-mail, links):
   written left to right inside, placed on the right like every other box. */
.form-control[dir="ltr"],
input[type="number"],
input[type="tel"],
input[type="email"],
input[type="url"],
input[inputmode="numeric"],
input[inputmode="decimal"] {
  direction: ltr;
  text-align: right;
}

/* The browser indents a <dd> on its start side; in a left-to-right <dd> that start is
   the left, which pushed values under their titles (D-133). */
dd {
  margin-inline-start: 0;
}

/* ===== Header and footer ============================================================= */
.bh-navbar,
.bh-footer {
  background-color: var(--bh-black);
  color: var(--bh-on-dark);
}

.bh-navbar .navbar-brand {
  color: var(--bh-gold);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.bh-navbar .navbar-brand:hover {
  color: var(--bh-gold-light);
}

.bh-footer a {
  color: var(--bh-gold-light);
}

.bh-footer a:hover {
  color: var(--bh-on-dark);
}

.bh-user-name {
  color: var(--bh-on-dark);
  opacity: 0.85;
}

/* ===== Buttons: one height, one icon gap, four kinds ================================= */
.btn {
  --bs-btn-font-weight: 600;
  --bs-btn-padding-x: 1rem;
  --bs-btn-padding-y: 0.45rem;
  --bs-btn-border-radius: var(--bh-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  transition: color var(--bh-ease), background-color var(--bh-ease),
    border-color var(--bh-ease), box-shadow var(--bh-ease);
}

.btn-sm {
  --bs-btn-padding-x: 0.75rem;
  --bs-btn-padding-y: 0.25rem;
  --bs-btn-font-size: var(--bh-text-sm);
  min-height: 2rem;
  gap: 0.35rem;
}

.btn.btn-lg {
  --bs-btn-padding-y: 0.65rem;
  --bs-btn-font-size: var(--bh-text-lg);
  min-height: 3.25rem;
}

/* Primary: gold */
.btn-primary,
.btn-gold {
  --bs-btn-color: var(--bh-on-gold);
  --bs-btn-bg: var(--bh-gold);
  --bs-btn-border-color: var(--bh-gold);
  --bs-btn-hover-color: var(--bh-on-gold);
  --bs-btn-hover-bg: var(--bh-gold-light);
  --bs-btn-hover-border-color: var(--bh-gold-light);
  --bs-btn-active-color: var(--bh-on-gold);
  --bs-btn-active-bg: var(--bh-gold-dark);
  --bs-btn-active-border-color: var(--bh-gold-dark);
  --bs-btn-disabled-color: var(--bh-on-gold);
  --bs-btn-disabled-bg: var(--bh-gold);
  --bs-btn-disabled-border-color: var(--bh-gold);
  font-weight: 700;
}

/* Secondary: dark */
.btn-dark,
.btn-secondary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--bh-dark);
  --bs-btn-border-color: var(--bh-dark);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--bh-black);
  --bs-btn-hover-border-color: var(--bh-black);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--bh-black);
  --bs-btn-active-border-color: var(--bh-black);
  --bs-btn-disabled-bg: var(--bh-dark);
  --bs-btn-disabled-border-color: var(--bh-dark);
}

/* Outline: neutral */
.btn-outline-dark,
.btn-outline-secondary,
.btn-light {
  --bs-btn-color: var(--bh-ink);
  --bs-btn-bg: var(--bh-card);
  --bs-btn-border-color: var(--bh-gray-300);
  --bs-btn-hover-color: var(--bh-ink);
  --bs-btn-hover-bg: var(--bh-gray-50);
  --bs-btn-hover-border-color: var(--bh-ink);
  --bs-btn-active-color: var(--bh-ink);
  --bs-btn-active-bg: var(--bh-gray-100);
  --bs-btn-active-border-color: var(--bh-ink);
  --bs-btn-disabled-color: var(--bh-muted);
  --bs-btn-disabled-bg: var(--bh-card);
  --bs-btn-disabled-border-color: var(--bh-gray-200);
}

/* Outline: gold (on dark headers and for gold actions) */
.btn-outline-gold,
.btn-outline-primary {
  --bs-btn-color: var(--bh-gold-dark);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--bh-gold);
  --bs-btn-hover-color: var(--bh-on-gold);
  --bs-btn-hover-bg: var(--bh-gold);
  --bs-btn-hover-border-color: var(--bh-gold);
  --bs-btn-active-color: var(--bh-on-gold);
  --bs-btn-active-bg: var(--bh-gold-dark);
  --bs-btn-active-border-color: var(--bh-gold-dark);
}

.bh-navbar .btn-outline-gold,
.bh-hero .btn-outline-gold {
  --bs-btn-color: var(--bh-gold-light);
}

/* Danger */
.btn-danger {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--bh-danger);
  --bs-btn-border-color: var(--bh-danger);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--bh-danger-ink);
  --bs-btn-hover-border-color: var(--bh-danger-ink);
  --bs-btn-active-bg: var(--bh-danger-ink);
  --bs-btn-active-border-color: var(--bh-danger-ink);
}

.btn-outline-danger {
  --bs-btn-color: var(--bh-danger);
  --bs-btn-bg: var(--bh-card);
  --bs-btn-border-color: var(--bh-danger);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--bh-danger);
  --bs-btn-hover-border-color: var(--bh-danger);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--bh-danger-ink);
  --bs-btn-active-border-color: var(--bh-danger-ink);
}

/* Confirming (success) and warning actions */
.btn-success {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--bh-success);
  --bs-btn-border-color: var(--bh-success);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--bh-success-ink);
  --bs-btn-hover-border-color: var(--bh-success-ink);
  --bs-btn-active-bg: var(--bh-success-ink);
  --bs-btn-active-border-color: var(--bh-success-ink);
}

.btn-outline-success {
  --bs-btn-color: var(--bh-success);
  --bs-btn-bg: var(--bh-card);
  --bs-btn-border-color: var(--bh-success);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--bh-success);
  --bs-btn-hover-border-color: var(--bh-success);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--bh-success-ink);
  --bs-btn-active-border-color: var(--bh-success-ink);
}

.btn-warning {
  --bs-btn-color: var(--bh-ink);
  --bs-btn-bg: var(--bh-warning);
  --bs-btn-border-color: var(--bh-warning);
  --bs-btn-hover-color: var(--bh-ink);
  --bs-btn-hover-bg: var(--bh-warning-hover);
  --bs-btn-hover-border-color: var(--bh-warning-hover);
  --bs-btn-active-color: var(--bh-ink);
  --bs-btn-active-bg: var(--bh-warning-press);
  --bs-btn-active-border-color: var(--bh-warning-press);
}

.btn-outline-warning {
  --bs-btn-color: var(--bh-warning-ink);
  --bs-btn-bg: var(--bh-card);
  --bs-btn-border-color: var(--bh-warning);
  --bs-btn-hover-color: var(--bh-ink);
  --bs-btn-hover-bg: var(--bh-warning);
  --bs-btn-hover-border-color: var(--bh-warning);
}

.btn-info {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--bh-info);
  --bs-btn-border-color: var(--bh-info);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--bh-info-ink);
  --bs-btn-hover-border-color: var(--bh-info-ink);
}

.btn-link {
  --bs-btn-color: var(--bs-link-color);
  --bs-btn-hover-color: var(--bs-link-hover-color);
  --bs-btn-active-color: var(--bs-link-hover-color);
  text-decoration: none;
}

/* A submitted form: its button waits, and can't be pressed twice (static/js/app.js). */
.btn.is-loading {
  pointer-events: none;
  opacity: 0.85;
}

.btn.is-loading::after {
  content: "";
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: bh-spin 0.7s linear infinite;
}

@keyframes bh-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Forms ======================================================================== */
.form-label {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-control,
.form-select {
  border-color: var(--bh-gray-300);
  border-radius: var(--bh-radius-sm);
  min-height: 2.5rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--bh-gold);
}

.form-check-input:checked {
  background-color: var(--bh-gold);
  border-color: var(--bh-gold-dark);
}

.form-check-input:focus {
  border-color: var(--bh-gold);
}

.form-text {
  color: var(--bh-muted);
}

.invalid-feedback {
  color: var(--bh-danger);
  font-weight: 600;
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--bh-danger);
}

/* ===== Surfaces: cards and the page's boxes ========================================== */
.card,
.bg-white.border.rounded {
  border-color: var(--bh-gray-200) !important;
  border-radius: var(--bh-radius) !important;
  box-shadow: var(--bh-shadow-sm);
}

.card {
  --bs-card-border-color: var(--bh-gray-200);
  --bs-card-border-radius: var(--bh-radius);
}

/* ===== Badges: one color per state, everywhere ====================================== */
.badge {
  --bs-badge-font-weight: 700;
  --bs-badge-padding-x: 0.65em;
  --bs-badge-padding-y: 0.4em;
  --bs-badge-border-radius: var(--bh-radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  line-height: 1.2;
}

.text-bg-success {
  color: #fff !important;
  background-color: var(--bh-success) !important;
}

.text-bg-danger {
  color: #fff !important;
  background-color: var(--bh-danger) !important;
}

.text-bg-warning {
  color: var(--bh-ink) !important;
  background-color: var(--bh-warning) !important;
}

.text-bg-info {
  color: #fff !important;
  background-color: var(--bh-info) !important;
}

.text-bg-secondary {
  color: #fff !important;
  background-color: var(--bh-muted) !important;
}

.text-bg-dark {
  color: var(--bh-gold-light) !important;
  background-color: var(--bh-black) !important;
}

.text-bg-light {
  color: var(--bh-ink) !important;
  background-color: var(--bh-gray-50) !important;
}

.text-bg-primary {
  color: var(--bh-on-gold) !important;
  background-color: var(--bh-gold) !important;
}

.text-success {
  color: var(--bh-success) !important;
}

.text-danger {
  color: var(--bh-danger) !important;
}

.text-warning {
  color: var(--bh-warning-ink) !important;
}

.text-info {
  color: var(--bh-info) !important;
}

.text-gold {
  color: var(--bh-gold-dark);
}

.bh-gift-badge {
  background-color: var(--bh-gold);
  color: var(--bh-on-gold);
}

/* ===== Alerts ======================================================================= */
.alert {
  --bs-alert-border-radius: var(--bh-radius);
  border-inline-start-width: 4px;
}

.alert-success {
  border-inline-start-color: var(--bh-success);
}

.alert-danger,
.alert-error {
  --bs-alert-color: var(--bh-danger-ink);
  --bs-alert-bg: var(--bh-danger-tint);
  --bs-alert-border-color: var(--bs-danger-border-subtle);
  border-inline-start-color: var(--bh-danger);
}

.alert-warning {
  border-inline-start-color: var(--bh-warning);
}

.alert-info {
  border-inline-start-color: var(--bh-info);
}

.alert-light {
  border-inline-start-color: var(--bh-gold);
}

/* ===== Tables ======================================================================= */
/* A table that scrolls sideways keeps everything inside it, even its hidden header
   texts (.visually-hidden is position: absolute): without this they escaped past the
   screen's left edge on a phone and made the whole page wider (D-134). */
.table-responsive {
  position: relative;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: var(--bh-gray-50);
  margin-bottom: 0;
}

.table > thead th {
  font-size: var(--bh-text-sm);
  font-weight: 700;
  color: var(--bh-muted);
  background: var(--bh-gray-50);
  white-space: nowrap;
  border-bottom-width: 1px;
}

.table > tbody > tr:hover > * {
  background-color: var(--bh-gray-50);
}

.table td,
.table th {
  padding: 0.6rem 0.75rem;
  vertical-align: middle;
}

/* ===== Navigation pieces ============================================================ */
.nav-pills {
  --bs-nav-pills-link-active-bg: var(--bh-black);
  --bs-nav-pills-link-active-color: var(--bh-gold-light);
  --bs-nav-link-color: var(--bh-ink);
  --bs-nav-link-hover-color: var(--bh-gold-darker);
}

.nav-pills .nav-link {
  background: var(--bh-card);
}

.nav-tabs {
  --bs-nav-tabs-link-active-color: var(--bh-black);
  --bs-nav-tabs-link-active-border-color: var(--bh-gray-200) var(--bh-gray-200) var(--bh-card);
  --bs-nav-link-color: var(--bh-muted);
  --bs-nav-link-hover-color: var(--bh-gold-darker);
}

.nav-tabs .nav-link.active {
  font-weight: 700;
  border-top: 3px solid var(--bh-gold);
}

.pagination {
  --bs-pagination-color: var(--bh-ink);
  --bs-pagination-hover-color: var(--bh-gold-darker);
  --bs-pagination-active-bg: var(--bh-black);
  --bs-pagination-active-border-color: var(--bh-black);
  --bs-pagination-active-color: var(--bh-gold-light);
  --bs-pagination-focus-box-shadow: var(--bh-focus);
}

.breadcrumb {
  --bs-breadcrumb-item-active-color: var(--bh-muted);
  --bs-breadcrumb-divider-color: var(--bh-gray-500);
}

.progress {
  --bs-progress-bar-bg: var(--bh-success);
  --bs-progress-bg: var(--bh-gray-100);
}

.dropdown-menu {
  --bs-dropdown-link-active-bg: var(--bh-gold);
  --bs-dropdown-link-active-color: var(--bh-on-gold);
}

/* ===== Page header and empty states ================================================= */
.bh-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--bh-space-3);
  margin-bottom: var(--bh-space-4);
}

.bh-page-head h1 {
  margin: 0;
}

.bh-back {
  display: inline-flex;
  align-items: center;
  font-size: var(--bh-text-sm);
  font-weight: 600;
  min-height: 2rem;
}

.bh-empty {
  text-align: center;
  color: var(--bh-muted);
  padding: var(--bh-space-6) var(--bh-space-4);
}

.bh-empty .bi {
  display: block;
  margin: 0 auto var(--bh-space-2);
  font-size: 2.25rem;
  color: var(--bh-gray-300);
}

/* ===== Sign-in pages: one centered card ============================================== */
.bh-auth-card {
  max-width: 30rem;
  margin: 0 auto;
  background: var(--bh-card);
  border: 1px solid var(--bh-gray-200);
  border-radius: var(--bh-radius-lg);
  box-shadow: var(--bh-shadow);
  padding: var(--bh-space-6) var(--bh-space-5);
}

.bh-auth-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bh-gold-tint);
  color: var(--bh-gold-darker);
  font-size: 1.6rem;
}

.bh-auth-icon .bi {
  margin: 0;
}

.bh-auth-lead {
  color: var(--bh-muted);
  margin: 0;
}

.bh-auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--bh-space-2);
  margin-top: var(--bh-space-4);
  font-size: var(--bh-text-sm);
}

.bh-auth-divider {
  border-top: 1px solid var(--bh-gray-100);
  margin: var(--bh-space-5) 0 var(--bh-space-4);
}

@media (max-width: 575.98px) {
  .bh-auth-card {
    padding: var(--bh-space-5) var(--bh-space-4);
  }
}

/* ===== Notifications: an unread one stands out in gold ============================= */
.bh-notification {
  color: inherit;
  transition: border-color var(--bh-ease), box-shadow var(--bh-ease);
}

.bh-notification:hover {
  border-color: var(--bh-gold) !important;
  box-shadow: var(--bh-shadow-sm);
}

.bh-notification.is-unread {
  border: 2px solid var(--bh-gold) !important;
  background: var(--bh-card);
}

/* ===== Width and size utilities (instead of inline styles) =========================== */
.bh-mw-320 { max-width: 320px; }
.bh-mw-360 { max-width: 360px; }
.bh-mw-420 { max-width: 420px; }
.bh-mw-480 { max-width: 480px; }
.bh-mw-560 { max-width: 560px; }
.bh-mw-576 { max-width: 36rem; }
.bh-mw-640 { max-width: 640px; }
.bh-mw-720 { max-width: 720px; }
.bh-mw-760 { max-width: 760px; }
.bh-mw-900 { max-width: 900px; }
.bh-minw-220 { min-width: 220px; }
.bh-minw-240 { min-width: 240px; }
.bh-w-3rem { width: 3rem; }
.bh-mh-64 { max-height: 64px; }
.bh-mh-160 { max-height: 160px; }
.bh-mh-200 { max-height: 200px; }
.bh-sticky-1 { position: sticky; top: 1rem; }
.bh-icon-xl { font-size: 3rem; }
.bh-icon-xs { font-size: 0.7rem; }

/* ===== Home page ==================================================================== */
.bh-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 120% at 85% 0%, var(--bh-hero-glow) 0%, var(--bh-black) 55%);
  color: var(--bh-on-dark);
  border-bottom: 4px solid var(--bh-gold);
}

.bh-hero h1 {
  color: #fff;
  font-size: var(--bh-text-3xl);
  font-weight: 800;
  line-height: 1.3;
}

.bh-hero .bh-hero-lead {
  color: var(--bh-on-dark);
  opacity: 0.88;
  font-size: var(--bh-text-lg);
  max-width: 38rem;
}

.bh-hero .text-gold,
.bh-on-black-gold {
  color: var(--bh-gold-light);
}

.bh-section {
  padding: var(--bh-space-7) 0;
}

.bh-section-alt {
  background: var(--bh-card);
  border-top: 1px solid var(--bh-gray-100);
  border-bottom: 1px solid var(--bh-gray-100);
}

.bh-section-title {
  font-size: var(--bh-text-2xl);
  font-weight: 800;
  margin-bottom: var(--bh-space-2);
}

.bh-eyebrow {
  display: inline-block;
  font-size: var(--bh-text-sm);
  font-weight: 700;
  color: var(--bh-gold-dark);
  letter-spacing: 0.02em;
  margin-bottom: var(--bh-space-2);
}

.bh-step,
.bh-feature,
.bh-plan {
  background: var(--bh-card);
  border: 1px solid var(--bh-gray-200);
  border-radius: var(--bh-radius);
  box-shadow: var(--bh-shadow-sm);
  height: 100%;
  padding: var(--bh-space-5);
  transition: transform var(--bh-ease), box-shadow var(--bh-ease), border-color var(--bh-ease);
}

.bh-plan:hover,
.bh-feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--bh-shadow);
  border-color: var(--bh-gold);
}

.bh-plan-featured {
  border: 2px solid var(--bh-gold);
}

.bh-plan-price {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--bh-black);
  line-height: 1.1;
}

.bh-step-number {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bh-gold);
  color: var(--bh-on-gold);
  font-weight: 800;
  font-size: 1.25rem;
}

.bh-feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--bh-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bh-gold-tint);
  color: var(--bh-gold-darker);
  font-size: 1.4rem;
}

.bh-feature-icon .bi {
  margin: 0;
}

.bh-partner {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--bh-card);
  border: 1px solid var(--bh-gray-200);
  border-radius: var(--bh-radius);
  padding: var(--bh-space-3) var(--bh-space-4);
  height: 100%;
}

.bh-cta-band {
  background: var(--bh-black);
  color: var(--bh-on-dark);
  border-radius: var(--bh-radius-lg);
  padding: var(--bh-space-6);
}

.bh-faq .accordion-button {
  font-weight: 700;
}

.bh-faq .accordion-button:not(.collapsed) {
  color: var(--bh-black);
  background: var(--bh-gold-tint);
  box-shadow: none;
}

.bh-faq .accordion-button:focus {
  box-shadow: var(--bh-focus);
}

.bh-faq {
  --bs-accordion-border-color: var(--bh-gray-200);
  --bs-accordion-btn-focus-box-shadow: var(--bh-focus);
}

.bh-hero-facts {
  display: grid;
  gap: var(--bh-space-3);
}

.bh-hero-fact {
  display: flex;
  align-items: center;
  gap: var(--bh-space-4);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(var(--bh-gold-rgb), 0.35);
  border-radius: var(--bh-radius);
  padding: var(--bh-space-4) var(--bh-space-5);
}

.bh-hero-fact > .bi {
  font-size: 1.75rem;
  color: var(--bh-gold-light);
  margin: 0;
}

.bh-hero-fact strong {
  display: block;
  color: #fff;
  font-size: var(--bh-text-lg);
}

.bh-hero-fact span {
  color: var(--bh-on-dark);
  opacity: 0.8;
  font-size: var(--bh-text-sm);
}

.bh-plan-points li {
  display: flex;
  align-items: baseline;
  padding: 0.3rem 0;
  border-bottom: 1px dashed var(--bh-gray-200);
}

.bh-plan-points li:last-child {
  border-bottom: 0;
}

.bh-plan-points .bi {
  color: var(--bh-gold-dark);
}

.bh-cta-text {
  color: var(--bh-on-dark);
  opacity: 0.85;
  max-width: 36rem;
}

.bh-footer-title {
  color: var(--bh-gold-light);
  font-weight: 700;
  font-size: var(--bh-text-md);
  margin-bottom: var(--bh-space-2);
}

.bh-footer-list li {
  display: flex;
  align-items: baseline;
  margin-bottom: 0.35rem;
  color: var(--bh-on-dark);
  opacity: 0.9;
}

.bh-footer-list .bi {
  color: var(--bh-gold-light);
}

.bh-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--bh-on-dark);
  opacity: 0.75;
}

.bh-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--bh-touch);
  height: var(--bh-touch);
  border-radius: 50%;
  border: 1px solid rgba(var(--bh-gold-rgb), 0.4);
}

.bh-social a .bi {
  margin: 0;
}

.bh-social a:hover {
  background: var(--bh-gold);
  color: var(--bh-on-gold);
}

/* ===== Staff panel: the sidebar on the start side (right in RTL); offcanvas below lg ==
   One scrollbar for the page (D-133): the top bar has one fixed height, the layout fills
   exactly the rest of the screen, and the sidebar sticks under the bar. It scrolls on its
   own only when it is taller than the screen, with a thin bar shown on hover. */
:root {
  --bh-topbar-h: 3.5rem;
  --bh-sidebar-w: 17.5rem;
}

.bh-staff-top {
  min-height: var(--bh-topbar-h);
}

@media (min-width: 992px) {
  .bh-staff-top {
    height: var(--bh-topbar-h);
  }

  .bh-staff-top > .container-fluid {
    flex-wrap: nowrap;
  }
}

.bh-staff-layout {
  display: flex;
  min-height: calc(100vh - var(--bh-topbar-h));
}

.bh-sidebar {
  --bs-offcanvas-bg: var(--bh-black-soft);
  --bs-offcanvas-color: var(--bh-on-dark);
  --bs-offcanvas-width: var(--bh-sidebar-w);
}

@media (min-width: 992px) {
  /* Bootstrap makes .offcanvas-lg transparent on large screens: the background lives on
     this wrapper. */
  .bh-sidebar-wrap {
    width: var(--bh-sidebar-w);
    flex-shrink: 0;
    background: var(--bh-black-soft);
    position: sticky;
    top: var(--bh-topbar-h);
    align-self: flex-start;
    height: calc(100vh - var(--bh-topbar-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
  }

  .bh-sidebar-wrap:hover,
  .bh-sidebar-wrap:focus-within {
    scrollbar-color: var(--bh-gray-500) transparent;
  }
}

.bh-staff-main {
  flex: 1;
  min-width: 0;
  padding: var(--bh-space-5);
}

/* The quick card search in the top bar: an icon and a clear placeholder */
.bh-header-search {
  max-width: 20rem;
}

/* A phone: the bar is one line (D-145); the search box opens under it from its icon. */
@media (max-width: 991.98px) {
  .bh-staff-top > .container-fluid {
    flex-wrap: nowrap;
  }

  .bh-staff-top .bh-header-search {
    display: none;
  }

  .bh-staff-top.bh-search-open > .container-fluid {
    flex-wrap: wrap;
  }

  .bh-staff-top.bh-search-open .bh-header-search {
    display: block;
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }

  .bh-staff-top .navbar-brand {
    font-size: 1.1rem;
  }
}

.bh-header-search .input-group-text {
  background: var(--bh-black-soft);
  border-color: var(--bh-gray-500);
  color: var(--bh-gold-light);
}

.bh-header-search .input-group-text .bi {
  margin: 0;
}

.bh-header-search .form-control {
  border-color: var(--bh-gray-500);
}

/* One line per item: a long name is cut with «…» and shown whole on hover (title). */
.bh-nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--bh-on-dark);
  padding: 0.45rem 1.1rem;
  line-height: 1.5;
  white-space: nowrap;
  border-inline-start: 4px solid transparent;
}

.bh-nav-link span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.bh-nav-link .bi {
  margin: 0;
  flex-shrink: 0;
}

.bh-nav-link:hover,
.bh-nav-link:focus {
  color: var(--bh-gold-light);
  background: rgba(255, 255, 255, 0.06);
}

/* The page you are on: a gold bar, a gold tint, bold white text */
.bh-nav-link.active {
  color: #fff;
  background: rgba(var(--bh-gold-rgb), 0.24);
  border-inline-start-color: var(--bh-gold);
  font-weight: 700;
}

.bh-nav-link.active .bi {
  color: var(--bh-gold-light);
}

.bh-tile {
  background: var(--bh-card);
  color: var(--bh-black);
  border: 1px solid var(--bh-gray-200);
  border-radius: var(--bh-radius);
  box-shadow: var(--bh-shadow-sm);
  transition: border-color var(--bh-ease), transform var(--bh-ease);
}

.bh-tile:hover {
  border-color: var(--bh-gold);
  color: var(--bh-black);
  transform: translateY(-2px);
}

.bh-tile .bi {
  color: var(--bh-gold-dark);
}

/* Audit log: changed fields stand out */
.bh-diff .bh-changed > td {
  background-color: var(--bh-warning-tint);
  font-weight: 600;
}

/* ===== Merchant portal (mobile first): slim top bar + fixed bottom navigation ======== */
.bh-portal-top {
  position: sticky;
  top: 0;
  z-index: 1020;
}

.bh-portal-body {
  max-width: 720px;
  padding-bottom: 5.5rem !important; /* room for the bottom navigation */
}

.bh-portal-nav {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 1030;
  display: flex;
  background-color: var(--bh-black);
  border-top: 2px solid var(--bh-gold);
  padding-bottom: env(safe-area-inset-bottom);
}

.bh-portal-nav a {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-height: var(--bh-touch);
  padding: 0.5rem 0.25rem;
  color: var(--bh-on-dark);
  font-size: 0.8rem;
}

.bh-portal-nav a .bi {
  font-size: 1.35rem;
  margin: 0;
}

.bh-portal-nav a.active,
.bh-portal-nav a:hover {
  color: var(--bh-gold-light);
  font-weight: 700;
}

.btn.bh-scan-button,
.bh-scan-button {
  min-height: 5.5rem;
  font-size: 1.25rem;
}

/* Card images made by the print renderer (task 2.3): keep the real card ratio. */
.bh-card-image {
  width: 100%;
  max-width: 420px;
  height: auto;
  background: #fff;
}

/* ===== Public card page /v/<token> (task 2.8): mobile first, no JavaScript ========== */
.bh-public-card {
  background-color: var(--bh-surface);
}

.bh-public-logo {
  max-height: 48px;
  width: auto;
}

.bh-public-status {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: var(--bh-radius-pill);
  font-weight: 700;
  font-size: 1.05rem;
  border: 1px solid transparent;
}

.bh-status-active {
  background-color: var(--bh-success);
  color: #fff;
}

.bh-status-not_activated {
  background-color: var(--bh-card);
  border-color: var(--bh-muted);
  color: var(--bh-black);
}

.bh-status-expired,
.bh-status-suspended {
  background-color: var(--bh-warning);
  color: var(--bh-ink);
}

.bh-status-cancelled {
  background-color: var(--bh-danger);
  color: #fff;
}

/* ===== Discount screens (task 4.4): one hand, clear colors ========================== */
.bh-result {
  border-radius: var(--bh-radius);
  padding: 1rem;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

.bh-result-green {
  background-color: var(--bh-success);
}

.bh-result-orange {
  background-color: var(--bh-warning);
  color: var(--bh-ink);
}

.bh-result-red {
  background-color: var(--bh-danger);
}

.bh-result .bi {
  font-size: 2.25rem;
  display: block;
  margin: 0 auto 0.25rem;
}

.bh-offer-row {
  border-inline-start: 0.4rem solid var(--bh-success);
}

.bh-offer-row.bh-offer-off {
  border-inline-start-color: var(--bh-danger);
  opacity: 0.85;
}

.bh-big-text {
  font-size: 1.6rem;
  font-weight: 700;
}

.bh-reference {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.btn.bh-thumb-button,
.bh-thumb-button {
  min-height: 4rem;
  font-size: 1.25rem;
  font-weight: 700;
}

/* ===== Referral cycles: a cell per position, the incentive slots in gold ============ */
.bh-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.bh-cell {
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bh-gray-200);
  border-radius: var(--bh-radius-sm);
  background: var(--bh-card);
  font-size: var(--bh-text-sm);
}

.bh-cell.filled {
  background: var(--bh-success-tint);
  border-color: var(--bh-success-tint);
}

.bh-cell.slot-cell {
  border: 2px solid var(--bh-incentive);
}

.bh-cell.slot-cell.filled {
  background: var(--bh-incentive);
  border-color: var(--bh-incentive);
}

.bh-cell .bi {
  margin: 0;
  font-size: 0.7rem;
}

/* A progress bar without inline styles: the native element, styled. */
progress.bh-progress {
  appearance: none;
  width: 100%;
  height: 0.6rem;
  border: 0;
  border-radius: var(--bh-radius-pill);
  background: var(--bh-gray-100);
  overflow: hidden;
}

progress.bh-progress::-webkit-progress-bar {
  background: var(--bh-gray-100);
}

progress.bh-progress::-webkit-progress-value {
  background: var(--bh-success);
  border-radius: var(--bh-radius-pill);
}

progress.bh-progress::-moz-progress-bar {
  background: var(--bh-success);
  border-radius: var(--bh-radius-pill);
}

/* ===== Phones: everything tappable is at least 44px ================================== */
@media (max-width: 575.98px) {
  .btn,
  .form-control,
  .form-select,
  .nav-link,
  .page-link {
    min-height: var(--bh-touch);
  }

  .btn.btn-sm {
    min-height: 2.5rem;
  }

  .bh-staff-main {
    padding: var(--bh-space-4);
  }

  .bh-section {
    padding: var(--bh-space-6) 0;
  }
}

/* ===== Less motion for those who ask for it ========================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Reports (task 7.1): one number card, one period filter ======================== */
.bh-figure {
  background: var(--bh-card);
  border: 1px solid var(--bh-gray-200);
  border-radius: var(--bh-radius-lg);
  padding: var(--bh-space-4);
  height: 100%;
}

.bh-figure-label {
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
}

.bh-figure-value {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.bh-figure-note {
  color: var(--bs-secondary-color);
  font-size: 0.8rem;
}

.bh-report-filter {
  background: var(--bh-card);
  border: 1px solid var(--bh-gray-200);
  border-radius: var(--bh-radius-lg);
  padding: var(--bh-space-4);
}

/* A server-drawn bar chart (task 7.3): label, bar (SVG rect), value. */
.bh-bars-row {
  display: grid;
  grid-template-columns: minmax(6rem, 10rem) 1fr 3rem;
  align-items: center;
  gap: var(--bh-space-3, 0.75rem);
  margin-bottom: 0.5rem;
}

.bh-bars-label {
  font-size: 0.875rem;
}

.bh-bars-track {
  display: block;
  width: 100%;
  height: 0.85rem;
  border-radius: var(--bh-radius-sm);
  background: var(--bh-gray-200);
}

.bh-bars-fill {
  fill: var(--bh-gold);
}

.bh-bars-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: start;
}

/* ===== Merchant and outlet portal on a computer (D-133) ============================== */
/* The bottom navigation keeps the content's width. */
@media (min-width: 768px) {
  .bh-portal-nav {
    max-width: 720px;
    margin-inline: auto;
    border: 2px solid var(--bh-gold);
    border-bottom: 0;
    border-radius: var(--bh-radius) var(--bh-radius) 0 0;
  }
}

/* The top bar's buttons say what they do: words from 576px; on a phone the icon, with
   its name kept for screen readers. */
.bh-bell-text {
  display: none;
}

@media (min-width: 576px) {
  .bh-portal-top .bh-bell-text {
    display: inline;
  }
}

@media (max-width: 575.98px) {
  .bh-portal-top .bh-btn-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

/* ===== Title: value lists (D-133): one look everywhere ===============================
   <dl class="bh-facts"><dt>اسم المستخدم</dt><dd><span class="bh-ltr">ali</span></dd></dl>
   The value is always beside its title (a long one wraps inside its own column). */
.bh-facts {
  display: grid;
  grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr);
  column-gap: var(--bh-space-4);
  row-gap: 0.4rem;
  align-items: baseline;
}

.bh-facts > dt {
  font-weight: 400;
  color: var(--bh-muted);
  margin: 0;
}

.bh-facts > dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ===== Filter rows (D-133): the boxes and the button stay on one line ================
   The row is aligned by its top; the button's cell has an empty label of the same size,
   so a message under one box only makes that box's own cell longer. */
.bh-filters {
  align-items: flex-start !important;
}

/* a label inline in its line is taller than the spacer by the line's strut: both blocks */
.bh-filters .form-label,
.bh-label-spacer {
  display: block;
}

.bh-label-spacer {
  visibility: hidden;
}

.bh-label-spacer::before {
  content: "\00a0";
}

/* ===== The date box and its calendar (D-133, static/js/datepicker.js) ================ */
.bh-date {
  position: relative;
  display: flex;
  align-items: stretch;
}

.bh-date > .form-control {
  min-width: 0;
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}

.bh-date-btn {
  flex-shrink: 0;
  width: 2.5rem;
  border: 1px solid var(--bh-gray-300);
  border-inline-start: 0;
  border-start-end-radius: var(--bh-radius-sm);
  border-end-end-radius: var(--bh-radius-sm);
  background: var(--bh-gray-50);
  color: var(--bh-gold-dark);
}

.bh-date-btn:hover {
  background: var(--bh-gold-tint);
}

.bh-date-btn .bi {
  margin: 0;
}

.bh-cal {
  position: absolute;
  top: calc(100% + 0.25rem);
  inset-inline-start: 0;
  z-index: 1060;
  width: 17.5rem;
  max-width: calc(100vw - 2rem);
  background: var(--bh-card);
  border: 1px solid var(--bh-gray-200);
  border-radius: var(--bh-radius);
  box-shadow: var(--bh-shadow-lg);
  padding: var(--bh-space-2);
}

/* no room under the box: above it (static/js/datepicker.js measures, D-134) */
.bh-cal.is-above {
  top: auto;
  bottom: calc(100% + 0.25rem);
}

.bh-cal-close {
  display: none;
}

/* A phone (under 576px): the calendar opens from the bottom of the screen, full width,
   over a dimmed page, with bigger days to tap and a close button (D-134). */
.bh-cal.is-sheet {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 1070;
  width: auto;
  max-width: none;
  border-radius: var(--bh-radius-lg) var(--bh-radius-lg) 0 0;
  padding: var(--bh-space-4) var(--bh-space-4) calc(var(--bh-space-4) + env(safe-area-inset-bottom));
}

.bh-cal.is-sheet .bh-cal-day,
.bh-cal.is-sheet .bh-cal-nav {
  min-height: var(--bh-touch);
}

.bh-cal.is-sheet .bh-cal-close {
  display: flex;
  margin-top: var(--bh-space-3);
}

.bh-cal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1065;
  background: rgba(14, 14, 14, 0.45);
}

.bh-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--bh-space-1);
}

.bh-cal-title {
  font-weight: 700;
}

.bh-cal-nav,
.bh-cal-day {
  border: 0;
  background: transparent;
  border-radius: var(--bh-radius-sm);
  min-height: 2.1rem;
}

.bh-cal-nav {
  width: 2.25rem;
  color: var(--bh-gold-dark);
}

.bh-cal-nav .bi {
  margin: 0;
}

.bh-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.15rem;
  text-align: center;
}

.bh-cal-dow {
  font-size: var(--bh-text-xs);
  color: var(--bh-muted);
  padding: 0.2rem 0;
}

.bh-cal-day:hover,
.bh-cal-nav:hover {
  background: var(--bh-gold-tint);
}

.bh-cal-day.is-today {
  box-shadow: inset 0 0 0 1px var(--bh-gold);
}

.bh-cal-day.is-chosen {
  background: var(--bh-gold);
  color: var(--bh-on-gold);
  font-weight: 700;
}

/* A box with an error (Django marks it aria-invalid): red, like .is-invalid */
.form-control[aria-invalid="true"],
.form-select[aria-invalid="true"] {
  border-color: var(--bh-danger);
}

/* ===== Messages: inside the content column, above the page's title (D-133) ========== */
.bh-messages .alert {
  margin-bottom: var(--bh-space-3);
}

/* ===== The footer's site links (D-138) ============================================== */
.bh-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--bh-space-2) var(--bh-space-4);
}

/* ===== The terms and the privacy policy: readable long text ========================= */
.bh-legal {
  line-height: 1.9;
}

/* ===== Forms (D-143) ===================================================================
   Number boxes without the browser's arrows (the phone's number keyboard comes from
   inputmode, set by the widget itself); a label is a block so fields side by side get
   one line (static/js/forms.js). */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.bh-field > .form-label {
  display: flex;
  align-items: flex-end;
}

fieldset > legend.h6 {
  float: none;
  font-size: 1rem;
}

/* The index of a long page (partials/section_toc.html) and its sections. */
.bh-section {
  scroll-margin-top: calc(var(--bh-header-live, var(--bh-topbar-h)) + 1rem);
}

.bh-toc {
  position: sticky;
  top: calc(var(--bh-topbar-h) + 1rem);
  background: var(--bh-card);
  border: 1px solid var(--bh-gray-100);
  border-radius: var(--bs-border-radius);
  padding: 0.75rem;
}

.bh-toc-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-inline-start: 3px solid transparent;
  border-radius: 0.25rem;
  color: var(--bh-ink);
  text-decoration: none;
}

.bh-toc-link:hover {
  background: var(--bh-gray-50);
}

.bh-toc-link.active {
  border-inline-start-color: var(--bh-gold);
  background: var(--bh-gold-tint);
  font-weight: 700;
}

.bh-toc-link.has-error {
  color: var(--bs-danger-text-emphasis);
  border-inline-start-color: var(--bs-danger);
}

.bh-toc-link.has-error .bh-toc-error-mark {
  font-size: 0.85em;
}

.bh-toc-select {
  position: sticky;
  top: var(--bh-header-live, var(--bh-topbar-h)); /* under the bar, however tall (forms.js) */
  z-index: 5;
  padding: 0.5rem 0;
  background: var(--bh-surface);
}

@media (max-width: 991.98px) {
  .bh-section {
    scroll-margin-top: calc(var(--bh-header-live, var(--bh-topbar-h)) + 4rem); /* + the list */
  }
}

/* The unsaved-changes bar (partials/save_bar.html). */
.bh-savebar {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 1030;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bh-black);
  color: var(--bh-on-dark);
  border-top: 3px solid var(--bh-gold);
  box-shadow: 0 -0.25rem 1rem rgba(0, 0, 0, 0.15);
}

.bh-savebar[hidden] {
  display: none;
}

@media (min-width: 992px) {
  .bh-savebar {
    inset-inline-start: var(--bh-sidebar-w); /* beside the staff menu, not over it */
  }
}

body.bh-has-savebar {
  padding-bottom: 5rem;
}

/* One space between fields (D-145), the component's own: 1rem under a field, and none
   in a row whose gutter already spaces its lines (the g-N and gy-N classes), where it would double on a
   phone. (Not Bootstrap's mb-3: it is !important and can't be undone here.) */
.bh-field {
  margin-bottom: 1rem;
}

.row:is(.g-1, .g-2, .g-3, .g-4, .g-5, .gy-1, .gy-2, .gy-3, .gy-4, .gy-5) > * > .bh-field {
  margin-bottom: 0;
}

/* The image upload box (D-145, apps/core/templates/widgets/image_upload.html). */
.bh-image-upload {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.bh-image-thumb {
  flex: 0 0 4.5rem;
  width: 4.5rem;
  height: 4.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--bh-gray-100);
  border-radius: 0.5rem;
  background: var(--bh-gray-50);
  color: var(--bh-gray-500);
}

.bh-image-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.bh-image-thumb .bi {
  font-size: 1.4rem;
  margin: 0;
}

.bh-image-side {
  flex: 1 1 auto;
  min-width: 0;
}

.bh-image-upload.is-removed .bh-image-thumb {
  opacity: 0.35;
}

.bh-image-upload input[type="file"]:focus-visible + label {
  outline: 2px solid var(--bh-gold);
  outline-offset: 2px;
}

/* A value and its copy button side by side (D-149, partials/copy_value.html). */
.bh-copy-value {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* A phone number a customer can call (D-149, {% phone_link %}). */
.bh-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  text-decoration: none;
}

.bh-phone-link .bi {
  margin: 0;
}

/* A box a link jumps to (for example «تغيير المسؤول» to «حسابي», D-151): it comes just
   under the bar that sticks at the top. */
.bh-anchor {
  scroll-margin-top: calc(var(--bh-header-live, 4rem) + 1rem);
}

/* ===== The logo (D-171) ============================================================== */
/* In a black header: the horse head beside the name. */
.bh-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.bh-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--bh-radius-sm);
}

/* On a light background: the logo (black behind it) inside a black, rounded box,
   until the client sends a transparent file. */
.bh-logo-box {
  display: block;
  width: fit-content;
  margin-inline: auto;
  padding: 0.75rem;
  border-radius: var(--bh-radius-lg);
  background: var(--bh-black);
}

.bh-logo-box img {
  display: block;
  max-width: 160px;
  height: auto;
}
