.navds-select__input {
  appearance: none;
  background-color: var(--ax-bg-input);
  border-radius: var(--ax-border-radius-medium);
  border: 1px solid var(--ax-border-default);
  color: var(--ax-text-default);
  width: 100%;
  box-sizing: border-box;
  min-height: 3rem;
  display: inline-block;
  position: relative;
  padding: var(--ax-spacing-2);
  padding-right: var(--ax-spacing-10);

  &:hover {
    border-color: var(--ax-border-accent-strong);
    cursor: pointer;
  }

  &:focus {
    outline: 2px solid var(--ax-border-focus);
    outline-offset: 2px;
    border-color: var(--ax-border-accent-strong);
  }

  @media (forced-colors: active) {
    & {
      background-color: ButtonFace;
      border-color: ButtonText;
      color: ButtonText;
    }
  }
}

.navds-select__container {
  position: relative;
  display: flex;
  width: 100%;
  color: var(--ax-text-default);
}

/* ------------------------------- Select Icon ------------------------------ */
.navds-select__chevron {
  position: absolute;
  font-size: 1.5rem;
  right: var(--ax-spacing-2);
  pointer-events: none;
  align-self: center;
  color: var(--ax-text-default);

  @media (forced-colors: active) {
    & {
      color: ButtonText;
    }
  }
}

/* ------------------------------ Select Sizing ----------------------------- */
.navds-form-field--small {
  & .navds-select__input {
    min-height: 2rem;
    padding-block: 0;
  }
}

/* --------------------------- Select Error-state --------------------------- */
.navds-select--error {
  > * select {
    box-shadow: 0 0 0 1px var(--ax-border-danger);
    border-color: var(--ax-border-danger);
  }

  > * select:hover,
  > * select:focus {
    box-shadow: 0 0 0 1px var(--ax-border-danger-strong);
    border-color: var(--ax-border-danger-strong);
  }
}

/* ----------------------------- Select disabled ---------------------------- */
.navds-select__input:disabled {
  background-color: var(--ax-bg-input);
  border: 1px solid var(--ax-border-default);
  box-shadow: none;
  cursor: not-allowed;

  /* Chrome-fix */
  opacity: 1;
  color: var(--ax-text-default);

  & > option {
    color: var(--ax-text-default);
  }

  @media (forced-colors: active) {
    & + .navds-select__chevron {
      color: GrayText;
    }
  }
}

/* ----------------------------- Select Readonly ---------------------------- */
.navds-select--readonly {
  & .navds-select__input {
    background-color: var(--ax-bg-neutral-moderate);
    border-color: var(--ax-border-neutral-subtleA);
    cursor: default;

    @media (forced-colors: active) {
      &:is(:hover, :focus) {
        background-color: ButtonFace;
        border-color: ButtonText;
        color: ButtonText;
      }
    }
  }

  & .navds-select__chevron {
    color: var(--ax-text-subtle);
  }
}
