.potok-select-control {
  position: relative;
  min-width: 0;
  width: 100%;
  display: block;
  color: #18263a;
  font-family: inherit;
}

.potok-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  white-space: nowrap !important;
}

.potok-select-trigger {
  box-sizing: border-box;
  width: 100%;
  height: var(--potok-select-height, 38px);
  min-height: var(--potok-select-height, 38px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 11px;
  border: 1px solid var(--potok-select-border, #d5dbe4);
  border-radius: var(--potok-select-radius, 8px);
  outline: 0;
  color: var(--potok-select-ink, #25364b);
  background: var(--potok-select-background, rgb(255 255 255 / 78%));
  box-shadow: 0 2px 8px rgb(18 32 51 / 4%);
  cursor: pointer;
  font: inherit;
  font-size: var(--potok-select-font-size, 11.5px);
  font-weight: 680;
  line-height: 1;
  text-align: left;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, color .18s ease;
}

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

.potok-select-trigger > i {
  justify-self: center;
  color: #5f6d80;
  font-size: 16px;
  line-height: 1;
  transition: transform .2s cubic-bezier(.22, .8, .24, 1);
}

.potok-select-trigger:hover {
  border-color: #bac7d6;
  background: #f8fafc;
  box-shadow: 0 4px 12px rgb(18 32 51 / 8%);
}

.potok-select-trigger:focus-visible {
  border-color: #8eb1ff;
  outline: 2px solid rgb(36 107 254 / 18%);
  outline-offset: 1px;
}

.potok-select-control.is-open .potok-select-trigger {
  border-color: #9bb9ef;
  background: #fbfdff;
  box-shadow: 0 0 0 3px rgb(36 107 254 / 10%);
}

.potok-select-control.is-open .potok-select-trigger > i { transform: rotate(180deg); }
.potok-select-control.is-disabled .potok-select-trigger { cursor: default; opacity: .62; }

.potok-select-menu {
  position: fixed;
  z-index: 2147483000;
  box-sizing: border-box;
  display: grid;
  gap: 2px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #d5dee9;
  border-radius: 10px;
  background: rgb(255 255 255 / 98%);
  box-shadow: 0 14px 34px rgb(18 32 51 / 16%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}

.potok-select-menu[hidden] { display: none; }
.potok-select-menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.potok-select-menu button {
  box-sizing: border-box;
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  color: #233247;
  background: transparent;
  cursor: pointer;
  transform: none;
  font-family: inherit;
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0;
  text-align: left;
  transition: color .15s ease, background-color .15s ease;
}

.potok-select-menu button:hover,
.potok-select-menu button:focus-visible {
  outline: 0;
  color: #154ea7;
  background: #edf4ff;
  transform: none;
}

.potok-select-menu button[aria-selected="true"] {
  color: #174f9f;
  background: #e9f1ff;
  transform: none;
}

.potok-select-menu button:disabled { color: #98a2b1; cursor: default; }
.tk-select-shell > i,
.drawer-select-shell > i { display: none; }

.tk-editor .potok-select-control {
  --potok-select-height: 38px;
  --potok-select-radius: 7px;
  --potok-select-font-size: 11.5px;
}

.task-card-workspace .potok-select-control {
  --potok-select-height: 38px;
  --potok-select-radius: 7px;
  --potok-select-font-size: 11.5px;
}

.admin-dialog .potok-select-control { --potok-select-height: 48px; --potok-select-font-size: 14px; }
.admin-role-filter .potok-select-control { width: 148px; --potok-select-height: 40px; }
#newRoleSpaces .potok-select-control { --potok-select-height: 40px; }
.status-select + .potok-select-control,
.task-card .potok-select-control { --potok-select-height: 27px; --potok-select-font-size: 9px; }
.participant-select-label .potok-select-control { min-width: 118px; max-width: 170px; --potok-select-height: 28px; --potok-select-font-size: 9px; }
.document-dialog .potok-select-control { --potok-select-height: 36px; --potok-select-font-size: 10px; }
.documents-catalog-controls .potok-select-control { min-width: 150px; --potok-select-height: 40px; }

/* The editor already has a specialist select shell for live typography.
   Its selected and hover states follow the same Potok menu language. */
.document-select-menu button:hover,
.document-select-menu button:focus-visible { color: #154ea7 !important; background: #edf4ff !important; }
.document-select-menu button[aria-selected="true"] { color: #174f9f !important; background: #e9f1ff !important; }

@media (max-width: 820px) {
  .tk-editor .potok-select-control,
  .task-card-workspace .potok-select-control { --potok-select-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .potok-select-trigger,
  .potok-select-trigger > i,
  .potok-select-menu,
  .potok-select-menu button { transition-duration: .01ms !important; }
}
