/* Presentation only: the original overview, conversation, ad and footer nodes
   keep their parents and native listeners. Activation is USA desktop only. */
html[data-native-us][data-imo-black][data-imo-us-direct][data-imo-us-desktop-ready="129"][data-imo-us-page-layout="131"] body #bpLayout #app #chat #feed {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 10px 12px !important;
  overflow: auto !important;
}

/* Native integration owns the footer inside the overview. Flattening only its
   presentation avoids moving/recreating nodes or fighting its observer. */
html[data-native-us][data-imo-black][data-imo-us-direct][data-imo-us-desktop-ready="129"][data-imo-us-page-layout="131"] body #bpLayout #app #chat #feed #imo-us-overview-v4,
html[data-native-us][data-imo-black][data-imo-us-direct][data-imo-us-desktop-ready="129"][data-imo-us-page-layout="131"] body #bpLayout #app #chat #feed #imo-us-overview-v4[hidden] {
  display: contents !important;
}
html[data-native-us][data-imo-us-page-layout="131"] body #feed #imo-us-overview-v4 > * {
  order: 10;
  flex-shrink: 0;
}
html[data-native-us][data-imo-black][data-imo-us-direct][data-imo-us-desktop-ready="129"][data-imo-us-page-layout="131"] body #bpLayout #app #chat #feed #imo-us-overview-v4[hidden] > :not(#imo-us-care-footer-v121) {
  display: none !important;
}
html[data-native-us][data-imo-black][data-imo-us-direct][data-imo-us-desktop-ready="129"][data-imo-us-page-layout="131"] body #feed > .conversation {
  order: 50 !important;
  flex: 1 0 auto !important;
  min-width: 0 !important;
  min-height: min(200px, 24vh) !important;
  margin: 0 !important;
  padding: 0 0 12px !important;
}
html[data-native-us][data-imo-us-page-layout="131"] body #feed > .sponsor-section {
  order: 60;
  flex: 0 0 auto;
}
html[data-native-us][data-imo-black][data-imo-us-direct][data-imo-us-desktop-ready="129"][data-imo-us-page-layout="131"] body #feed #imo-us-care-footer-v121 {
  display: block !important;
  order: 100 !important;
  flex: 0 0 auto !important;
  position: static !important;
  align-self: stretch !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: auto 0 0 !important;
}

/* Keep the native Uber example and both native buttons. It stays ahead of the
   conversation even after a request focuses chat. The user's collapse survives. */
html[data-native-us][data-imo-black][data-imo-us-direct][data-imo-us-desktop-ready="129"][data-imo-us-page-layout="131"] body #imo-us-direct-ad {
  display: flex !important;
  position: relative !important;
  flex: 0 0 clamp(104px, 14vh, 144px) !important;
  height: clamp(104px, 14vh, 144px) !important;
  min-height: 104px !important;
  width: calc(100% - 24px) !important;
  margin: 8px 12px !important;
  padding: 14px 20px !important;
  gap: 16px !important;
  border: 1px solid #365064 !important;
  border-radius: 18px !important;
  background: #0b1a27 !important;
  color: #f2f7fb !important;
  overflow: hidden !important;
}
html[data-native-us][data-imo-us-page-layout="131"] body #imo-us-direct-ad > img {
  opacity: .96 !important;
  object-fit: cover !important;
  object-position: right center !important;
}
html[data-native-us][data-imo-us-page-layout="131"] body #imo-us-direct-ad::before {
  background: linear-gradient(90deg, #07131fe8 0%, #07131fd9 26%, #07131f55 55%, #07131f22 100%) !important;
}
html[data-native-us][data-imo-us-page-layout="131"] body #imo-us-direct-ad .usd-ad-content {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 4px !important;
}
html[data-native-us][data-imo-us-page-layout="131"] body #imo-us-direct-ad .usd-ad-badge {
  font-size: 10px !important;
  line-height: 1.4 !important;
  color: #d0e1e9 !important;
}
html[data-native-us][data-imo-us-page-layout="131"] body #imo-us-direct-ad .usd-ad-brand {
  font-size: 30px !important;
  line-height: 1.05 !important;
  letter-spacing: -.6px !important;
}
html[data-native-us][data-imo-us-page-layout="131"] body #imo-us-direct-ad .usd-ad-copy {
  font-size: 15px !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  color: #f0f6fa !important;
}
html[data-native-us][data-imo-black][data-imo-us-direct][data-imo-us-desktop-ready="129"][data-imo-us-page-layout="131"] body #imo-us-direct-ad[data-collapsed="true"] {
  flex-basis: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 10px !important;
}
html[data-native-us][data-imo-black][data-imo-us-direct][data-imo-us-page-layout="131"] body #imo-us-direct-ad[data-collapsed="true"] > :not(.usd-ad-toggle) {
  display: none !important;
}
html[data-native-us][data-imo-us-page-layout="131"] body #imo-us-direct-ad[data-collapsed="true"] > .usd-ad-toggle {
  height: 34px !important;
  min-height: 34px !important;
}

/* Retain every footer label, address, phone and website; arrange them compactly. */
html[data-native-us][data-imo-black][data-imo-us-direct][data-imo-us-page-layout="131"] body #imo-us-care-footer-v121 .uscare121 {
  display: grid !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) !important;
  column-gap: 24px !important;
  row-gap: 3px !important;
  margin: 8px 0 0 !important;
  padding: 12px 16px !important;
  border-radius: 14px !important;
}
html[data-native-us][data-imo-us-page-layout="131"] body #imo-us-care-footer-v121 .uscare121-top {
  grid-column: 1;
  grid-row: 1;
}
html[data-native-us][data-imo-us-page-layout="131"] body #imo-us-care-footer-v121 .uscare121-brand {
  flex-basis: 180px;
}
html[data-native-us][data-imo-us-page-layout="131"] body #imo-us-care-footer-v121 .uscare121-services {
  grid-column: 1;
  grid-row: 2;
  margin: 0 !important;
}
html[data-native-us][data-imo-us-page-layout="131"] body #imo-us-care-footer-v121 .uscare121-contacts {
  grid-column: 2;
  grid-row: 1;
  justify-content: flex-end;
  align-items: center;
  margin: 0;
}
html[data-native-us][data-imo-us-page-layout="131"] body #imo-us-care-footer-v121 .uscare121-addresses {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  border: 0;
}
html[data-native-us][data-imo-us-page-layout="131"] body #imo-us-care-footer-v121 .uscare121-registry {
  grid-column: 1 / -1;
}
