/* 9.6.0 / v20 — ghost kill, 40/60 desktop grid, modal shell, light mobile detail */

html body.bu-board-page .bu-board-map,
html body.bu-board-page #bu-map,
html body.bu-board-page #bu-detail-map,
html body.bu-board-page #bu-mdetail-map {
  z-index: 0;
}

html body.bu-board-page .bu-neon-head,
html body.bu-board-page .bu-board-header,
html body.bu-board-page .bu-board-bar,
html body.bu-board-page .bu-filter-chrome {
  z-index: 30 !important;
}

html body.bu-board-page .bu-phonedock,
html body.bu-board-page .bu-mobdock,
html body.bu-board-page .bu-mshell-bar {
  z-index: 50 !important;
}

html body.bu-board-page #bu-dispo-fab,
html body.bu-board-page .bu-dispo-fab {
  z-index: 60 !important;
}

html body #bu-detail-backdrop,
html body .bu-detail-modal-backdrop,
html body #bu-mobile-detail-backdrop {
  z-index: 8990 !important;
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(8px) !important;
}

html body #bu-detail,
html body .bu-detail-modal,
html body #bu-mobile-detail-sheet {
  z-index: 9000 !important;
}

html body.bu-ai-open #bu-dispo,
html body #bu-dispo.bu-ai-portal,
html body #bu-dispo.is-sheet {
  z-index: 9999 !important;
}

@media (max-width: 1023px) {
  html,
  html body.bu-board-page:not(.bu-nalog-page) {
    height: auto !important;
    max-height: none !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #f4f7fb !important;
  }

  html body.bu-board-page:not(.bu-nalog-page) .bu-board-shell-wrap,
  html body.bu-board-page:not(.bu-nalog-page) .bu-board-main-col,
  html body.bu-board-page:not(.bu-nalog-page) .bu-board,
  html body.bu-board-page:not(.bu-nalog-page) .bu-term-grid {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  html body.bu-board-page #bu-list-pane,
  html body.bu-board-page .bu-board-list-scroll,
  html body.bu-board-page #bu-feed {
    height: 100% !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
    padding-bottom: 110px !important;
    background: #f4f7fb !important;
  }

  html body.bu-board-page #bu-feed .bu-item.compact,
  html body.bu-board-page .bu-feed .bu-item.compact,
  html body.bu-term .bu-row {
    display: block !important;
    grid-template-columns: none !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 0 12px !important;
    box-shadow: none !important;
  }

  html body.bu-board-page .bu-item.is-demo::before,
  html body.bu-board-page .bu-feed .bu-row.is-demo::before {
    content: none !important;
    display: none !important;
  }

  html body.bu-board-page #bu-feed .bu-item.compact > :not(.bu-mload),
  html body.bu-board-page .bu-feed .bu-item.compact > :not(.bu-mload),
  html body.bu-board-page #bu-feed .bu-c-route,
  html body.bu-board-page #bu-feed .bu-m-meta,
  html body.bu-board-page #bu-feed .bu-mcard-route,
  html body.bu-board-page #bu-feed .bu-mcard-meta,
  html body.bu-board-page #bu-feed .bu-desk-row,
  html body.bu-board-page #bu-feed .bu-pcard,
  html body.bu-board-page #bu-feed .bu-v14-card {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  html body.bu-board-page #bu-feed .bu-item.compact > .bu-mload {
    display: flex !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 16px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
  }

  html body.bu-board-page #bu-dispo-fab,
  html body.bu-board-page .bu-dispo-fab {
    display: flex !important;
    position: fixed !important;
    right: 16px !important;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 60 !important;
  }

  html body #bu-mobile-detail-sheet[hidden] {
    display: none !important;
  }

  html body.bu-mobile-detail-open #bu-mobile-detail-sheet:not([hidden]) {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9000 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #f4f7fb !important;
    color: #0f172a !important;
    border-radius: 0 !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
  }

  html body .bu-mdetail-head {
    flex: 0 0 auto !important;
    background: #ffffff !important;
    color: #0f172a !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }

  html body .bu-mdetail-title,
  html body .bu-mdetail-back,
  html body .bu-mdetail-share {
    color: #0f172a !important;
  }

  html body .bu-mdetail-mapwrap {
    flex: 0 0 auto !important;
    margin: 12px 12px 0 !important;
  }

  html body #bu-mdetail-map,
  html body .bu-mdetail-map {
    height: 192px !important;
    width: 100% !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: #e2e8f0 !important;
    z-index: 0 !important;
  }

  html body #bu-mobile-detail-body,
  html body .bu-mdetail-body {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    background: #f4f7fb !important;
    color: #0f172a !important;
    padding: 12px !important;
    padding-bottom: 24px !important;
  }

  html body #bu-mobile-detail-body .bu-v14-route,
  html body #bu-mobile-detail-body .bu-v12-route,
  html body #bu-mobile-detail-body .bu-v14-end,
  html body #bu-mobile-detail-body .bu-v14-end b,
  html body #bu-mobile-detail-body .bu-ccflag,
  html body #bu-mobile-detail-body .bu-dpro-row dd,
  html body #bu-mobile-detail-body .bu-v12-kv dd {
    color: #0f172a !important;
  }

  html body #bu-mobile-detail-foot,
  html body .bu-mdetail-foot {
    flex: 0 0 auto !important;
    position: sticky !important;
    bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    background: #ffffff !important;
    padding: 16px !important;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    border-top: 1px solid #f1f5f9 !important;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08) !important;
  }

  html body #bu-mobile-detail-foot .bu-btn,
  html body #bu-mobile-detail-foot .bu-v12-cta,
  html body #bu-mobile-detail-foot .bu-mobile-detail-nav-btn {
    min-height: 44px !important;
    border-radius: 12px !important;
  }
}

