/* 7.9.52 — Mapa miruje do filtera. Nalog spojen. Jezici grupisani. Telefon/tablet/desktop. */

a.bu-mobile-fleet-btn {
  text-decoration: none;
  box-sizing: border-box;
}
html body.bu-board-page a.bu-board-sidebar-fleet {
  text-decoration: none;
  color: inherit;
}
html body.bu-board-page.bu-map-idle #bu-map {
  filter: grayscale(0.35) saturate(0.75) brightness(0.96);
}
html body.bu-board-page.bu-map-idle #bu-map-legend,
html body.bu-board-page.bu-map-idle .bu-map-legend {
  display: none !important;
}
html body.bu-board-page #bu-map-hint,
html body.bu-board-page .bu-map-hint {
  pointer-events: auto !important;
  cursor: pointer !important;
}
html body.bu-board-page #bu-map-hint[hidden],
html body.bu-board-page .bu-map-hint[hidden] {
  display: none !important;
}

/* ========== JEZIK: grupe kao na berzama ========== */
.bu-lang-menu {
  min-width: 240px;
  max-height: min(70vh, 420px);
  overflow: auto;
}
.bu-lang-group {
  padding: 6px 6px 8px;
}
.bu-lang-group + .bu-lang-group {
  border-top: 1px solid #e2e8f0;
}
.bu-lang-group-lab {
  margin: 4px 8px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}
.bu-lang-opt {
  width: 100%;
  text-align: left;
  min-height: 40px;
}

/* ========== NALOG: popuni širinu, bez praznog "prozora" ========== */
html body.bu-nalog-page .bu-dash-main {
  width: 100%;
  max-width: 1080px !important;
}
html body.bu-nalog-page .bu-dash-tiles {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)) !important;
  gap: 10px !important;
}
html body.bu-nalog-page .bu-dash-tile {
  min-height: 88px;
  padding: 14px 14px 16px !important;
}
html body.bu-nalog-page .bu-board-sidebar-pub {
  margin-top: 6px;
  background: rgba(0, 180, 255, 0.16) !important;
  color: #7af0ff !important;
}
html body.bu-nalog-page .bu-nalog-win,
html body.bu-nalog-page .bu-account-panel.is-on,
html body.bu-nalog-page .bu-dash-v2 {
  min-height: calc(100dvh - 140px);
}

