/* 8.7.0 — readable filter/alert bars; phone list first; map does not steal clicks. */

/* Desktop twin bars: two equal, wrapping, readable cards */
@media (min-width: 900px) {
  html body.bu-board-page .bu-twin-bars {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    align-items: stretch !important;
    padding: 6px 10px 10px !important;
    box-sizing: border-box !important;
  }
  html body.bu-board-page .bu-alert-bar,
  html body.bu-board-page .bu-filter-bar,
  html body.bu-board-page #f-toggle {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 76px !important;
    padding: 12px 14px !important;
    overflow: visible !important;
    white-space: normal !important;
    border-radius: 14px !important;
    background: #fff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06) !important;
    text-align: left !important;
  }
  html body.bu-board-page .bu-filter-bar-main,
  html body.bu-board-page .bu-alert-bar-main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }
  html body.bu-board-page .bu-filter-bar-main strong,
  html body.bu-board-page .bu-alert-txt {
    display: block !important;
    color: #0f172a !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    white-space: normal !important;
  }
  html body.bu-board-page .bu-filter-bar-main small,
  html body.bu-board-page .bu-alert-hint {
    display: block !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    overflow: visible !important;
  }
  html body.bu-board-page .bu-filter-bar-act,
  html body.bu-board-page .bu-alert-bar-act {
    flex: 0 0 auto !important;
    align-self: center !important;
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    background: #f1f5f9 !important;
  }
  html body.bu-board-page .bu-filter-bar.is-open {
    border-color: #0e7490 !important;
    box-shadow: 0 0 0 2px rgba(14, 116, 144, .18) !important;
  }
  html body.bu-board-page #bu-map-pane.hidden-m,
  html body.bu-board-page .bu-board-map.hidden-m {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: relative !important;
    height: 100% !important;
    width: auto !important;
    min-height: 0 !important;
    opacity: 1 !important;
  }
}

@media (min-width: 900px) and (max-width: 1180px) {
  html body.bu-board-page .bu-twin-bars {
    grid-template-columns: 1fr !important;
  }
}

/* Phone: lista first, mapa only when asked, clicks work */
@media (max-width: 899px) {
  html body.bu-board-page .bu-term-grid,
  html body.bu-board-page .bu-board-body,
  html body.bu-board-page .bu-board-stage {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    position: relative !important;
    z-index: 1 !important;
    pointer-events: auto !important;
  }

  html body.bu-board-page #bu-map-pane,
  html body.bu-board-page .bu-board-map,
  html body.bu-board-page .bu-map-wrap,
  html body.bu-board-page #bu-map-pane:not(.hidden-m),
  html body.bu-board-page .bu-board-map:not(.hidden-m) {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    z-index: 0 !important;
    opacity: 0 !important;
  }

  html body.bu-board-page.bu-term-view-map #bu-map-pane,
  html body.bu-board-page.bu-term-view-map .bu-board-map,
  html body.bu-board-page.bu-term-view-map .bu-map-wrap {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: min(52dvh, 420px) !important;
    min-height: min(52dvh, 420px) !important;
    max-height: min(52dvh, 420px) !important;
    z-index: 1 !important;
    opacity: 1 !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    margin: 0 12px 12px !important;
  }
  html body.bu-board-page.bu-term-view-map #bu-list-pane,
  html body.bu-board-page.bu-term-view-map .bu-board-list {
    display: none !important;
  }

  html body.bu-board-page #bu-list-pane,
  html body.bu-board-page .bu-board-list,
  html body.bu-board-page #bu-list-pane.hidden-m {
    display: block !important;
    position: relative !important;
    visibility: visible !important;
    pointer-events: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 40vh !important;
    z-index: 4 !important;
    overflow: visible !important;
  }
  html body.bu-board-page.bu-term-view-map #bu-list-pane {
    display: none !important;
  }

  html body.bu-board-page .bu-mshell,
  html body.bu-board-page .bu-ptabs,
  html body.bu-board-page .bu-pfilter-card,
  html body.bu-board-page .bu-pview,
  html body.bu-board-page .bu-feed,
  html body.bu-board-page .bu-mobchrome,
  html body.bu-board-page .bu-mobdock {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 8 !important;
  }
  html body.bu-board-page .bu-mshell { z-index: 9500 !important; }
  html body.bu-board-page .bu-mobchrome { z-index: 9000 !important; position: fixed !important; }

  html body.bu-board-page #bu-filter-scrim,
  html body.bu-board-page #bu-filter-scrim[hidden],
  html body.bu-board-page #bu-ai-scrim[hidden],
  html body.bu-board-page .bu-ai-scrim[hidden] {
    display: none !important;
    pointer-events: none !important;
    z-index: -1 !important;
  }

  html body.bu-board-page .bu-pfilter-toggle {
    flex-wrap: wrap !important;
    min-height: 56px !important;
    align-items: flex-start !important;
  }
  html body.bu-board-page .bu-pfilter-lab {
    display: block !important;
    width: 100% !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
  }
  html body.bu-board-page .bu-pfilter-toggle small,
  html body.bu-board-page #bu-pfilter-hint {
    display: block !important;
    width: calc(100% - 24px) !important;
    margin: 2px 0 0 !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    white-space: normal !important;
    line-height: 1.35 !important;
  }
  html body.bu-board-page #bu-pfilter-sum {
    display: block !important;
    width: 100% !important;
    color: #64748b !important;
    font-size: 11px !important;
    margin-top: 4px !important;
  }
  html body.bu-board-page .bu-pfilter-alert {
    white-space: normal !important;
    line-height: 1.35 !important;
    align-items: flex-start !important;
    text-align: left !important;
  }
}
