/* Base styles for the generated custom select control. */
:where(.cselect[data-cselect-enhanced="true"]) {
  position: relative;
  width: 100%;
}

:where(.cselect[data-cselect-enhanced="true"]) .cselect__btn{
  width: 100%;
  padding: 10px 12px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;

  border: 1px solid lab(0% 0 0 / 0.2);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

:where(.cselect[data-cselect-enhanced="true"]) .cselect__btn:disabled {
  cursor: not-allowed;
}

:where(.cselect[data-cselect-enhanced="true"]) .cselect__btn.is-placeholder .cselect__label {
  color: var(--color-gray-500);
}

:where(.cselect[data-cselect-enhanced="true"]) .cselect__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:where(.cselect[data-cselect-enhanced="true"]) .cselect__arrow {
  flex: 0 0 auto;
}

:where(.cselect[data-cselect-enhanced="true"]) .cselect__arrow svg{
  width: 16px;
  height: 16px;
}

:where(.cselect[data-cselect-enhanced="true"]) .cselect__menu{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  margin-top: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid lab(0% 0 0 / 0.2);
  border-radius: 12px;
  background: #fff;
  gap: 1px;
  max-height: 260px;
  overflow: auto;
  display: none;
  z-index: 2;
}

:where(.cselect[data-cselect-enhanced="true"]).is-open .cselect__menu{
  display: flex;
  flex-direction: column;
}

:where(.cselect[data-cselect-enhanced="true"]) .cselect__opt{
  padding: 10px 10px;
  border-radius: 10px;
  cursor: pointer;
}

:where(.cselect[data-cselect-enhanced="true"]) .cselect__opt:hover{
  background: var(--accent-2);
}

:where(.cselect[data-cselect-enhanced="true"]) .cselect__opt.is-active{
  background: var(--accent-2);
}

:where(.cselect[data-cselect-enhanced="true"]) .cselect__opt[aria-selected="true"]{
  background: rgba(59,130,246,.15);
}

:where(.cselect[data-cselect-enhanced="true"]).is-multiple .cselect__opt[aria-selected="true"]{
  font-weight: 600;
}

:where(.cselect[data-cselect-enhanced="true"]) .cselect__opt[aria-disabled="true"]{
  opacity: .5;
  cursor: not-allowed;
}

:where(.cselect[data-cselect-enhanced="true"]) .cselect__opt[aria-disabled="true"]:hover{
  background: transparent;
}
