.demo-select {
  position: relative;
  min-width: 0;
}

.demo-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 44px;
  padding: 9px 13px 9px 11px;
  border: 1px solid #704157;
  border-radius: 7px;
  background: var(--demo-control);
  color: var(--demo-text);
  font: 400 16px/1.35 var(--body-font);
  text-align: left;
  cursor: pointer;
  transition: background-color .18s, border-color .18s;
}

.demo-select-trigger > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-select-trigger::after {
  content: '';
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 1.5px solid #f2a6bd;
  border-bottom: 1.5px solid #f2a6bd;
  transform: rotate(45deg);
}

.demo-select-trigger[aria-expanded="true"]::after {
  margin-top: 3px;
  transform: rotate(225deg);
}

.demo-select-trigger:hover,
.demo-select-trigger[aria-expanded="true"] {
  border-color: #c36b89;
  background: #35202f;
}

.demo-select-trigger[aria-invalid="true"] {
  border-color: #f58ca4;
}

.demo-select-trigger:disabled {
  cursor: default;
  opacity: .6;
}

.demo-select-trigger:focus-visible {
  outline-offset: 2px;
}

.demo-select-options {
  position: absolute;
  z-index: 3;
  inset: calc(100% + 5px) 0 auto;
  max-height: min(16rem, var(--demo-select-space, 16rem));
  overflow: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 5px;
  border: 1px solid #97566f;
  border-radius: 9px;
  background: #281722;
  box-shadow: 0 12px 36px #080408bf;
  color: var(--demo-text);
  list-style: none;
}

.demo-select[data-opens-up] .demo-select-options {
  inset-block: auto calc(100% + 5px);
}

.demo-select-options [role="option"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 40px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  font: 400 14px/1.35 var(--body-font);
  overflow-wrap: anywhere;
  cursor: pointer;
}

.demo-select-options [aria-selected="true"] {
  color: #ffbdd1;
}

.demo-select-options [aria-selected="true"]::after {
  content: '';
  flex: 0 0 10px;
  width: 10px;
  height: 6px;
  margin-top: -3px;
  border-bottom: 2px solid #ff9bb9;
  border-left: 2px solid #ff9bb9;
  transform: rotate(-45deg);
}

.demo-select-options [data-active],
.demo-select-options [role="option"]:hover {
  border-color: #96506d;
  background: #4a273a;
  color: #fff6f8;
}

@media (pointer: coarse) {
  .demo-select-options [role="option"] {
    min-height: 44px;
  }
}
