/* Berza Utovara 7.9.83 — launch: telefon chrome, sidebar off, kartice, Dispo, app */

/* —— NUKLEARNO: sidebar nikad na telefonu / tabletu —— */
@media (max-width: 1099px) {
  html body aside.landing-sidebar,
  html body aside.bu-neon-side,
  html body aside.bu-neon-side.landing-sidebar,
  html body aside.bu-board-sidebar.landing-sidebar,
  html body.bu-landing-page aside.landing-sidebar,
  html body.bu-product-page aside.landing-sidebar,
  html body.bu-public-inner aside.landing-sidebar,
  html body .landing-sidebar {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateX(-120%) !important;
    position: absolute !important;
    left: -9999px !important;
  }
  html body .landing-shell,
  html body.bu-landing-page .landing-shell,
  html body.bu-product-page .landing-shell {
    display: block !important;
    grid-template-columns: none !important;
  }
  html body .landing-shell-main,
  html body.bu-landing-page .landing-shell-main,
  html body.bu-product-page .landing-shell-main,
  html body.bu-public-inner .landing-shell-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
  }
  html body.bu-landing-page .bu-neon-head,
  html body.bu-product-page .bu-neon-head,
  html body [data-landing-header].bu-neon-head {
    left: 0 !important;
    width: 100% !important;
    right: 0 !important;
  }
}

/* Dispo product page: chat full width on phone */
@media (max-width: 899px) {
  html body.bu-product-page .bu-dispo-stage {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    min-height: 0 !important;
    padding: 8px 10px 140px !important;
  }
  html body.bu-product-page .bu-dispo-board,
  html body.bu-product-page .bu-dispo-loads {
    display: none !important;
  }
  html body.bu-product-page .bu-dispo-chat {
    width: 100% !important;
    max-width: none !important;
    min-height: 62dvh !important;
  }
}

/* Public + board phone chrome */
@media (min-width: 900px) {
  html body .bu-mobchrome,
  html body .bu-dispo-fab { display: none !important; }
}

