.dashboard-native-filters,
.dashboard-native-filters * {
  box-sizing: border-box;
}

.dashboard-native-filters {
  max-width: 100%;
  overflow-x: hidden;
}

.dashboard-native-filters .superset-1dlf2oo,
.dashboard-native-filters :has(> .filter-apply-button) {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
}

.dashboard-native-filters .native-filter-control,
.dashboard-native-filters .ant-select,
.dashboard-native-filters .ant-input,
.dashboard-native-filters .ant-input-affix-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
}

/* Keep native-filter labels and values readable on every dashboard. */
[data-test="filter-bar"] [data-test="filter-control-name"] {
  max-width: none !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
}

[data-test="filter-bar"] .ant-form-item-control,
[data-test="filter-bar"] .native-filter-control {
  width: min(20rem, calc(100vw - 2rem)) !important;
  min-width: min(20rem, calc(100vw - 2rem)) !important;
  max-width: min(20rem, calc(100vw - 2rem)) !important;
}

[data-test="filter-bar"] .ant-select-selection-item,
[data-test="filter-bar"] .ant-select-selection-placeholder {
  max-width: none !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
}

[data-test="filter-bar"] .ant-select-selection-overflow {
  flex-wrap: wrap !important;
}

[data-test="filter-bar"] .ant-select-selector {
  height: auto !important;
  min-height: 2rem !important;
}

.dashboard-native-filters .ant-input,
.dashboard-native-filters .ant-input-affix-wrapper,
.dashboard-native-filters .ant-select-selector,
.native-filter-control .ant-input,
.native-filter-control .ant-input-affix-wrapper,
.native-filter-control .ant-select-selector {
  background-color: #f9fafb !important;
  border-color: #868e96 !important;
  color: #212529 !important;
}

.dashboard-native-filters .ant-input::placeholder,
.dashboard-native-filters .ant-select-selection-placeholder,
.native-filter-control .ant-input::placeholder,
.native-filter-control .ant-select-selection-placeholder {
  color: #495057 !important;
  opacity: 1 !important;
}

.dashboard-native-filters .ant-select-selection-item,
.native-filter-control .ant-select-selection-item {
  color: #212529 !important;
}

.dashboard-native-filters .ant-select-arrow,
.native-filter-control .ant-select-arrow {
  color: #343a40 !important;
}

.dashboard-native-filters .ant-select-disabled .ant-select-arrow,
.native-filter-control .ant-select-disabled .ant-select-arrow {
  color: #6c757d !important;
}

.dashboard-native-filters .ant-input:hover,
.dashboard-native-filters .ant-input-affix-wrapper:hover,
.dashboard-native-filters .ant-select:not(.ant-select-disabled):hover
  .ant-select-selector,
.native-filter-control .ant-input:hover,
.native-filter-control .ant-input-affix-wrapper:hover,
.native-filter-control .ant-select:not(.ant-select-disabled):hover
  .ant-select-selector {
  border-color: #495057 !important;
}

.dashboard-native-filters .ant-input:focus,
.dashboard-native-filters .ant-input-affix-wrapper-focused,
.dashboard-native-filters .ant-select-focused .ant-select-selector,
.native-filter-control .ant-input:focus,
.native-filter-control .ant-input-affix-wrapper-focused,
.native-filter-control .ant-select-focused .ant-select-selector {
  border-color: #1a196f !important;
  box-shadow: 0 0 0 2px rgb(26 25 111 / 18%) !important;
}

.dashboard-native-filters .ant-input:disabled,
.dashboard-native-filters .ant-select-disabled .ant-select-selector,
.native-filter-control .ant-input:disabled,
.native-filter-control .ant-select-disabled .ant-select-selector {
  background-color: #f1f3f5 !important;
  border-color: #adb5bd !important;
  color: #6c757d !important;
}

