/* Vendored from dash-core-components dropdown.css — keep in sync with dcc.Dropdown chrome. */
.dash-dropdown {
  accent-color: var(--Dash-Fill-Interactive-Strong);
  background: var(--Dash-Fill-Inverse-Strong);
  border: none;
  box-sizing: border-box;
  cursor: pointer;
  display: block;
  flex: 1;
  font-family: inherit;
  font-size: inherit;
  outline: none;
  outline-color: var(--Dash-Fill-Interactive-Strong);
  overflow: hidden;
  padding: 0;
  width: 100%;
}

.dash-dropdown-grid-container {
  display: grid;
  gap: calc(var(--Dash-Spacing) * 2);
  grid-template-columns: auto 1fr;
  place-items: center start;
}

.dash-dropdown-grid-container:has(> :nth-child(3)) {
  grid-template-columns: auto 1fr auto;
}

.dash-dropdown-grid-container:has(> :nth-child(4)) {
  grid-template-columns: auto 1fr auto auto;
}

.dash-dropdown,
.dash-dropdown-content {
  border: 1px solid var(--Dash-Stroke-Strong);
  border-radius: var(--Dash-Spacing);
  color: inherit;
  text-align: left;
}

.dash-dropdown-trigger {
  height: 100%;
  min-height: 32px;
  padding: 0 12px;
}

.dash-dropdown:focus {
  border: 1px solid var(--Dash-Fill-Interactive-Strong);
  outline: 1px solid var(--Dash-Fill-Interactive-Strong);
}

.dash-dropdown:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.dash-dropdown-value {
  max-width: 100%;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-dropdown-placeholder {
  color: var(--Dash-Text-Disabled);
}

.dash-dropdown-value > * {
  display: inline;
}

.dash-dropdown-value-item:not(:first-child)::before {
  content: ", ";
}

.dash-dropdown-content {
  background: var(--Dash-Fill-Inverse-Strong);
  box-shadow:
    0 10px 38px -10px var(--Dash-Shading-Strong),
    0 10px 20px -15px var(--Dash-Shading-Weak);
  max-width: 98vw;
  min-width: var(--radix-popover-trigger-width);
  overflow-y: auto;
  overscroll-behavior: contain;
  width: fit-content;
  z-index: 500;
}

.dash-dropdown-value-count,
.dash-dropdown-trigger-icon {
  color: var(--Dash-Text-Strong);
  fill: var(--Dash-Text-Strong);
  justify-self: end;
  white-space: nowrap;
}

.dash-dropdown-trigger-icon {
  transition: transform 0.15s;
}

[data-state="open"] .dash-dropdown-trigger-icon {
  transform: rotate(180deg);
}

.dash-dropdown-value-count {
  background: var(--Dash-Fill-Interactive-Weak);
  border-radius: 4px;
  color: var(--Dash-Text-Weak);
  font-size: 0.875em;
  line-height: 18px;
  padding: 4px;
}

.dash-dropdown-search-container {
  background: var(--Dash-Fill-Inverse-Strong);
  border: 1px solid var(--Dash-Stroke-Strong);
  border-radius: 4px;
  margin: calc(var(--Dash-Spacing) * 2);
  padding: var(--Dash-Spacing);
  position: sticky;
  top: calc(var(--Dash-Spacing) * 2);
}

.dash-dropdown-search-container:focus-within {
  border-color: var(--Dash-Fill-Interactive-Strong);
  outline: 1px solid var(--Dash-Fill-Interactive-Strong);
}

.dash-dropdown-search-icon,
.dash-dropdown-clear {
  height: 1em;
  width: 1em;
}

.dash-dropdown-search-icon {
  color: var(--Dash-Text-Weak);
}

.dash-dropdown-search-container:focus-within .dash-dropdown-search-icon {
  color: var(--Dash-Fill-Interactive-Strong);
}

.dash-dropdown-clear {
  align-items: center;
  background: none;
  border: none;
  color: var(--Dash-Text-Strong);
  cursor: pointer;
  display: flex;
  justify-content: center;
  justify-self: end;
  padding: 0;
}

.dash-dropdown-clear:hover {
  color: var(--Dash-Fill-Interactive-Strong);
}

.dash-dropdown-clear:focus {
  border-radius: 2px;
  outline: 2px solid var(--Dash-Fill-Interactive-Strong);
  outline-offset: 1px;
}

.dash-dropdown-search {
  background: transparent;
  border: none;
  color: var(--Dash-Text-Strong);
  font-family: inherit;
  font-size: inherit;
  line-height: calc(var(--Dash-Spacing) * 6);
  outline: none;
  padding: 0;
  width: 100%;
}

/* Hide the "x" clear button in search inputs */
.dash-dropdown-search::-webkit-search-cancel-button {
  appearance: none;
  display: none;
}

.dash-dropdown-search::-ms-clear {
  display: none;
}

.dash-dropdown-actions {
  border-bottom: 1px solid var(--Dash-Fill-Disabled);
  border-top: 1px solid var(--Dash-Fill-Disabled);
  display: flex;
  gap: calc(var(--Dash-Spacing) * 6);
  line-height: 18px;
  padding: var(--Dash-Spacing) calc(var(--Dash-Spacing) * 3);
}

.dash-dropdown-action-button {
  accent-color: var(--Dash-Fill-Interactive-Strong);
  background: none;
  border: none;
  color: var(--Dash-Text-Weak);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875em;
  font-weight: 600;
  outline-color: var(--Dash-Fill-Interactive-Strong);
  padding: 0;
  text-decoration: none;
  white-space: nowrap;
}

.dash-dropdown-action-button:hover {
  color: var(--Dash-Fill-Interactive-Strong);
}

.dash-dropdown-action-button:focus {
  text-decoration: underline;
}

.dash-dropdown-options {
  overflow-y: auto;
}

.dash-dropdown-option {
  box-shadow: 0 -1px 0 0 var(--Dash-Fill-Disabled) inset;
  padding: calc(var(--Dash-Spacing) * 2) calc(var(--Dash-Spacing) * 3);
}

.dash-dropdown-option
  .dash-options-list-option-wrapper:has(input[type="radio"]) {
  overflow: hidden;

  /* radio buttons are used in single-select dropdowns to aid keyboard
   * selection and screen readers, but visually, they are hidden
   */
  width: 0;
}

/* Positioning container for the dropdown */
.dash-dropdown-wrapper {
  position: relative;
}
