/* Shared by Widgoo's form controls and the canvas destination picker. */
select.widgoo-select.widgoo-select {
  box-sizing: border-box;
  appearance: none !important;
  border: 1px solid var(--ui-border,#c4dcff) !important;
  border-radius: var(--ui-radius-control,9px) !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2331516f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 9px center !important;
  background-size: 16px !important;
  padding-inline-end: 32px !important;
  cursor: pointer;
  text-overflow: ellipsis;
}
select.widgoo-select.widgoo-select:hover:not(:disabled) { border-color: var(--ui-border-hover,#95c4fa) !important; }
select.widgoo-select.widgoo-select:focus-visible,
select.widgoo-select.widgoo-select.is-select-open {
  border-color: var(--ui-focus,#017cfc) !important;
  outline: 2px solid #017cfc20 !important;
  outline-offset: 1px;
  background-color: #f4f9ff !important;
}
select.widgoo-select.widgoo-select:disabled { opacity: .55; cursor: not-allowed; }
select.widgoo-select.widgoo-select:dir(rtl) { background-position: left 9px center !important; }
select.widgoo-select.widgoo-select:user-invalid,
select.widgoo-select.widgoo-select[aria-invalid="true"] { border-color: var(--ui-danger,#db5964) !important; }
/* List and multiple controls keep their native selection and modifier keys. */
select.widgoo-select.widgoo-select:is([multiple],.widgoo-select-list) {
  background-image: none !important;
  padding: 5px !important;
  scrollbar-width: thin;
  scrollbar-color: #95b8dd transparent;
}
select.widgoo-select:is([multiple],.widgoo-select-list) option { padding: 9px 10px; border-radius: 6px; color: #31516f; }
select.widgoo-select:is([multiple],.widgoo-select-list) option:checked { background: #edf5ff linear-gradient(#edf5ff,#edf5ff); color: #015cb8; font-weight: 700; }
select.widgoo-select option:disabled { color: #8093a8; }

/* Popups inside a dialog must not inherit its direct-child flex layout. */
.widgoo-select-menu.widgoo-select-menu,.studio-canvas-target-menu.studio-canvas-target-menu {
  display: block;
  position: fixed;
  z-index: 2200;
  box-sizing: border-box;
  margin: 0;
  padding: 5px;
  border: 1px solid #95c4fa;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 12px 36px #153e7226;
  color: #17385d;
  font-family: inherit;
  text-align: start;
}
.widgoo-select-menu[hidden] { display: none !important; }
.widgoo-select-menu::backdrop { background: transparent; pointer-events: none; }
.widgoo-select-options,.studio-canvas-target-options {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #95b8dd transparent;
}
.widgoo-select-options::-webkit-scrollbar { width: 6px; }
.widgoo-select-options::-webkit-scrollbar-thumb { background: #95b8dd; border-radius: 6px; }
.widgoo-select-option,.studio-canvas-target-option {
  box-sizing: border-box;
  padding: 9px 10px;
  border-radius: 6px;
  line-height: 1.65;
  cursor: pointer;
  overflow-wrap: anywhere;
  color: #31516f;
}
.widgoo-select-option.is-highlighted,.studio-canvas-target-option.is-highlighted,
.widgoo-select-option:hover:not([aria-disabled="true"]),.studio-canvas-target-option:hover { background: #edf5ff; color: #015cb8; }
.widgoo-select-option[aria-selected="true"],.studio-canvas-target-option[aria-selected="true"] { font-weight: 700; color: #015cb8; }
.widgoo-select-option[aria-selected="true"]::after,.studio-canvas-target-option[aria-selected="true"]::after { content: '✓'; margin-inline-start: 8px; color: #017cfc; }
.widgoo-select-option[aria-disabled="true"] { color: #8093a8; cursor: not-allowed; }
.widgoo-select-group { margin: 4px 0 2px; padding: 7px 10px 4px; color: #66829d; font-size: .9em; font-weight: 700; }
.widgoo-select-group-options { padding: 0; }
@media (forced-colors: active) {
  select.widgoo-select.widgoo-select { appearance: auto !important; background-image: none !important; }
  .widgoo-select-menu,.studio-canvas-target-menu { border-color: ButtonText; }
  .widgoo-select-option.is-highlighted { outline: 1px solid Highlight; }
}
