/* 7.9.27 — board readability. Landing hero is NOT restyled here. */

/* —— Filter open: chrome stays sharp, lista/mapa se zamagle —— */
.bu-filter-scrim,
#bu-filter-scrim,
body.bu-filters-open .bu-filter-scrim,
body.bu-filters-open #bu-filter-scrim {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}
body.bu-filters-open .bu-board-bar,
body.bu-filters-open .bu-filter-chrome,
body.bu-filters-open .bu-filters-box {
  position: relative !important;
  z-index: 90 !important;
  overflow: visible !important;
}
body.bu-filters-open .bu-tabs-chrome,
body.bu-filters-open .bu-twin-bars,
body.bu-filters-open .bu-filter-fold,
body.bu-filters-open #bu-filter-fold {
  position: relative !important;
  z-index: 91 !important;
}
body.bu-filters-open #bu-filter-fold,
body.bu-filters-open #bu-filter-fold.open,
body.bu-filters-open #bu-filter-fold[hidden],
body.bu-filters-open .bu-filters-board .bu-filter-fold {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  max-height: none !important;
  overflow: visible !important;
  pointer-events: auto !important;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
  padding: 12px;
  margin-top: 8px;
}
body.bu-filters-open .bu-board-stage,
body.bu-filters-open .bu-term-grid {
  filter: blur(7px);
  pointer-events: none;
  opacity: 0.5;
}
body.bu-filters-open .bu-feed,
body.bu-filters-open .bu-map-pane,
body.bu-filters-open #bu-map,
body.bu-filters-open .bu-dispo,
body.bu-filters-open .bu-board-ai,
body.bu-filters-open .bu-list-head,
body.bu-filters-open .bu-cols-head {
  filter: none !important;
  pointer-events: inherit !important;
  opacity: inherit !important;
}

/* —— Tabs: no horizontal scrollbar, Chrome + beside last tab —— */
body.bu-board-page .bu-tabs-bar,
body.bu-board-page .bu-tabs-chrome .bu-tabs-bar,
body.bu-board-page .bu-tabs-scroll,
body.bu-board-page .bu-tabs-scroll-wrap,
body.bu-board-page .bu-tabs-chrome .bu-tabs-scroll-wrap {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
body.bu-board-page .bu-tabs-bar::-webkit-scrollbar,
body.bu-board-page .bu-tabs-scroll::-webkit-scrollbar,
body.bu-board-page .bu-tabs-scroll-wrap::-webkit-scrollbar,
body.bu-board-page .bu-tabs-chrome .bu-tabs-scroll-wrap::-webkit-scrollbar {
  display: none !important;
  height: 0 !important;
  width: 0 !important;
}
body.bu-board-page .bu-tabs-bar,
body.bu-board-page .bu-tabs-chrome .bu-tabs-bar {
  display: flex !important;
  align-items: flex-end;
  justify-content: flex-start !important;
  gap: 0;
  overflow: hidden !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  min-height: 34px;
}
body.bu-board-page .bu-tabs-chrome .bu-tabs-scroll-wrap {
  flex: 1 1 auto !important;
  max-width: calc(100% - 34px) !important;
  overflow-x: auto;
  overflow-y: hidden;
}
body.bu-board-page .bu-tabs-scroll {
  display: flex !important;
  align-items: flex-end;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 !important;
  min-height: 34px;
}
body.bu-board-page .bu-stab {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px 8px 0 0;
  border: 1px solid #cbd5e1;
  border-bottom: 0;
  background: #dce6f2;
  font-size: 12px !important;
  font-weight: 800;
  color: #334155;
  margin: 0 1px 0 0;
  box-shadow: none;
}
body.bu-board-page .bu-stab.is-on {
  background: #fff;
  color: #1d4ed8;
  border-color: #93c5fd;
  position: relative;
  z-index: 1;
}
body.bu-board-page .bu-tabs-chrome .bu-tab-add,
body.bu-board-page .bu-tabs-chrome #bu-stab-add {
  width: 32px;
  height: 32px;
  border-radius: 8px 8px 0 0;
  border: 1px solid #cbd5e1;
  border-bottom: 0;
  background: #fff;
  color: #1d4ed8;
  margin: 0 0 0 1px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
}

