:root {
  --ir-select-accent: #f59e0b;
  --ir-select-accent-border: #f3c556;
  --ir-select-accent-soft: #fffaf0;
  --ir-select-accent-softer: #fffdf8;
  --ir-select-border: #e5e7eb;
  --ir-select-border-soft: #eef0f2;
  --ir-select-surface: #ffffff;
  --ir-select-surface-muted: #f9fafb;
  --ir-select-text: #111827;
  --ir-select-muted: #6b7280;
  --ir-select-placeholder: #9ca3af;
  --ir-select-radius: 12px;
  --ir-select-shadow: 0 14px 34px rgba(15, 23, 42, .12);
  --ir-select-z: 2147482000;
}

.ir-select-system {
  position: relative;
  display: inline-flex;
  width: auto;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
}

.ir-select-system--full,
.ir-custom-select.ir-select-system,
.ir-select-premium.ir-select-system {
  width: 100%;
}

.ir-select__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.ir-select-system .ir-select__trigger,
.ir-select-system .ir-custom-select-trigger.ir-select__trigger {
  appearance: none !important;
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 48px !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin: 0 !important;
  border: 1px solid var(--ir-select-border) !important;
  border-radius: var(--ir-select-radius) !important;
  background: var(--ir-select-surface) !important;
  padding: 8px 10px 8px 8px !important;
  color: var(--ir-select-text) !important;
  font: inherit !important;
  font-size: .78rem !important;
  font-weight: 850 !important;
  line-height: 1.45 !important;
  text-align: start !important;
  box-shadow: none !important;
  outline: none !important;
  cursor: pointer !important;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

.ir-select-system .ir-select__trigger:hover {
  border-color: #d8dde4 !important;
  background: #fff !important;
}

.ir-select-system .ir-select__trigger:focus-visible {
  border-color: var(--ir-select-accent) !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .12) !important;
}

.ir-select-system.is-open .ir-select__trigger,
.ir-select-system .ir-select__trigger[aria-expanded="true"] {
  border-color: var(--ir-select-accent-border) !important;
  background: var(--ir-select-accent-softer) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
}

.ir-select-system.is-invalid .ir-select__trigger {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .11) !important;
}

.ir-select-system .ir-select__trigger:disabled {
  cursor: not-allowed !important;
  opacity: .58 !important;
  background: #f8fafc !important;
}

.ir-select__value {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ir-select__trigger.is-placeholder .ir-select__value { color: var(--ir-select-placeholder); }

.ir-select__chevron-shell {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 8px;
  color: #8b95a4;
  transition: background .16s ease, color .16s ease;
}

.ir-select-system.is-open .ir-select__chevron-shell {
  background: #fffbeb;
  color: #b7791f;
}

.ir-select__chevron,
.ir-select-system .ir-custom-select-chevron.ir-select__chevron {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px !important;
  transform: none !important;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1) !important;
}

.ir-select-system.is-open .ir-select__chevron,
.ir-select-system .ir-select__trigger[aria-expanded="true"] .ir-select__chevron {
  transform: rotate(180deg) !important;
}

.ir-select__panel {
  position: fixed;
  z-index: var(--ir-select-z);
  box-sizing: border-box;
  display: flex;
  min-width: 210px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ir-select-accent-border);
  border-radius: 13px;
  background: var(--ir-select-surface);
  box-shadow: var(--ir-select-shadow);
  color: var(--ir-select-text);
  transform-origin: top center;
}

.ir-select__panel[hidden] { display: none !important; }
.ir-select__panel[data-side="top"] { transform-origin: bottom center; }
.ir-select__panel[data-open="1"] { animation: irSelectSurfaceOpen .16s ease-out both; }
.ir-select__panel[data-closing="1"] {
  pointer-events: none;
  animation: irSelectSurfaceClose .12s ease-in both;
}

