/* Unified custom select — smooth panel + hover; search when many options */
.select-field {
  position: relative;
  width: 100%;
}

.select-field-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.select-field-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  text-align: left;
  background: #ffffff;
  border: 1px solid #c2c8bd;
  border-radius: 0.75rem;
  color: #1a1c19;
  font-size: 0.9375rem;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.select-field-trigger:hover {
  background: #eceee9;
  border-color: #006e1c;
}

.select-field.is-open .select-field-trigger,
.select-field-trigger:focus-visible,
.select-field.is-open .select-field-trigger--combobox,
.select-field-trigger--combobox:focus-within {
  outline: none;
  border-color: #006e1c;
  box-shadow: 0 0 0 3px rgba(0, 110, 28, 0.25);
  background: #ffffff;
}

.select-field-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-field-chevron {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: #414941;
  transition: transform 0.2s ease;
}

.select-field.is-open .select-field-chevron {
  transform: rotate(180deg);
}

.select-field-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 60;
  background: #ffffff;
  border: 1px solid #c2c8bd;
  border-radius: 0.75rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.select-field.is-open .select-field-panel,
.select-field-panel--portal:not([hidden]) {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.select-field-panel--portal {
  position: fixed;
  z-index: 1000;
  left: auto;
  right: auto;
  top: auto;
  transform: none !important;
  transition: opacity 0.15s ease;
}

.select-field-trigger--combobox {
  cursor: text;
  padding: 0;
}

.select-field-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 42px;
  padding: 0.5rem 0 0.5rem 0.75rem;
  border: none;
  background: transparent;
  color: #1a1c19;
  font-size: 0.9375rem;
  line-height: 1.4;
  outline: none;
}

.select-field-input::placeholder {
  color: #727970;
}

.select-field-chevron-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.5rem;
  border: none;
  background: transparent;
  color: #414941;
  cursor: pointer;
}

.select-field-chevron-btn:hover {
  color: #006e1c;
}

.select-field-list {
  max-height: 240px;
  overflow-y: auto;
  padding: 0.25rem;
  scroll-behavior: smooth;
}

.select-field-option {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  text-align: left;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: #1a1c19;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.select-field-option:hover,
.select-field-option.is-focused {
  background: #e8f5e9;
  color: #006e1c;
}

.select-field-option.is-selected {
  background: #d6f0da;
  color: #006e1c;
  font-weight: 600;
}

.select-field-option--placeholder {
  color: #727970;
  font-style: italic;
}

.select-field-option[hidden] {
  display: none !important;
}

.select-field-create {
  color: #006e1c;
  font-weight: 600;
}

.select-field-empty {
  padding: 0.75rem;
  text-align: center;
  color: #727970;
  font-size: 0.875rem;
}