/* ========== TELEFON + TABLET: kartice, ne 9-kolona u bijelom ========== */
@media (max-width: 1099px) {
  html body.bu-board-page .bu-c::before,
  html body.bu-board-page .bu-feed .bu-c::before {
    content: none !important;
    display: none !important;
  }
  html body.bu-board-page .bu-cols-head,
  html body.bu-board-page .bu-list-head {
    display: none !important;
  }
  html body.bu-board-page .bu-feed {
    background: #e8edf4 !important;
    min-height: 48vh !important;
    padding: 8px 10px 16px !important;
  }
  html body.bu-board-page .bu-feed .bu-item.bu-row.compact,
  html body.bu-board-page .bu-feed .bu-item.compact,
  html body.bu-board-page .bu-feed .bu-item.compact.cargo,
  html body.bu-board-page .bu-feed .bu-item.compact.truck {
    display: grid !important;
    grid-template-columns: auto auto minmax(0, 1fr) !important;
    gap: 6px 8px !important;
    margin: 8px 10px !important;
    padding: 12px 14px !important;
    background: #fff !important;
    border: 1px solid #dbe3ee !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    overflow: visible !important;
    white-space: normal !important;
    min-height: 76px !important;
    color: #0f172a !important;
  }
  html body.bu-board-page .bu-feed .bu-item.compact .bu-c {
    display: block !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    border: 0 !important;
    padding: 0 !important;
  }
  html body.bu-board-page .bu-feed .bu-item.compact .bu-c-fav {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
  html body.bu-board-page .bu-feed .bu-item.compact.cargo .bu-c-from {
    grid-column: 1 / 3 !important;
    grid-row: 1;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
  }
  html body.bu-board-page .bu-feed .bu-item.compact.cargo .bu-c-to {
    grid-column: 1 / -1 !important;
    grid-row: 2;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
  }
  html body.bu-board-page .bu-feed .bu-item.compact.cargo .bu-c-to::before {
    content: "→ " !important;
    display: inline !important;
    color: #0284c7;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    margin: 0;
    font-size: 14px;
  }
  html body.bu-board-page .bu-feed .bu-item.compact.cargo .bu-c-ldate,
  html body.bu-board-page .bu-feed .bu-item.compact.cargo .bu-c-udate {
    grid-row: 3;
    padding: 3px 8px !important;
    border-radius: 999px;
    font-size: 11px !important;
    font-weight: 800;
    white-space: nowrap !important;
  }
  html body.bu-board-page .bu-feed .bu-item.compact.cargo .bu-c-ldate {
    grid-column: 1;
    background: #ecfdf5;
    color: #166534;
  }
  html body.bu-board-page .bu-feed .bu-item.compact.cargo .bu-c-udate {
    grid-column: 2 / 4;
    justify-self: end;
    background: #fff1f2;
    color: #9f1239;
  }
  html body.bu-board-page .bu-feed .bu-item.compact.cargo .bu-c-veh {
    grid-column: 1 / -1;
    grid-row: 4;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
  }
  html body.bu-board-page .bu-feed .bu-item.compact.cargo .bu-c-w { grid-column: 1; grid-row: 5; }
  html body.bu-board-page .bu-feed .bu-item.compact.cargo .bu-c-ldm { grid-column: 2; grid-row: 5; }
  html body.bu-board-page .bu-feed .bu-item.compact.cargo .bu-c-price {
    grid-column: 3;
    grid-row: 5;
    justify-self: end;
  }
}

/* ========== TELEFON (uključujući obrnuti) ========== */
@media (max-width: 899px) {
  html:has(body.bu-board-page),
  html:has(body.bu-nalog-page),
  html:has(body.bu-lista-chrome) {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
  }
  html body.bu-board-page:not(.bu-nalog-page),
  html body.bu-lista-chrome {
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
    background: #e8edf4 !important;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html body.bu-board-page:not(.bu-nalog-page) .bu-board-shell-wrap,
  html body.bu-lista-chrome .bu-board-shell-wrap,
  html body.bu-board-page:not(.bu-nalog-page) .bu-board-main-col {
    display: block !important;
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
    padding-left: 0 !important;
  }
  html body.bu-board-page aside.bu-board-sidebar,
  html body.bu-nalog-page aside.bu-board-sidebar,
  html body.bu-lista-chrome aside.bu-board-sidebar {
    display: none !important;
  }
  html body.bu-board-page .bu-term-grid {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    grid-template-columns: none !important;
  }
  html body.bu-board-page .bu-board-list:not(.hidden-m),
  html body.bu-board-page #bu-list-pane:not(.hidden-m) {
    display: block !important;
    height: auto !important;
    min-height: 52vh !important;
    overflow: visible !important;
    background: #e8edf4 !important;
  }
  html body.bu-board-page .bu-board-list-scroll {
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
  }
  html body.bu-board-page .bu-board-map.hidden-m,
  html body.bu-board-page .bu-list.hidden-m,
  html body.bu-board-page .bu-board-list.hidden-m,
  html body.bu-board-page .bu-dispo.hidden-m {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
  }
  html body.bu-board-page .bu-board-map:not(.hidden-m),
  html body.bu-board-page #bu-map-pane:not(.hidden-m) {
    display: block !important;
    position: relative !important;
    min-height: calc(100dvh - 56px - 72px - env(safe-area-inset-bottom, 0px)) !important;
    height: calc(100dvh - 56px - 72px - env(safe-area-inset-bottom, 0px)) !important;
    margin: 8px 10px 12px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: #dbe4ef !important;
  }
  html body.bu-board-page #bu-map {
    min-height: 100% !important;
    height: 100% !important;
    background: #d7e2ee !important;
  }
  html body.bu-board-page .bu-dispo:not(.hidden-m) {
    display: block !important;
    min-height: 56dvh !important;
    margin: 8px 10px 16px !important;
    padding: 14px !important;
    background: #fff !important;
    border-radius: 16px !important;
  }
  html body .bu-phonedock {
    display: grid !important;
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: #07111f !important;
    color: #eaf6ff !important;
  }
  html body.bu-nalog-page {
    background: #e8eef5 !important;
  }
  html body.bu-nalog-page .bu-dash-main {
    padding: 10px 12px calc(20px + var(--bu-phonedock-h, 68px)) !important;
    min-height: calc(100dvh - 52px) !important;
  }
  html body.bu-nalog-page .bu-nalog-win,
  html body.bu-nalog-page .bu-account-panel.is-on,
  html body.bu-nalog-page .bu-dash-v2 {
    min-height: auto;
  }
  html body.bu-auth-chrome .bu-auth-card,
  html body.bu-join-page .bu-join-card {
    margin: 12px 12px 24px;
    min-height: auto;
  }
  html body.bu-lista-chrome .bu-lista-hero,
  html body.bu-lista-chrome .bu-lista-cards {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 899px) and (orientation: landscape) {
  html body .bu-mshell-bar {
    min-height: 44px !important;
    height: calc(44px + env(safe-area-inset-top, 0px)) !important;
  }
  html body.bu-board-page:not(.bu-nalog-page) {
    padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html body.bu-board-page .bu-term-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) !important;
    min-height: calc(100dvh - 44px - 52px - env(safe-area-inset-bottom, 0px)) !important;
    height: calc(100dvh - 44px - 52px - env(safe-area-inset-bottom, 0px)) !important;
  }
  html body.bu-board-page .bu-board-map,
  html body.bu-board-page #bu-map-pane,
  html body.bu-board-page .bu-board-list,
  html body.bu-board-page #bu-list-pane {
    display: block !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
  html body.bu-board-page .bu-board-map.hidden-m,
  html body.bu-board-page .bu-board-list.hidden-m {
    display: block !important;
  }
  html body.bu-board-page .bu-dispo,
  html body.bu-board-page #bu-dispo {
    display: none !important;
  }
  html body.bu-board-page .bu-feed {
    height: 100% !important;
    overflow: auto !important;
    min-height: 0 !important;
    padding-bottom: 8px !important;
  }
  html body .bu-phonedock {
    min-height: 52px;
  }
}

