/* Select */
.ui-select {
  @apply flex w-full max-w-80 flex-col gap-2;
}

.ui-select__control-wrapper {
  @apply relative;
}

.ui-select__label {
  @apply flex items-end gap-1 text-gray-900;
}

.ui-select__label--xs {
  @apply text-xs font-normal leading-4;
}

.ui-select__label--sm,
.ui-select__label--md {
  @apply text-sm font-normal leading-5;
}

.ui-select__label--lg {
  @apply text-base font-normal leading-6;
}

.ui-select__required {
  @apply text-red-500;
}

.ui-select__control {
  @apply flex w-full cursor-pointer items-center rounded-md border border-gray-200 bg-white;
}

.ui-select__control--xs {
  @apply h-6 gap-1 px-2;
}

.ui-select__control--sm {
  @apply h-8 gap-1.5 px-3;
}

.ui-select__control--md {
  @apply h-10 gap-2 px-4;
}

.ui-select__control--lg {
  @apply h-12 gap-2 px-5;
}

.ui-select__control--error {
  @apply border-red-500;
}

.ui-select__control--disabled {
  @apply cursor-not-allowed border-gray-200 bg-gray-50;
}

.ui-select__control:focus {
  @apply outline-none;
}

.ui-select:not(.ui-select--disabled) .ui-select__control:focus {
  @apply border-blue-500 ring-1 ring-inset ring-blue-500;
}

/* 表示テキスト */
.ui-select__display-text {
  @apply min-w-0 flex-1 truncate text-gray-900;
}

.ui-select__display-text--xs {
  @apply text-xs font-normal leading-4;
}

.ui-select__display-text--sm {
  @apply text-sm font-normal leading-5;
}

.ui-select__display-text--md {
  @apply text-base font-normal leading-6;
}

.ui-select__display-text--lg {
  @apply text-lg font-normal leading-7;
}

.ui-select__placeholder {
  @apply text-gray-400;
}

.ui-select--disabled .ui-select__display-text {
  @apply text-gray-400;
}

/* アイコン */
.ui-select__icon {
  @apply flex shrink-0 items-center justify-center text-gray-400;
  line-height: 1;
}

.ui-select__icon .icon {
  @apply flex items-center justify-center;
  line-height: 1;
}

.ui-select__icon--right {
  @apply pointer-events-none transition-transform duration-200;
}

.ui-select--open .ui-select__icon--right {
  @apply rotate-180;
}

.ui-select__icon--xs {
  @apply size-3;
}

.ui-select__icon--sm {
  @apply size-3.5;
}

.ui-select__icon--md {
  @apply size-4;
}

.ui-select__icon--lg {
  @apply size-5;
}

/* ドロップダウンメニュー */
.ui-select__menu {
  @apply absolute top-full left-0 z-10 mt-1 hidden w-full overflow-y-auto rounded-md border border-gray-200 bg-white py-1;
  max-height: 240px;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.08);
}

.ui-select__menu--open {
  @apply block;
}

/* オプション項目 */
.ui-select__option {
  @apply cursor-pointer px-3 py-2 text-sm leading-5 font-normal text-gray-900;
}

.ui-select__option:hover {
  @apply bg-gray-50;
}

.ui-select__option--selected {
  @apply bg-indigo-50;
}

.ui-select__option--focused {
  @apply bg-gray-50;
}

/* ヘルパー・エラーテキスト */
.ui-select__helper {
  @apply text-gray-600;
}

.ui-select__helper--xs,
.ui-select__helper--sm,
.ui-select__helper--md {
  @apply text-xs font-normal leading-4;
}

.ui-select__helper--lg {
  @apply text-sm font-normal leading-5;
}

.ui-select__error {
  @apply text-red-500;
}

.ui-select__error--xs,
.ui-select__error--sm,
.ui-select__error--md {
  @apply text-xs font-normal leading-4;
}

.ui-select__error--lg {
  @apply text-sm font-normal leading-5;
}