/* —— Listing columns: even, lined, all categories back —— */
body.bu-board-page .bu-c-rel,
body.bu-board-page .bu-c-spec,
body.bu-board-page .bu-c-deal,
body.bu-board-page .bu-c-chev,
body.bu-board-page .bu-c-route { display: none !important; }
body.bu-board-page .bu-c-from,
body.bu-board-page .bu-c-to,
body.bu-board-page .bu-c-veh,
body.bu-board-page .bu-c-w,
body.bu-board-page .bu-c-date,
body.bu-board-page .bu-c-price,
body.bu-board-page .bu-c-eurkm {
  display: block !important;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 10px;
  border-right: 1px solid #e8eef4;
  font-size: 12.5px !important;
  line-height: 1.25;
}
body.bu-board-page .bu-c-eurkm { border-right: 0; }
body.bu-board-page .bu-cols-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 0.62fr) minmax(0, 0.78fr) minmax(0, 0.55fr) minmax(0, 0.48fr) !important;
  gap: 0 !important;
  padding: 6px 4px !important;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 10px !important;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
body.bu-board-page .bu-cols-head span {
  padding: 0 10px;
  border-right: 1px solid #e2e8f0;
}
body.bu-board-page .bu-cols-head span:last-child { border-right: 0; }
body.bu-board-page .bu-feed .bu-item.bu-row.compact {
  display: grid !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 0.62fr) minmax(0, 0.78fr) minmax(0, 0.55fr) minmax(0, 0.48fr) !important;
  gap: 0 !important;
  align-items: center;
  padding: 8px 4px !important;
  min-height: 46px !important;
}
body.bu-board-page.bu-board-truck .bu-cols-head,
body.bu-board-page .bu-board-truck .bu-cols-head,
body.bu-board-page .bu-board-truck .bu-feed .bu-item.bu-row.compact {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, 0.95fr) minmax(0, 0.5fr) minmax(0, 0.75fr) minmax(0, 1fr) !important;
}
body.bu-board-page .bu-c-from { color: #15803d; font-weight: 850; }
body.bu-board-page .bu-c-to { color: #b91c1c; font-weight: 800; }
body.bu-board-page .bu-c-price strong { color: #1d4ed8; font-size: 13px; }
.bu-date-load { font-weight: 800; color: #0f172a; }
.bu-date-sep { margin: 0 4px; color: #94a3b8; }
.bu-date-unload { font-weight: 750; color: #334155; }
.bu-date-time { display: block; font-size: 10px; color: #64748b; font-weight: 700; }

/* —— Map pins: no Leaflet white boxes / white rings —— */
#bu-map .leaflet-div-icon,
#bu-detail-map .leaflet-div-icon,
#bu-map .bu-pin-wrap,
#bu-detail-map .bu-pin-wrap,
.bu-pin-wrap {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
#bu-map .leaflet-marker-shadow,
#bu-detail-map .leaflet-marker-shadow {
  display: none !important;
}
.bu-pin {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 0 !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.3), 0 2px 6px rgba(15, 23, 42, 0.25);
}
.bu-pin.cargo.origin, .bu-pin.truck.origin { background: #16a34a; }
.bu-pin.cargo.dest, .bu-pin.truck.dest {
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3), 0 2px 6px rgba(15, 23, 42, 0.25);
}
.leaflet-marker-icon .pin,
.pin {
  width: 12px !important;
  height: 12px !important;
  border: 0 !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.28);
}
.bu-cluster {
  width: 28px !important;
  height: 28px !important;
  border: 0 !important;
  background: #166534 !important;
  color: #fff !important;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.28);
}
.bu-cluster.is-dest { background: #b91c1c !important; }
.bu-cluster.is-origin { background: #166534 !important; }

/* —— Detail: sheet ABOVE veil (theme.css had modal at 1210, backdrop at 20900) —— */
body.bu-detail-open #bu-detail.bu-detail-modal,
#bu-detail.bu-detail-modal,
.bu-detail-modal {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 20920 !important;
  pointer-events: none !important;
}
body.bu-detail-open #bu-detail.bu-detail-modal {
  pointer-events: none !important;
}
#bu-detail-backdrop.bu-detail-modal-backdrop,
body.bu-detail-open #bu-detail-backdrop,
.bu-detail-modal-backdrop {
  background: rgba(15, 23, 42, 0.28) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 20900 !important;
}
.bu-detail-stage {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  width: min(1120px, calc(100vw - 32px));
  max-height: min(88dvh, 820px);
  pointer-events: auto;
  position: relative;
  z-index: 20921;
}
.bu-detail-modal-sheet {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  z-index: 2;
  pointer-events: auto !important;
  background: #fff !important;
  color: #0f172a !important;
  opacity: 1 !important;
  filter: none !important;
  max-height: min(88dvh, 820px) !important;
  width: auto !important;
}
.bu-detail-fuel-aside {
  flex: 0 0 220px;
  position: relative;
  z-index: 2;
  pointer-events: auto !important;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  padding: 14px;
  color: #0f172a;
  overflow: auto;
}
.bu-fuel-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}
.bu-fuel-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}
.bu-fuel-field input {
  width: 72px;
  height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 8px;
  font-weight: 800;
}
.bu-fuel-out { margin: 10px 0 0; font-size: 14px; font-weight: 900; color: #1d4ed8; }
.bu-detail-modal-info { color: #0f172a !important; }
.bu-dpro-dl { display: grid; gap: 2px; }
.bu-dpro-row { display: grid; grid-template-columns: 118px 1fr; gap: 8px; align-items: baseline; }
.bu-dpro-row dt { color: #64748b; font-size: 11px; font-weight: 800; }
.bu-dpro-row dd { color: #0f172a; font-size: 13px; font-weight: 750; margin: 0; }

/* —— Nalog: same header as board; section tabs only on phone —— */
body.bu-nalog-page .bu-board-header,
body.bu-nalog-page .bu-header-nalog {
  min-height: 44px !important;
  background: #fff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
body.bu-nalog-page .bu-board-header-inner {
  min-height: 44px;
  padding: 0 10px !important;
}
body.bu-nalog-page .bu-board-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
}
@media (min-width: 900px) {
  body.bu-nalog-page .bu-nalog-tabs,
  body.bu-nalog-page .bu-nalog-tabs-mobile,
  body.bu-nalog-page .bu-dash-main > .bu-nalog-tabs-mobile {
    display: none !important;
  }
}

@media (max-width: 899px) {
  body.bu-board-page .bu-cols-head { display: none !important; }
  body.bu-board-page .bu-feed .bu-item.bu-row.compact,
  body.bu-board-page.bu-board-truck .bu-feed .bu-item.bu-row.compact {
    grid-template-columns: 1fr 1fr !important;
    gap: 4px 8px !important;
    padding: 10px 12px !important;
  }
  body.bu-board-page .bu-c {
    border-right: 0 !important;
    padding: 0 !important;
  }
  body.bu-board-page .bu-c-from { grid-column: 1; }
  body.bu-board-page .bu-c-to { grid-column: 2; }
  body.bu-board-page .bu-c-veh,
  body.bu-board-page .bu-c-w,
  body.bu-board-page .bu-c-date,
  body.bu-board-page .bu-c-price,
  body.bu-board-page .bu-c-eurkm { grid-column: auto; }
  .bu-detail-stage { flex-direction: column; width: 100%; }
  .bu-detail-fuel-aside { flex: none; width: 100%; }
  body.bu-filters-open .bu-board-stage { filter: blur(5px); }
}
