/*
 * Final dropdown cleanup.
 * Loaded after every other public stylesheet.
 */

body.public-application label:has(> .pxd-button) > select,
body.public-application label:has(.pxd-button) select.pxd-native {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Hide controls created by all older dropdown versions. */

body.public-application label:has(> .pxd-button)
  > button:not(.pxd-button),

body.public-application label:has(> .pxd-button)
  > [role="button"]:not(.pxd-button),

body.public-application label:has(> .pxd-button)
  > .ui4-select-button,

body.public-application label:has(> .pxd-button)
  > .ui-select-button,

body.public-application label:has(> .pxd-button)
  > .custom-select-button {
  display: none !important;
}

/* Keep the remaining dropdown vertically centered. */

body.public-application :where(
  .d7-filter,
  .d7-filters label,
  .v5-filter,
  .px-filter,
  .px-filter-field
) {
  position: relative !important;
  display: flex !important;
  justify-content: center !important;
  flex-direction: column !important;
  min-height: 58px !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

body.public-application .pxd-button {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  min-height: 30px !important;
  margin: 0 !important;
  padding: 3px 0 !important;
}