/* ========== TABLET 900–1099: sidebar u toku, 2 kolone, nije bijelo ========== */
@media (min-width: 900px) and (max-width: 1099px) {
  html body.bu-board-page:not(.bu-nalog-page),
  html body.bu-lista-chrome {
    height: 100dvh !important;
    overflow: hidden !important;
    background: #e8edf4 !important;
  }
  html body.bu-board-page:not(.bu-nalog-page) .bu-board-shell-wrap,
  html body.bu-lista-chrome .bu-board-shell-wrap {
    display: flex !important;
    padding-left: 0 !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }
  html body.bu-board-page aside.bu-board-sidebar,
  html body.bu-nalog-page aside.bu-board-sidebar,
  html body.bu-lista-chrome aside.bu-board-sidebar {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    width: 196px !important;
    max-width: 196px !important;
    height: 100dvh !important;
    flex: 0 0 196px !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    z-index: 20 !important;
  }
  html body.bu-board-page .bu-board-sidebar-lab,
  html body.bu-nalog-page .bu-board-sidebar-lab,
  html body.bu-lista-chrome .bu-board-sidebar-lab {
    display: inline !important;
  }
  html body.bu-board-page .bu-board-sidebar-logo .bu-logo-sidebar,
  html body.bu-nalog-page .bu-board-sidebar-logo .bu-logo-sidebar {
    display: none !important;
  }
  html body.bu-board-page .bu-board-sidebar-logo-mark,
  html body.bu-nalog-page .bu-board-sidebar-logo-mark {
    display: block !important;
  }
  html body.bu-board-page:not(.bu-nalog-page) .bu-board-main-col {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 100dvh !important;
    overflow: hidden !important;
    background: #e8edf4 !important;
  }
  html body.bu-board-page:not(.bu-nalog-page) .bu-term-grid {
    display: grid !important;
    grid-template-columns: minmax(240px, 40%) minmax(0, 1fr) !important;
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    background: #e8edf4 !important;
  }
  html body.bu-board-page .bu-board-map,
  html body.bu-board-page #bu-map-pane,
  html body.bu-board-page .bu-board-list,
  html body.bu-board-page #bu-list-pane {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    background: #e8edf4 !important;
  }
  html body.bu-board-page #bu-map {
    flex: 1 1 auto;
    min-height: 280px !important;
    background: #d7e2ee !important;
  }
  html body.bu-board-page .bu-board-list-scroll {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: auto !important;
  }
  html body.bu-board-page .bu-dispo,
  html body.bu-board-page #bu-dispo {
    display: none !important;
  }
  html body.bu-nalog-page {
    height: auto !important;
    overflow: auto !important;
    background: #e8eef5 !important;
  }
  html body.bu-nalog-page .bu-board-shell-wrap {
    display: flex !important;
    padding-left: 0 !important;
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }
  html body.bu-nalog-page .bu-dash-main {
    padding: 16px 16px 40px !important;
    max-width: none !important;
  }
  html body .bu-phonedock,
  html body .bu-mshell {
    display: none !important;
  }
}

/* ========== DESKTOP ≥1100 ========== */
@media (min-width: 1100px) {
  html body.bu-board-page:not(.bu-nalog-page) {
    height: 100dvh !important;
    overflow: hidden !important;
  }
  html body.bu-board-page:not(.bu-nalog-page) .bu-board-shell-wrap {
    padding-left: 232px !important;
    display: block !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }
  html body.bu-board-page:not(.bu-nalog-page) .bu-board-main-col {
    display: flex !important;
    flex-direction: column !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }
  html body.bu-board-page:not(.bu-nalog-page) .bu-term-grid {
    display: grid !important;
    grid-template-columns: minmax(240px, 30%) minmax(0, 1fr) minmax(240px, 26%) !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
  }
  html body.bu-board-page .bu-board-map,
  html body.bu-board-page .bu-board-list,
  html body.bu-board-page .bu-dispo {
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
  }
  html body.bu-nalog-page .bu-board-shell-wrap {
    padding-left: 232px !important;
  }
  html body .bu-phonedock,
  html body .bu-mshell {
    display: none !important;
  }
}

@media (max-width: 639px) {
  html body.bu-nalog-page .bu-dash-tiles {
    grid-template-columns: 1fr 1fr !important;
  }
  html body.bu-nalog-page .bu-dash-hero {
    padding: 14px 12px !important;
  }
  html body.bu-nalog-page .bu-settings-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  html body.bu-nalog-page .bu-settings-nav-a {
    min-width: 7.5rem;
  }
}