@media (max-width: 899px) {
  html body .bu-phonedock,
  html body.bu-board-page .bu-phonedock,
  html body.bu-landing-page .bu-phonedock,
  html body.bu-product-page .bu-phonedock,
  html body .bu-dock {
    display: none !important;
  }

  html body.bu-landing-page,
  html body.bu-product-page,
  html body.bu-board-page,
  html body.bu-public-inner {
    padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px)) !important;
  }

  html body .bu-mobchrome {
    display: block !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5000;
    pointer-events: none;
  }
  html body .bu-mobchrome-status,
  html body .bu-mobdock {
    pointer-events: auto;
  }
  html body .bu-mobchrome-status {
    margin: 0 10px 8px;
    padding: 8px 12px;
    border-radius: 14px;
    background: #042f2e;
    color: #ecfdf5;
    box-shadow: 0 10px 28px rgba(4, 47, 46, 0.35);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 12px;
    line-height: 1.35;
  }
  html body .bu-mobchrome-status .bu-early {
    margin: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
    border: 0;
  }
  html body .bu-mobchrome-status .bu-early-k,
  html body .bu-mobchrome-status .bu-early-track { display: none; }
  html body .bu-mobchrome-status .bu-early-line,
  html body .bu-mobchrome-status .bu-early-sub {
    margin: 0;
    font-size: 12px;
    color: #ecfdf5;
  }
  html body .bu-mobchrome-status.is-demo {
    background: #0e3340;
    color: #f8fafc;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  html body .bu-mobchrome-status.is-demo strong {
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #7af0ff;
  }
  html body .bu-mobchrome-cta {
    margin-left: auto;
    background: #10b981;
    color: #042f2e !important;
    font-weight: 900;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none !important;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }
  html body .bu-mobdock {
    display: flex !important;
    align-items: stretch;
    justify-content: space-around;
    gap: 2px;
    min-height: 56px;
    padding: 4px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    background: #0e3340;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  html body .bu-mobdock-a,
  html body .bu-mobdock-pub {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #9fb4c0;
    text-decoration: none !important;
    background: none;
    border: 0;
    font: inherit;
    cursor: pointer;
  }
  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;
  }
  html body .bu-mobdock-a.is-on,
  html body .bu-mobdock-a.is-on em {
    color: #7af0ff;
  }
  html body .bu-mobdock-a.is-cta,
  html body .bu-mobdock-pub {
    color: #fff;
  }
  html body .bu-mobdock-pub span {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: #0b6e86;
    display: grid;
    place-items: center;
    font-weight: 900;
  }

  html body .bu-dispo-fab {
    display: grid !important;
    place-items: center;
    position: fixed;
    right: 14px;
    bottom: calc(128px + env(safe-area-inset-bottom, 0px));
    z-index: 5010;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    border: 0;
    background: #059669;
    color: #fff;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: .04em;
    box-shadow: 0 12px 28px rgba(5, 150, 105, .45);
    cursor: pointer;
  }
  html body.bu-ai-open .bu-dispo-fab { display: none !important; }

  /* Board kartice: ruta + meta, bez vertikalnog stacka labela */
  html body.bu-board-page .bu-feed {
    padding: 6px 8px 8px !important;
  }
  html body.bu-board-page .bu-feed .bu-item.compact {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 36px !important;
    grid-template-areas: "route fav" "meta fav" !important;
    gap: 4px 8px !important;
    padding: 10px 8px 10px 12px !important;
    margin: 0 0 8px !important;
    border-radius: 14px !important;
    border: 1px solid #d5e4ea !important;
    background: #fff !important;
  }
  html body.bu-board-page .bu-feed .bu-item.compact > .bu-c { display: none !important; }
  html body.bu-board-page .bu-feed .bu-item.compact > .bu-c-fav {
    display: flex !important;
    grid-area: fav;
    justify-content: flex-end;
  }
  html body.bu-board-page .bu-feed .bu-item.compact .bu-c::before { display: none !important; }
  html body.bu-board-page .bu-mcard-route {
    grid-area: route;
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    font-size: 15px;
    font-weight: 800;
    color: #0e3340;
  }
  html body.bu-board-page .bu-mcard-meta {
    grid-area: meta;
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  html body .bu-mchip.is-viber {
    background: #ede9fe;
    color: #5b21b6;
    border-radius: 6px;
    padding: 0 6px;
    font-weight: 800;
  }

  html body.bu-board-page .bu-switch,
  html body.bu-board-page .bu-list-toolbar,
  html body.bu-board-page .bu-cols-head {
    display: none !important;
  }

  html body .bu-app-banner.is-on {
    display: flex !important;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 40;
  }
}

@media (min-width: 900px) {
  html body.bu-board-page .bu-feed .bu-item.compact {
    display: grid !important;
    grid-template-columns: 32px minmax(110px, 1.45fr) 86px minmax(110px, 1.45fr) 86px minmax(70px, 1fr) 50px 50px 72px !important;
    align-items: center !important;
    gap: 8px !important;
  }
}

/* AI confirm card */
html body .bu-ai-postcard {
  margin: 8px 0;
  padding: 12px;
  border-radius: 14px;
  border: 1.5px solid #0b6e86;
  background: #f0fafc;
}
html body .bu-ai-postcard strong { display: block; font-size: 15px; margin-bottom: 6px; }
html body .bu-ai-postcard p { margin: 0 0 10px; font-size: 13px; color: #3d5c68; }
html body .bu-ai-postcard-actions { display: flex; flex-wrap: wrap; gap: 8px; }

html body [data-install-app] { display: inline-flex !important; }

@media (min-width: 900px) {
  html body.bu-board-page .bu-mcard-route,
  html body.bu-board-page .bu-mcard-meta { display: none !important; }
}

html body .bu-ccflag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 1px 5px;
  border-radius: 6px;
  background: #0e3340;
  color: #ecfeff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .04em;
}

@media (max-width: 899px) {
  html body.bu-board-page #bu-filter-fold,
  html body.bu-board-page .bu-filter-fold {
    z-index: 5020 !important;
    bottom: calc(118px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html body.bu-board-page .bu-filter-scrim {
    z-index: 5015 !important;
  }
  html body.bu-board-page .bu-filter-fold .bu-place-grid,
  html body.bu-board-page #bu-filter-fold .bu-lane,
  html body.bu-board-page #bu-filter-fold .bu-place-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}
