.ss {
  position: relative;
  width: 100%;
  max-width: var(--field-max, 360px);
  font: inherit;
}

.ss select.ss-original {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.ss-trigger {
  width: 100%;
  max-width: var(--field-max, 360px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--bs-body-color, #212529);
  background-color: var(--bs-body-bg, #fff);
  border: 1px solid var(--bs-border-color, #ced4da);
  border-radius: var(--bs-border-radius, 0.375rem);
  cursor: pointer;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-trigger:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

.ss-trigger.placeholder {
  color: #999999;
}

.ss-trigger .ss-value {
  flex: 1 1 auto;
  margin-right: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.ss-trigger .ss-caret {
  margin-left: auto;
}

.ss-trigger .ss-caret {
  font-size: 12px;
  color: #999999;
}

.ss.is-open .ss-trigger {
  border-bottom-color: #000000;
}

.ss-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: min(500px, 90vw);
  max-width: min(500px, calc(var(--field-max, 280px) + 160px));
  z-index: 40;
  background: #ffffff;
  border: 1px solid #999999;
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
  padding: 10px 0 12px;
  display: none;
  box-sizing: border-box;
}

.ss.is-open .ss-panel {
  display: block;
}

.ss-search {
  padding: 0 12px 10px;
}

.ss-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #999999;
  border-radius: 8px;
  font-size: 14px;
}

.ss-search input:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

.ss-list {
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ss-option {
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #1f2933;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.ss-option:hover,
.ss-option.is-focused {
  background: #e6e6e6;
  color: #000000;
}

.ss-option.is-selected::before {
  content: "✓";
  font-size: 12px;
  color: #000000;
}

.ss-option[aria-disabled="true"] {
  color: #999999;
  cursor: not-allowed;
}

.ss-empty {
  text-align: center;
  padding: 12px;
  color: #999999;
  font-size: 0.85rem;
}

.ss-multi-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #e6e6e6;
  color: #000000;
  padding: 4px 10px;
  font-size: 12px;
  margin-right: 6px;
}

.ss-multi-ellipsis {
  font-size: 12px;
  color: #999999;
}

.ss-option.is-hidden {
  display: none;
}

.ss-list::-webkit-scrollbar {
  width: 6px;
}

.ss-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(107, 114, 128, 0.35);
}
