.wd-multi-select {
  position: relative;
  width: 100%;
}

.wd-multi-select-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: #111827;
  gap: 0.5rem;
  text-align: left;
  padding: 0.45rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: #fff;
  min-height: 2.25rem;
}

.wd-multi-select-toggle:hover {
  border-color: #9ca3af;
}

.wd-multi-select-summary {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wd-multi-select-caret {
  font-size: 0.75rem;
  color: #6b7280;
}

.wd-multi-select-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.35rem);
  left: 0;
  width: 100%;
  min-width: 12rem;
  max-height: 16rem;
  display: flex;
  flex-direction: column;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
}

.wd-multi-select-panel[hidden] {
  display: none;
}

.wd-multi-select-search {
  padding: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.wd-multi-select-search input {
  width: 100%;
  padding: 0.4rem 0.55rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font: inherit;
}

.wd-multi-select-hint {
  margin: 0;
  padding: 0.35rem 0.65rem 0;
  color: #6b7280;
  font-size: 0.75rem;
}

.wd-multi-select-options {
  margin: 0;
  padding: 0.25rem 0.5rem 0.5rem;
  list-style: none;
  overflow: auto;
  flex: 1;
}

.wd-multi-select-option label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.25rem;
  border-radius: 0.35rem;
  cursor: pointer;
}

.wd-multi-select-option label:hover {
  background: #f3f4f6;
}

.wd-multi-select-option input {
  accent-color: #2563eb;
}

.wd-multi-select-actions {
  padding: 0.45rem 0.65rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
}

.wd-multi-select-clear {
  border: none;
  background: none;
  color: #2563eb;
  font: inherit;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.35rem;
}

.wd-multi-select-clear:hover {
  background: rgba(37, 99, 235, 0.08);
}

.wd-multi-select-input {
  display: none;
}

@media (max-width: 720px) {
  .wd-multi-select-panel {
    position: fixed;
    left: 1rem;
    right: 1rem;
    top: auto;
    bottom: 1.5rem;
    max-height: 60vh;
  }

  .wd-multi-select {
    width: 100%;
  }
}
