/* Shared single-select component; the native select remains the form value. */
body.ui-v2 .ui-select {
  position: relative;
  display: block;
  min-width: 0;
  width: 100%;
}

body.ui-v2 select.ui-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  clip-path: inset(50%);
  pointer-events: none;
}

body.ui-v2 .ui-select > .ui-select-trigger {
  position: relative;
  display: flex;
  width: 100%;
  min-height: var(--ui-control-height-md);
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 44px 10px 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-control-radius);
  background: var(--ui-glass-control);
  color: var(--ui-ink);
  font: inherit;
  font-size: var(--ui-type-label);
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition: border-color var(--ui-motion-fast), box-shadow var(--ui-motion-fast);
}

body.ui-v2 .ui-select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.ui-v2 .ui-select-chevron {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--ui-muted);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
}

body.ui-v2 .ui-select-trigger:hover:not(:disabled) {
  border-color: var(--ui-line-strong);
  background: var(--ui-paper-solid);
}

body.ui-v2 .ui-select-trigger:focus-visible,
body.ui-v2 .ui-select-trigger[aria-expanded="true"] {
  outline: 0;
  border-color: var(--ui-red);
  box-shadow: 0 0 0 3px rgba(176, 32, 40, .1);
}

body.ui-v2 .ui-select-trigger:disabled {
  opacity: .5;
  cursor: not-allowed;
}

body.ui-v2 .ui-select-trigger[aria-invalid="true"] {
  border-color: var(--ui-danger);
}

body.ui-v2 .ui-select-menu {
  position: fixed;
  z-index: 200;
  display: grid;
  gap: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 5px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-control-radius);
  background: var(--ui-paper-solid);
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow-md);
}

body.ui-v2 .ui-select-menu[hidden] {
  display: none;
}

body.ui-v2 .ui-select-option {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 0;
  border-radius: var(--ui-radius-xs);
  background: transparent;
  color: var(--ui-ink);
  font: inherit;
  font-size: var(--ui-type-label);
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

body.ui-v2 .ui-select-option:hover,
body.ui-v2 .ui-select-option.is-highlighted {
  background: var(--ui-soft);
}

body.ui-v2 .ui-select-option[aria-selected="true"] {
  color: var(--ui-red);
  font-weight: 700;
}

body.ui-v2 .ui-select-option:disabled {
  opacity: .45;
  cursor: not-allowed;
}

body.ui-v2 .ui-select-option-check {
  width: 14px;
  flex: 0 0 14px;
  color: var(--ui-red);
}

body.ui-v2 .language-select:has(> .ui-select)::after,
body.ui-v2 .select-control:has(> .ui-select)::after {
  display: none;
}

body.ui-v2 .language-select .ui-select-trigger {
  min-height: 48px;
  padding-top: 17px;
  padding-bottom: 6px;
}
