:root {
  --select-ink: #45394f;
  --select-violet: #67458d;
  --select-border: #d5cddc;
  --select-focus: #79549d;
}

/* Keep the original form control available to validation and programmatic focus. */
select.hs-native {
  position: absolute !important;
  inset: auto !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none;
}

.hs-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 43px;
  padding: 7px 10px 7px 13px;
  border: 1px solid var(--select-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 15%, #fcfbfd 100%);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgb(53 38 64 / 4%);
  color: var(--select-ink);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 540;
  line-height: 1.4;
  text-align: start;
  vertical-align: middle;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.hs-value {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hs-chevron,
.hs-icon,
.hs-check {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.hs-icon {
  color: #82708e;
}
.hs-icon > svg {
  display: block;
  width: 16px;
  height: 16px;
}

.hs-chevron {
  width: 21px;
  height: 21px;
  margin-inline-start: auto;
  border-radius: 7px;
  background: #f3eff6;
  color: #756480;
}
.hs-chevron::before {
  content: "";
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-1.5px) rotate(45deg);
  transition: transform 140ms ease;
}
.hs-trigger[aria-expanded="true"] {
  border-color: #a78abe;
  box-shadow: inset 0 1px 0 #fff, 0 0 0 2px rgb(135 100 165 / 11%);
  color: var(--select-violet);
}
.hs-trigger[aria-expanded="true"] .hs-chevron {
  background: #ece3f4;
  color: var(--select-violet);
}
.hs-trigger[aria-expanded="true"] .hs-chevron::before {
  transform: translateY(1.5px) rotate(-135deg);
}
.hs-trigger:focus-visible,
.hs-native:focus-visible + .hs-trigger {
  outline: 2px solid var(--select-focus);
  outline-offset: 2px;
}
.hs-trigger:disabled {
  border-color: #e5e0e9;
  background: #f7f5f8;
  box-shadow: none;
  color: #837a8b;
  cursor: not-allowed;
  opacity: 1;
}
.hs-trigger:disabled .hs-chevron {
  background: transparent;
  color: #a199a8;
}

.form-stack label > .hs-trigger[data-variant="field"] {
  margin-top: 5px;
}
:is(#account-dialog, #account-content) .form-stack label.form-stack > .hs-trigger,
.form-stack label.field > .hs-trigger {
  margin-top: 0;
}

.hs-trigger:is([data-variant="toolbar"], [data-variant="code"], [data-variant="filter"]),
.gm-mute .hs-trigger {
  width: auto;
  font-size: 0.82rem;
  white-space: nowrap;
}
.hs-trigger:is([data-variant="toolbar"], [data-variant="code"]) {
  gap: 5px;
  min-height: 32px;
  padding: 3px 7px 3px 9px;
  border-radius: 8px;
}
.hs-trigger[data-variant="toolbar"] {
  min-width: 5.55em;
  min-height: 34px;
}
.hs-trigger:is([data-variant="toolbar"], [data-variant="code"]) .hs-chevron,
.gm-mute .hs-chevron {
  width: 14px;
  height: 17px;
  background: transparent;
}
.hs-trigger[data-variant="code"] {
  max-width: min(100%, 13em);
}
.re-code-bar > label.re-code-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.hs-trigger[data-variant="filter"] {
  gap: 7px;
  min-height: 40px;
  padding: 5px 12px;
  border-radius: 999px;
}
.hs-trigger[data-variant="filter"] .hs-chevron {
  width: 13px;
  height: 19px;
  background: transparent;
}
.gm-mute .hs-trigger[data-variant="field"] {
  min-height: 36px;
  margin: 0;
  padding: 4px 7px 4px 10px;
  border-radius: 9px;
}

.hs-menu {
  position: fixed;
  z-index: 100;
  width: max-content;
  max-width: calc(100vw - 16px);
  max-height: 19rem;
  margin: 0;
  padding: 5px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-color: #c9bdd4 transparent;
  scrollbar-width: thin;
  list-style: none;
  border: 1px solid #ddd3e4;
  border-radius: 15px;
  background: #fff;
  box-shadow:
    0 15px 36px -12px rgb(47 31 62 / 22%),
    0 3px 9px -3px rgb(64 47 77 / 11%);
  color: var(--select-ink);
  font-family: "DM Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.45;
}
.hs-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  margin: 0;
  padding: 7px 9px 7px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.hs-option + .hs-option {
  margin-block-start: 1px;
}
.hs-option-label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.hs-check {
  width: 17px;
  height: 17px;
  margin-inline-start: auto;
  border-radius: 50%;
  background: var(--select-violet);
  color: #fff;
  visibility: hidden;
}
.hs-check::before {
  content: "";
  width: 5px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-1px) rotate(42deg);
}
.hs-option[data-active="true"] {
  background: #f5f2f7;
  box-shadow: inset 0 0 0 1px #e6dfeb;
}
.hs-option[aria-selected="true"] {
  background: #f1eaf8;
  color: #5e3c82;
  font-weight: 620;
}
.hs-option[aria-selected="true"] .hs-icon {
  color: #75538c;
}
.hs-option[aria-selected="true"] .hs-check {
  visibility: visible;
}
.hs-option[aria-selected="true"][data-active="true"] {
  box-shadow: inset 0 0 0 1px #d2bfdf;
}
.hs-option[aria-disabled="true"] {
  color: #8e8594;
  cursor: not-allowed;
}
.hs-group {
  padding: 8px 11px 4px;
  color: #75677f;
  font-size: 0.75rem;
  font-weight: 650;
}
.hs-menu .hs-error {
  margin: 1px 2px 5px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #faf0f3;
  color: #823b59;
  font-size: 0.78rem;
  line-height: 1.4;
}

@media (hover: hover) {
  .hs-trigger:hover:not(:disabled):not([aria-expanded="true"]) {
    border-color: #b5a4c4;
    color: #533d68;
    box-shadow: inset 0 1px 0 #fff, 0 2px 5px rgb(62 41 81 / 6%);
  }
  .hs-option:hover:not([aria-disabled="true"]):not([aria-selected="true"]) {
    background: #f5f2f7;
  }
}
@media (max-width: 650px), (pointer: coarse) {
  .hs-trigger[data-variant="field"],
  .hs-trigger[data-variant="filter"],
  .hs-option {
    min-height: 44px;
  }
  .hs-trigger[data-variant="toolbar"],
  .hs-trigger[data-variant="code"] {
    min-height: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hs-trigger,
  .hs-chevron::before {
    transition: none;
  }
}
@media (forced-colors: active) {
  .hs-menu,
  .hs-trigger {
    border-color: ButtonText;
  }
  .hs-option[data-active="true"] {
    outline: 1px dashed Highlight;
    outline-offset: -2px;
  }
  .hs-option[aria-selected="true"] .hs-check {
    color: Highlight;
  }
  .hs-trigger:disabled,
  .hs-option[aria-disabled="true"] {
    color: GrayText;
  }
}
