/* ---- Base wrapper ---- */
.vselect {
  overflow: visible !important;
  position: relative;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  width: 100%;
}

/* ---- Control ---- */
.vselect-control {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 4px 8px;
  background: #fff;
  cursor: text;
}
.vselect.is-open .vselect-control {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.vselect-placeholder {
  color: #94a3b8;
  user-select: none;
}
.vselect-input {
  border: 1px solid #ccc;
  border-radius: 5px;
  outline: 0;
  flex: 1 0 80px;
  width: 100%;
  padding: 6px 4px;
  font-size: 14px;
  background: transparent;
  margin-bottom: 10px !important;
}
.vselect-clear {
  margin-left: auto;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 6px;
  color: #94a3b8;
  outline: none !important;     /* remove focus outline */
  border: none !important;      /* remove border */

}
.vselect-clear:hover {
  color: #475569;
}

.vselect-clear:focus,
.vselect-clear:active {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;  /* removes browser highlight */
  background-color: transparent !important; /* keep clean */
}

/* ---- Multi tags ---- */
.vselect-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  border: 1px solid #e0e7ff;
}
.vselect-tag button {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #6366f1;
  font-size: 14px;
  line-height: 1;
}

.vselect-value {
  /* max-width: 100px; */
  overflow: hidden !important;
  text-overflow: ellipsis;
  display: block;
  white-space: nowrap;
}

.related-widget-wrapper {
  overflow: visible !important;
}

/* ---- Dropdown ---- */
.vselect-dropdown {
  position: absolute;
  z-index: 9999;
  top: auto;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  display: none;
}
.vselect.is-open .vselect-dropdown {
  display: block;
}

.vselect-option {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.vselect-option[aria-selected="true"]::before {
  content: "✓";
}
.vselect-option:hover,
.vselect-option.is-active {
  background: #f1f5f9;
}
.vselect-option[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.vselect-no-results {
  padding: 8px 10px;
  color: #94a3b8;
  font-size: 13px;
}

/* Scrollbar (nice-to-have) */
.vselect-dropdown::-webkit-scrollbar {
  width: 8px;
}
.vselect-dropdown::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}