/* Berza Utovara 8.0.1 — telefon: kartice, filteri, z-index, dock, nalog, AI */

@media (max-width: 899px) {
  html, body {
    min-height: 100dvh;
  }
  html body.bu-board-page,
  html body.bu-nalog-page,
  html body.bu-lista-chrome,
  html body.bu-landing-page,
  html body.bu-product-page,
  html body.bu-public-inner {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: 100dvh;
  }

  /* —— Header ispod overlaya (modal/AI/filter) —— */
  html body .bu-mshell,
  html body.bu-board-page .bu-mshell,
  html body.bu-nalog-page .bu-mshell,
  html body .bu-mshell-bar,
  html body.bu-board-page .bu-mshell-bar,
  html body.bu-nalog-page .bu-mshell-bar,
  html body.bu-board-page .bu-board-header,
  html body.bu-board-page .bu-board-header-v8,
  html body .bu-neon-head,
  html body.bu-landing-page .bu-neon-head,
  html body.bu-landing-page .bu-neon-head.is-stuck,
  html body.bu-landing-page .bu-neon-head.is-hidden,
  html body.bu-product-page .bu-neon-head,
  html body.bu-product-page .bu-neon-head.is-inner,
  html body [data-landing-header].bu-neon-head {
    z-index: 40 !important;
  }
  html body .bu-mshell-bar,
  html body.bu-board-page .bu-mshell-bar {
    position: sticky !important;
    top: 0 !important;
    min-height: 52px !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
    padding-left: 10px;
    padding-right: 10px;
  }
  html body.bu-detail-open .bu-mshell,
  html body.bu-mobile-detail-open .bu-mshell,
  html body.bu-ai-open .bu-mshell,
  html body.bu-filters-sheet-open .bu-mshell,
  html body.bu-filters-open .bu-mshell,
  html body.bu-detail-open .bu-mshell-bar,
  html body.bu-mobile-detail-open .bu-mshell-bar,
  html body.bu-ai-open .bu-mshell-bar,
  html body.bu-filters-sheet-open .bu-mshell-bar {
    z-index: 20 !important;
  }

  /* Overlay stack: filter 11000, AI 12000, detalj 14000, hamburger 9000 */
  html body .bu-filter-scrim,
  html body.bu-board-page .bu-filter-scrim,
  html body #bu-filter-scrim {
    z-index: 10900 !important;
    background: rgba(8, 20, 28, 0.6) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  html body.bu-board-page #bu-filter-fold,
  html body.bu-board-page .bu-filter-fold {
    z-index: 11000 !important;
    bottom: 0 !important;
    max-height: min(86dvh, 720px) !important;
  }
  html body .bu-ai-scrim,
  html body #bu-ai-scrim {
    z-index: 11900 !important;
    background: rgba(8, 20, 28, 0.62) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  html body.bu-board-page #bu-dispo,
  html body #bu-dispo {
    z-index: 12000 !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateY(110%);
  }
  html body.bu-board-page.bu-ai-open #bu-dispo,
  html body.bu-ai-open #bu-dispo,
  html body.bu-board-page #bu-dispo:not(.hidden-m).is-sheet {
    transform: translateY(0) !important;
    pointer-events: auto !important;
    display: flex !important;
  }
  html body #bu-detail,
  html body .bu-detail-modal,
  html body #bu-mobile-detail-sheet {
    z-index: 14000 !important;
    position: fixed !important;
  }
  html body #bu-detail-backdrop,
  html body .bu-detail-modal-backdrop,
  html body #bu-mobile-detail-backdrop {
    z-index: 13900 !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(8, 20, 28, 0.6) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  html body .bu-mshell-drawer-bg {
    z-index: 8900 !important;
    background: rgba(8, 20, 28, 0.55) !important;
  }
  html body .bu-mshell-drawer,
  html body #bu-mshell-drawer {
    z-index: 9000 !important;
  }

  /* —— Horizontalne kartice utovara / vozila (bije v73 column + labele) —— */
  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-lista-chrome .bu-item.compact,
  html body.bu-lista-chrome .bu-item.bu-row.compact {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto 40px !important;
    grid-template-areas:
      "route cta fav"
      "meta cta fav" !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px 8px !important;
    margin: 0 0 8px !important;
    padding: 10px 8px 10px 12px !important;
    min-height: 0 !important;
    border-radius: 16px !important;
    border: 1px solid #d5e4ea !important;
    background: #fff !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  }
  html body.bu-board-page .bu-feed .bu-item.bu-row.compact .bu-c,
  html body.bu-board-page .bu-feed .bu-item.compact .bu-c,
  html body.bu-lista-chrome .bu-item.compact .bu-c,
  html body.bu-board-page .bu-feed .bu-item.compact .bu-c-route,
  html body.bu-board-page .bu-feed .bu-item.compact .bu-m-meta {
    display: none !important;
  }
  html body.bu-board-page .bu-feed .bu-item.compact .bu-c::before,
  html body.bu-board-page .bu-feed .bu-item.bu-row.compact .bu-c::before,
  html body.bu-lista-chrome .bu-item.compact .bu-c::before {
    content: none !important;
    display: none !important;
  }
  html body.bu-board-page .bu-feed .bu-item.compact > .bu-c-fav,
  html body.bu-board-page .bu-feed .bu-item.bu-row.compact > .bu-c-fav,
  html body.bu-lista-chrome .bu-item.compact > .bu-c-fav {
    display: flex !important;
    grid-area: fav !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    align-self: center;
    justify-content: center;
    width: 40px !important;
    padding: 0 !important;
  }
  html body.bu-board-page .bu-feed .bu-item.compact .bu-mcard-route,
  html body.bu-board-page .bu-feed .bu-item.bu-row.compact .bu-mcard-route,
  html body.bu-lista-chrome .bu-item.compact .bu-mcard-route {
    grid-area: route !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    overflow: hidden;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #0e3340 !important;
    line-height: 1.25;
  }
  html body.bu-board-page .bu-feed .bu-item.compact .bu-mcard-route b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  html body.bu-board-page .bu-feed .bu-item.compact .bu-mcard-route i {
    flex: 0 0 auto;
    color: #0b6e86;
    font-style: normal;
    font-weight: 900;
  }
  html body.bu-board-page .bu-feed .bu-item.compact .bu-mcard-meta,
  html body.bu-board-page .bu-feed .bu-item.bu-row.compact .bu-mcard-meta,
  html body.bu-lista-chrome .bu-item.compact .bu-mcard-meta {
    grid-area: meta !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px 6px !important;
    min-width: 0;
  }
  html body.bu-board-page .bu-feed .bu-item.compact .bu-driver-card-cta {
    grid-area: cta !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    align-self: center;
  }
  html body.bu-board-page .bu-feed .bu-item.compact .bu-driver-card-cta .bu-btn {
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
    white-space: nowrap;
  }
  html body .bu-mchip {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 7px;
    background: #eef6f8;
    color: #0e3340;
    font-size: 11px;
    font-weight: 800;
  }
  html body .bu-ccflag {
    display: inline-flex !important;
    flex: 0 0 auto;
  }

  /* —— Filter chrome: jedan red, sheet van toka —— */
  html body.bu-board-page .bu-minibar,
  html body.bu-board-page #bu-minibar {
    display: none !important;
  }
  html body.bu-board-page .bu-mfilter-strip {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 4px;
    min-height: 44px;
  }
  html body.bu-board-page .bu-mfilter-strip .bu-tabs-chrome {
    display: flex !important;
    flex: 1 1 auto;
    min-width: 0;
    max-height: none !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  html body.bu-board-page .bu-mfilter-go {
    flex: 0 0 auto;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: #0e3340;
    color: #ecfeff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(14, 51, 64, 0.22);
  }
  html body.bu-board-page .bu-mfilter-go svg {
    width: 16px;
    height: 16px;
    display: block;
  }
  html body.bu-board-page .bu-twin-bars {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  html body.bu-board-page .bu-tabs-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
  }
  html body.bu-board-page .bu-tabs-scroll-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }
  html body.bu-board-page .bu-tabs-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 18px 2px 0;
  }
  html body.bu-board-page .bu-tabs-scroll::-webkit-scrollbar { display: none; }
  html body.bu-board-page .bu-hscroll.has-overflow:not(.is-end)::after,
  html body.bu-board-page .bu-tabs-scroll-wrap.has-overflow:not(.is-end)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 28px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, #e8eef5 70%);
  }
  html body.bu-board-page .bu-hscroll.has-overflow:not(.is-start)::before,
  html body.bu-board-page .bu-tabs-scroll-wrap.has-overflow:not(.is-start)::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 18px;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(270deg, transparent, #e8eef5 80%);
  }
  html body.bu-board-page .bu-tab-add,
  html body.bu-board-page #bu-stab-add {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px dashed #9fb4c0;
    background: #fff;
    color: #0e3340;
  }
  html body.bu-board-page #bu-filter-fold:not(.open),
  html body.bu-board-page .bu-filter-fold:not(.open),
  html body.bu-board-page #bu-filter-fold.bu-fold-compact:not(.open),
  html body.bu-board-page.bu-filters-closed .bu-filter-fold {
    display: none !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(110%) !important;
  }
  html body.bu-board-page #bu-filter-fold.open,
  html body.bu-board-page .bu-filter-fold.open,
  html body.bu-filters-sheet-open #bu-filter-fold {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    max-height: min(86dvh, 720px) !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    padding: 14px 14px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html body.bu-ai-open .bu-mfilter-strip,
  html body.bu-ai-open .bu-twin-bars,
  html body.bu-mobile-detail-open .bu-mfilter-strip {
    pointer-events: none;
  }

  /* —— Donji dock: plutajući tab bar —— */
  html body .bu-mobchrome {
    display: block !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 400 !important;
    pointer-events: none;
    padding: 0;
  }
  html body .bu-mobchrome-status {
    pointer-events: auto;
    margin: 0 12px 6px;
    padding: 6px 10px;
    min-height: 0;
    max-height: 44px;
    overflow: hidden;
    border-radius: 14px;
    flex-wrap: nowrap;
  }
  html body .bu-mobchrome-status .bu-free30,
  html body .bu-mobchrome-status .bu-early-sub,
  html body .bu-mobchrome-status.is-demo span {
    display: none !important;
  }
  html body .bu-mobdock {
    pointer-events: auto;
    display: flex !important;
    align-items: stretch;
    justify-content: space-around;
    gap: 2px;
    margin: 0 8px calc(max(8px, env(safe-area-inset-bottom, 0px)));
    min-height: 58px;
    padding: 6px 6px 8px;
    border-radius: 22px;
    background: #0e3340;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(8, 20, 28, 0.4), 0 2px 0 rgba(255, 255, 255, 0.06) inset;
  }
  html body .bu-mobdock-a,
  html body .bu-mobdock-pub {
    color: #9fb4c0;
    border-radius: 16px;
  }
  html body .bu-mobdock-a.is-on {
    background: rgba(122, 240, 255, 0.12);
    color: #7af0ff;
  }
  html body .bu-mobdock-a svg,
  html body .bu-mobdock-pub svg {
    width: 22px;
    height: 22px;
    display: block;
  }
  html body .bu-mobdock-a em,
  html body .bu-mobdock-pub em {
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
    display: grid !important;
    place-items: center;
    position: fixed;
    right: 16px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    z-index: 450 !important;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: radial-gradient(circle at 30% 20%, #34d399, #059669 62%, #047857);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.28), 0 14px 28px rgba(5, 150, 105, 0.45);
    cursor: pointer;
  }
  html body .bu-dispo-fab svg {
    width: 28px;
    height: 28px;
    display: block;
    filter: drop-shadow(0 0 6px rgba(167, 243, 208, 0.7));
  }
  html body.bu-ai-open .bu-dispo-fab { display: none !important; }

  html body.bu-board-page #bu-dispo .bu-dispo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 8px 12px;
    border-bottom: 1px solid #d5e4ea;
    background: #042f2e;
    color: #ecfdf5;
  }
  html body.bu-board-page #bu-dispo .bu-kicker { color: #7af0ff; }
  html body.bu-board-page .bu-ai-close {
    min-width: 40px;
    min-height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    border: 0;
  }

  /* —— Hamburger drawer —— */
  html body .bu-mshell-drawer {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(24px + env(safe-area-inset-bottom, 0px));
    background: #e8eef5 !important;
    box-shadow: 18px 0 40px rgba(8, 20, 28, 0.28);
  }
  html body .bu-mshell-card {
    background: #fff;
    border-radius: 16px;
    padding: 10px;
    margin: 0 0 10px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  }
  html body .bu-mshell-drawer-kicker {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5b7a86;
  }
  html body .bu-mshell-card-a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 12px;
    color: #0e3340 !important;
    font-weight: 750;
    text-decoration: none !important;
  }
  html body .bu-mshell-card-a svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: #0b6e86;
  }
  html body .bu-mshell-card-a:active { background: #eef6f8; }

  /* —— Nalog: kartice + tab fade —— */
  html body.bu-nalog-page .bu-cc-hero {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin: 8px 0 12px !important;
    padding: 16px !important;
    border-radius: 18px !important;
    background: #0e3340 !important;
    color: #f8fafc !important;
    box-shadow: 0 16px 32px rgba(14, 51, 64, 0.22);
  }
  html body.bu-nalog-page .bu-cc-hero h1,
  html body.bu-nalog-page .bu-cc-hero .bu-cc-kicker,
  html body.bu-nalog-page .bu-cc-hero .bu-cc-lead {
    color: #f8fafc !important;
  }
  html body.bu-nalog-page .bu-cc-who {
    display: flex !important;
    align-items: center;
    gap: 12px;
  }
  html body.bu-nalog-page .bu-cc-pills { display: flex; flex-wrap: wrap; gap: 6px; }
  html body.bu-nalog-page .bu-cc-pill {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ecfeff !important;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
  }
  html body.bu-nalog-page .bu-cc-sys,
  html body.bu-nalog-page .bu-cc-metrics,
  html body.bu-nalog-page .bu-cc-ops {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin: 0 0 12px !important;
  }
  html body.bu-nalog-page .bu-cc-sys a,
  html body.bu-nalog-page .bu-cc-metrics a,
  html body.bu-nalog-page .bu-cc-metrics div,
  html body.bu-nalog-page .bu-cc-ops a,
  html body.bu-nalog-page .bu-cc-ops button {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px;
    min-height: 72px;
    padding: 12px !important;
    border-radius: 16px !important;
    background: #fff !important;
    border: 1px solid #d5e4ea !important;
    text-decoration: none !important;
    color: #0e3340 !important;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
  }
  html body.bu-nalog-page .bu-cc-sys small,
  html body.bu-nalog-page .bu-cc-metrics small,
  html body.bu-nalog-page .bu-cc-ops span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5b7a86 !important;
  }
  html body.bu-nalog-page .bu-cc-sys strong,
  html body.bu-nalog-page .bu-cc-metrics strong,
  html body.bu-nalog-page .bu-cc-ops strong {
    font-size: 18px;
    color: #0e3340 !important;
  }
  html body.bu-nalog-page .bu-nalog-tabs {
    position: relative;
    margin: 0 0 10px;
  }
  html body.bu-nalog-page .bu-nalog-tabs-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 28px 8px 4px;
  }
  html body.bu-nalog-page .bu-nalog-tabs-scroll::-webkit-scrollbar { display: none; }
  html body.bu-nalog-page .bu-nalog-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d5e4ea;
    color: #0e3340 !important;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
    white-space: nowrap;
  }
  html body.bu-nalog-page .bu-nalog-tab.is-on {
    background: #0e3340;
    color: #ecfeff !important;
    border-color: #0e3340;
  }
  html body.bu-nalog-page .bu-nalog-tabs.has-overflow:not(.is-end)::after,
  html body.bu-nalog-page .bu-nalog-tabs.has-overflow:not(.is-start)::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 8px;
    width: 28px;
    pointer-events: none;
    z-index: 2;
  }
  html body.bu-nalog-page .bu-nalog-tabs.has-overflow:not(.is-end)::after {
    right: 0;
    background: linear-gradient(90deg, transparent, #e8eef5 65%);
  }
  html body.bu-nalog-page .bu-nalog-tabs.has-overflow:not(.is-start)::before {
    left: 0;
    background: linear-gradient(270deg, transparent, #e8eef5 70%);
  }
  html body.bu-nalog-page .bu-nalog-tabs.has-overflow:not(.is-end) .bu-nalog-tabs-cue {
    display: grid;
  }
  html body .bu-nalog-tabs-cue {
    display: none;
    position: absolute;
    right: 4px;
    top: 8px;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    background: #0e3340;
    color: #7af0ff;
    font-size: 14px;
    font-weight: 900;
    pointer-events: none;
    z-index: 3;
  }

  html body .bu-mobile-results {
    padding: 4px 10px 2px !important;
  }
  html body .bu-mobile-results-row {
    min-height: 0;
    gap: 8px;
  }
}

@media (min-width: 900px) {
  html body .bu-mfilter-go { display: none !important; }
  html body.bu-board-page .bu-mfilter-strip {
    display: block;
    padding: 0;
    min-height: 0;
  }
}