@keyframes irSelectSurfaceOpen {
  from { opacity: 0; transform: translateY(-4px) scale(.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes irSelectSurfaceClose {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-3px) scale(.995); }
}

.ir-select__panel[data-side="top"][data-open="1"] { animation-name: irSelectSurfaceOpenTop; }
.ir-select__panel[data-side="top"][data-closing="1"] { animation-name: irSelectSurfaceCloseTop; }

@keyframes irSelectSurfaceOpenTop {
  from { opacity: 0; transform: translateY(4px) scale(.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes irSelectSurfaceCloseTop {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(3px) scale(.995); }
}

.ir-select__search {
  display: flex;
  min-height: 64px;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #f1f3f5;
  background: var(--ir-select-accent-softer);
  padding: 10px;
}

.ir-select__search-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: #9ca3af;
}

.ir-select__search-input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid #e3e6ea !important;
  border-radius: 10px !important;
  background: #fff !important;
  padding: 0 11px !important;
  color: var(--ir-select-text) !important;
  font: inherit !important;
  font-size: .76rem !important;
  font-weight: 700 !important;
  outline: none !important;
  box-shadow: none !important;
}

.ir-select__search-input::placeholder { color: #a0a8b4; }
.ir-select__search-input:focus {
  border-color: var(--ir-select-accent) !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .10) !important;
}
.ir-select__search-input::-webkit-search-cancel-button { display: none; }

.ir-select__options {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 7px;
  scrollbar-gutter: stable;
}

.ir-select__group { display: grid; gap: 3px; }
.ir-select__group + .ir-select__group { margin-top: 5px; }
.ir-select__group-label {
  padding: 6px 8px 3px;
  color: #9ca3af;
  font-size: .62rem;
  font-weight: 900;
}
.ir-select__group-options { display: grid; gap: 4px; }

.ir-select__option {
  appearance: none;
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 8px 10px;
  color: var(--ir-select-text);
  font: inherit;
  font-size: .76rem;
  font-weight: 780;
  line-height: 1.55;
  text-align: start;
  cursor: pointer;
  outline: none;
  transition: border-color .13s ease, background .13s ease, transform .13s ease;
}

.ir-select__option:hover,
.ir-select__option:focus-visible {
  border-color: rgba(245, 158, 11, .28);
  background: var(--ir-select-accent-soft);
}
.ir-select__option:active { transform: translateY(1px); }
.ir-select__option.is-selected {
  border-color: rgba(245, 158, 11, .40);
  background: #fff7e6;
  color: #8a5a0a;
}
.ir-select__option:disabled { cursor: not-allowed; opacity: .45; }
.ir-select__option[hidden] { display: none !important; }

.ir-select__option-text {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ir-select__option-check {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 7px;
  background: rgba(245, 158, 11, .12);
  color: #b7791f;
  font-size: .68rem;
  font-weight: 950;
  opacity: 0;
  transform: scale(.84);
  transition: opacity .13s ease, transform .13s ease;
}
.ir-select__option.is-selected .ir-select__option-check { opacity: 1; transform: scale(1); }

.ir-select__empty {
  padding: 22px 14px;
  color: var(--ir-select-muted);
  font-size: .75rem;
  font-weight: 750;
  text-align: center;
}
.ir-select__empty[hidden] { display: none !important; }

.dark .ir-select-system .ir-select__trigger,
.dark .ir-select-system .ir-custom-select-trigger.ir-select__trigger {
  border-color: #3b4658 !important;
  background: #111827 !important;
  color: #f8fafc !important;
}
.dark .ir-select-system.is-open .ir-select__trigger,
.dark .ir-select-system .ir-select__trigger[aria-expanded="true"] {
  border-color: rgba(245, 158, 11, .58) !important;
  background: #171b24 !important;
}
.dark .ir-select-system.is-open .ir-select__chevron-shell {
  background: rgba(245, 158, 11, .12);
  color: #f3c556;
}
.dark .ir-select__panel {
  border-color: rgba(245, 158, 11, .55);
  background: #111827;
  color: #f8fafc;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .38);
}
.dark .ir-select__search { border-bottom-color: #263244; background: #171b24; }
.dark .ir-select__search-input {
  border-color: #3b4658 !important;
  background: #1b2433 !important;
  color: #f8fafc !important;
}
.dark .ir-select__option { color: #e5e7eb; }
.dark .ir-select__option:hover,
.dark .ir-select__option:focus-visible {
  border-color: rgba(245, 158, 11, .25);
  background: rgba(245, 158, 11, .10);
}
.dark .ir-select__option.is-selected {
  border-color: rgba(245, 158, 11, .42);
  background: rgba(245, 158, 11, .14);
  color: #f7cc73;
}
.dark .ir-select__group-label,
.dark .ir-select__empty { color: #94a3b8; }

@media (max-width: 640px) {
  .ir-select-system .ir-select__trigger,
  .ir-select-system .ir-custom-select-trigger.ir-select__trigger { min-height: 46px !important; }
  .ir-select__panel { max-width: calc(100vw - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  .ir-select__panel[data-open="1"],
  .ir-select__panel[data-closing="1"] { animation: none !important; }
  .ir-select__chevron,
  .ir-select__option,
  .ir-select__trigger { transition: none !important; }
}

/* Shared SelectSystem chevron: use the canonical Arrow 2 asset everywhere. */
.ir-select__chevron-shell {
  position: relative;
}

.ir-select__chevron-shell::before {
  width: 18px;
  height: 18px;
  background: url("../icons/ui/arrows/arrow2_down_black.svg") center / contain no-repeat;
  content: "";
  transform: rotate(0deg);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), filter .16s ease;
}

.ir-select__chevron,
.ir-select-system .ir-custom-select-chevron.ir-select__chevron {
  display: none !important;
}

.ir-select-system.is-open .ir-select__chevron-shell::before,
.ir-select-system .ir-select__trigger[aria-expanded="true"] .ir-select__chevron-shell::before {
  transform: rotate(180deg);
}

.dark .ir-select__chevron-shell::before {
  filter: invert(1);
}

@media (prefers-reduced-motion: reduce) {
  .ir-select__chevron-shell::before { transition: none !important; }
}


.ir-select__load-more {
  appearance: none;
  display: flex;
  width: calc(100% - 14px);
  min-height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin: 0 7px 7px;
  border: 1px solid rgba(245, 158, 11, .34);
  border-radius: 10px;
  background: #fffaf0;
  padding: 7px 10px;
  color: #9a670d;
  font: inherit;
  font-size: .72rem;
  font-weight: 900;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, transform .14s ease;
}
.ir-select__load-more:hover {
  border-color: rgba(245, 158, 11, .62);
  background: #fff7e6;
}
.ir-select__load-more:active { transform: translateY(1px); }
.ir-select__load-more:disabled { cursor: wait; opacity: .62; }
.ir-select__load-more[hidden] { display: none !important; }

.dark .ir-select__load-more {
  border-color: rgba(245, 158, 11, .34);
  background: rgba(245, 158, 11, .10);
  color: #f7cc73;
}
.dark .ir-select__load-more:hover {
  border-color: rgba(245, 158, 11, .55);
  background: rgba(245, 158, 11, .14);
}
