/* Sized by its container, never by the chosen text, so a long option cannot widen a grid or the page. */
.ig-select {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  contain: inline-size;
}

.ig-select__native {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.ig-select__button {
  min-width: 0;
  display: flex;
  gap: .5rem;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: calc(1.5em + .75rem + 2px);
  padding: .375rem .75rem;
  font: inherit;
  color: #212529;
  text-align: left;
  cursor: pointer;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: .375rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.ig-select__button:hover {
  border-color: var(--gold, #f9c51f);
}

.ig-select__button:focus-visible,
.ig-select.is-open .ig-select__button {
  outline: 0;
  border-color: var(--gold, #f9c51f);
  box-shadow: 0 0 0 .25rem rgba(249, 197, 31, .3);
}

.ig-select.is-disabled .ig-select__button {
  cursor: not-allowed;
  background: #e9ecef;
  border-color: #dee2e6;
  box-shadow: none;
}

.ig-select__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ig-select__value.is-placeholder {
  color: #6c757d;
}

.ig-select__caret {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #6c757d;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease;
}

.ig-select.is-open .ig-select__caret {
  transform: rotate(180deg);
}

.ig-select__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1060;
  width: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(249, 197, 31, .6);
  border-radius: .5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
  animation: ig-select-pop .16s ease-out;
}

.ig-select.is-up .ig-select__panel {
  top: auto;
  bottom: calc(100% + 6px);
}

.ig-select__search {
  display: block;
  width: calc(100% - 16px);
  margin: 8px;
  padding: .4rem .65rem;
  font: inherit;
  font-size: .9rem;
  border: 1px solid #dee2e6;
  border-radius: .375rem;
}

.ig-select__search:focus {
  outline: 0;
  border-color: var(--gold, #f9c51f);
}

.ig-select__search[hidden] {
  display: none;
}

.ig-select__list {
  max-height: 260px;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  list-style: none;
}

.ig-select__list:focus {
  outline: 0;
}

.ig-select__option {
  padding: .55rem .85rem;
  cursor: pointer;
}

.ig-select__option.is-selected {
  font-weight: 600;
  background: #fff6d6;
}

.ig-select__option.is-active {
  color: #212529;
  background: var(--gold, #f9c51f);
}

.ig-select__empty {
  padding: .55rem .85rem;
  color: #6c757d;
}

@keyframes ig-select-pop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ig-select__panel {
    animation: none;
  }

  .ig-select__caret {
    transition: none;
  }
}

.ig-select__value:has(.ig-select__icon, .ig-select__thumb),
.ig-select__option:has(.ig-select__icon, .ig-select__thumb) {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.ig-select__icon {
  flex: none;
  width: 1rem;
  height: 1rem;
}

.ig-select__thumb {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  overflow: hidden;
  background: #f4f5f0;
  border-radius: .375rem;
}

.ig-select__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ig-select__thumb.is-loading img {
  opacity: 0;
}

.ig-select__thumb.is-loading::after {
  position: absolute;
  width: .9rem;
  height: .9rem;
  content: "";
  border: 2px solid rgba(0, 0, 0, .12);
  border-top-color: #7d9a26;
  border-radius: 50%;
  animation: ig-select-spin .7s linear infinite;
}

.ig-select__thumb.is-missing {
  font-size: .45rem;
  font-weight: 700;
  line-height: 1.05;
  color: #6b6e55;
  text-align: center;
  text-transform: uppercase;
}

@keyframes ig-select-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ig-select__thumb.is-loading::after {
    animation-duration: 2s;
  }
}

.ig-select__option.is-active .ig-select__icon {
  color: currentColor !important;
}