.dashboard-native-filters .filter-apply-button,
.dashboard-native-filters .filter-clear-all-button {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 2.5rem;
  border-radius: 0.375rem !important;
  font-size: 0.875rem;
  font-weight: 600;
}

.dashboard-native-filters .filter-apply-button {
  margin-top: 0.5rem !important;
  border: 1px solid #1a196f !important;
  background: #1a196f !important;
  color: #ffffff !important;
}

.dashboard-native-filters .filter-apply-button:not(:disabled):hover,
.dashboard-native-filters .filter-apply-button:not(:disabled):focus-visible {
  border-color: #15145c !important;
  background: #15145c !important;
  color: #ffffff !important;
}

.dashboard-native-filters .filter-clear-all-button {
  border: 1px solid #1a196f !important;
  background: transparent !important;
  color: #1a196f !important;
}

.dashboard-native-filters .filter-clear-all-button:not(:disabled):hover,
.dashboard-native-filters .filter-clear-all-button:not(:disabled):focus-visible {
  border-color: #15145c !important;
  background: rgb(26 25 111 / 8%) !important;
  color: #15145c !important;
}

.dashboard-native-filters .filter-apply-button:disabled,
.dashboard-native-filters .filter-clear-all-button:disabled {
  border-color: #adb5bd !important;
  background: #f1f3f5 !important;
  color: #8a8f98 !important;
  cursor: not-allowed;
}

/* Global localized horizontal overflow trigger. */
button[data-test="dropdown-container-btn"],
button.ant-btn-color-primary.ant-btn-variant-filled.superset-button-secondary,
button.intraact-more-filters-button {
  position: relative !important;
  min-width: max-content !important;
  padding-inline: 0.75rem !important;
  border-color: #1a196f !important;
  background: #1a196f !important;
  color: #ffffff !important;
  gap: 0.25rem !important;
  font-size: 0.875rem !important;
}

button[data-test="dropdown-container-btn"]:hover,
button[data-test="dropdown-container-btn"]:focus-visible,
button.ant-btn-color-primary.ant-btn-variant-filled.superset-button-secondary:hover,
button.ant-btn-color-primary.ant-btn-variant-filled.superset-button-secondary:focus-visible,
button.intraact-more-filters-button:hover,
button.intraact-more-filters-button:focus-visible {
  border-color: #15145c !important;
  background: #15145c !important;
  color: #ffffff !important;
}

button[data-test="dropdown-container-btn"] > span,
button[data-test="dropdown-container-btn"] .anticon,
button[data-test="dropdown-container-btn"] svg,
button.ant-btn-color-primary.ant-btn-variant-filled.superset-button-secondary > span,
button.ant-btn-color-primary.ant-btn-variant-filled.superset-button-secondary .anticon,
button.ant-btn-color-primary.ant-btn-variant-filled.superset-button-secondary svg,
button.intraact-more-filters-button > span,
button.intraact-more-filters-button .anticon,
button.intraact-more-filters-button svg {
  color: #ffffff !important;
  fill: currentcolor !important;
}

button[data-test="dropdown-container-btn"] > .ant-btn-icon,
button[data-test="dropdown-container-btn"] .anticon,
button[data-test="dropdown-container-btn"] .ant-badge,
button[data-test="dropdown-container-btn"] .ant-badge-count,
button.intraact-more-filters-button > .ant-btn-icon,
button.intraact-more-filters-button .anticon,
button.intraact-more-filters-button .ant-badge,
button.intraact-more-filters-button .ant-badge-count {
  font-size: 0.75rem !important;
}

button[data-test="dropdown-container-btn"] .anticon-down,
button.intraact-more-filters-button .anticon-down {
  display: none !important;
}

/* Keep table search controls readable after localizing column names. */
.search-select-container .search-by-label {
  white-space: nowrap !important;
}

.search-select-container .ant-select {
  width: 20rem !important;
  min-width: min(20rem, calc(100vw - 4rem)) !important;
  max-width: min(20rem, calc(100vw - 4rem)) !important;
}
