/* One menu for project pickers, filters, forms, and the landing navigation. */

.mw-select {
  position: relative;
  min-width: 0;
}

.mw-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm, 7px);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.mw-select-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mw-select-btn .mw-chevron {
  flex: none;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mw-select-btn[aria-expanded='true'] {
  border-color: var(--accent);
}

.mw-select-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mw-select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 2px;
  min-width: 100%;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius, 10px);
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.mw-select-menu[hidden] {
  display: none;
}

.mw-select-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.mw-select-option[aria-selected='true'] {
  background: var(--hover, var(--card-2));
}

.mw-select-option:hover,
.mw-select-option:focus-visible {
  background: var(--hover, var(--card-2));
  outline: none;
}

.mw-select-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

select.mw-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}