@media (min-width: 1024px) {
  html body.bu-board-page:not(.bu-nalog-page) {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }

  html body.bu-board-page:not(.bu-nalog-page) .bu-board {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 320px !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    height: calc(100dvh - 58px) !important;
    min-height: 0 !important;
  }

  html body.bu-board-page .bu-board-bar,
  html body.bu-board-page .bu-filter-chrome {
    grid-column: 1 / -1 !important;
    z-index: 30 !important;
  }

  html body.bu-board-page:not(.bu-nalog-page) .bu-term-grid,
  html body.bu-board-page:not(.bu-nalog-page) .bu-board-body.bu-term-grid {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    gap: 12px !important;
  }

  html body.bu-board-page #bu-map-pane,
  html body.bu-board-page .bu-board-map {
    grid-column: 1 !important;
    display: flex !important;
    height: 100% !important;
    min-height: 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 0 !important;
  }

  html body.bu-board-page #bu-list-pane,
  html body.bu-board-page .bu-board-list {
    grid-column: 2 !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: auto !important;
  }

  html body.bu-board-page .bu-board > #bu-dispo,
  html body.bu-board-page .bu-board > #bu-dispo.hidden-m {
    grid-column: 2 !important;
    grid-row: 2 !important;
    position: relative !important;
    inset: auto !important;
    width: 320px !important;
    max-width: 320px !important;
    height: 100% !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    transform: none !important;
    z-index: 2 !important;
    pointer-events: auto !important;
    visibility: visible !important;
  }

  html body.bu-board-page #bu-dispo-fab,
  html body.bu-board-page .bu-dispo-fab {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  html body.bu-board-page #bu-feed .bu-item.compact,
  html body.bu-board-page .bu-feed .bu-item.compact {
    display: block !important;
    grid-template-columns: none !important;
    width: 100% !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html body.bu-board-page #bu-feed .bu-mload {
    display: none !important;
  }

  html body.bu-board-page #bu-feed .bu-desk-row,
  html body.bu-board-page #bu-feed .bu-cols-head {
    display: grid !important;
    grid-template-columns: 36px minmax(160px, 1.3fr) minmax(120px, .7fr) minmax(160px, 1.3fr) minmax(120px, .7fr) minmax(120px, 1fr) minmax(72px, .45fr) minmax(72px, .45fr) minmax(100px, .5fr) !important;
    width: 100% !important;
    min-width: 980px !important;
    align-items: center !important;
    gap: 8px !important;
  }

  html body.bu-board-page #bu-feed .bu-desk-row {
    padding: 8px 10px !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
  }

  html body.bu-board-page #bu-feed .bu-desk-row > .bu-c-from,
  html body.bu-board-page #bu-feed .bu-desk-row > .bu-c-to {
    min-width: 160px !important;
  }

  html body.bu-board-page #bu-feed .bu-desk-row > .bu-c-ldate,
  html body.bu-board-page #bu-feed .bu-desk-row > .bu-c-udate {
    min-width: 120px !important;
  }

  html body.bu-board-page #bu-feed .bu-desk-row > .bu-c-price {
    min-width: 100px !important;
  }

  html body #bu-detail,
  html body.bu-detail-open #bu-detail {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    pointer-events: auto !important;
    background: transparent !important;
  }

  html body #bu-detail[hidden] {
    display: none !important;
  }

  html body #bu-detail-backdrop:not([hidden]),
  html body.bu-detail-open #bu-detail-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 8990 !important;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(8px) !important;
  }

  html body .bu-detail-stage {
    display: block !important;
    width: min(72rem, calc(100vw - 48px)) !important;
    max-height: min(88dvh, 860px) !important;
    pointer-events: auto !important;
  }

  html body .bu-detail-modal-sheet {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 72rem !important;
    max-height: min(88dvh, 860px) !important;
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 24px !important;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28) !important;
    overflow: hidden !important;
  }

  html body .bu-detail-modal-body {
    display: grid !important;
    grid-template-columns: minmax(0, 8fr) minmax(260px, 4fr) !important;
    gap: 16px !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    overflow: auto !important;
    padding: 16px 20px 20px !important;
  }

  html body .bu-detail-modal-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    min-width: 0 !important;
  }

  html body .bu-detail-modal-mapwrap,
  html body #bu-detail-map {
    height: 220px !important;
    min-height: 220px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  html body .bu-detail-fuel-aside {
    position: relative !important;
    inset: auto !important;
    flex: none !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    align-self: stretch !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 14px !important;
    box-shadow: none !important;
    overflow: auto !important;
  }
}
