/* Choices.js styled for DaisyUI theme */

.choices {
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
  font-size: 1rem;
}

.choices:focus {
  outline: 0;
}

.choices:last-child {
  margin-bottom: 0;
}

.choices.is-open {
  overflow: visible;
}

.choices.is-disabled .choices__inner,
.choices.is-disabled .choices__input {
  background-color: oklch(var(--b3, 0.9 0 0));
  cursor: not-allowed;
  user-select: none;
}

.choices.is-disabled .choices__item {
  cursor: not-allowed;
}

.choices [hidden] {
  display: none !important;
}

.choices[data-type*="select-one"] {
  cursor: pointer;
}

.choices[data-type*="select-one"] .choices__inner {
  padding-bottom: 0;
}

.choices[data-type*="select-one"] .choices__input {
  display: block;
  width: 100%;
  padding: 0.625rem;
  border-bottom: 1px solid oklch(var(--bc, 0.2 0 0) / 0.2);
  background-color: var(--color-base-200);
  margin: 0;
}

.choices[data-type*="select-one"] .choices__button {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='21' height='21' viewBox='0 0 21 21'%3e%3cpath fill='%23000' d='M2.592.044l18.364 18.364-2.548 2.548L.044 2.592zM0 18.364L18.364 0l2.548 2.548L2.548 20.912z'/%3e%3c/svg%3e");
  padding: 0;
  background-size: 8px;
  position: absolute;
  top: 50%;
  right: 0;
  margin-top: -10px;
  margin-right: 25px;
  height: 20px;
  width: 20px;
  border-radius: 10em;
  opacity: 0.25;
}

.choices[data-type*="select-one"] .choices__button:focus,
.choices[data-type*="select-one"] .choices__button:hover {
  opacity: 1;
}

.choices[data-type*="select-one"] .choices__button:focus {
  box-shadow: 0 0 0 2px oklch(var(--p, 0.6 0.2 250));
}

.choices[data-type*="select-one"]::after {
  content: "";
  height: 0;
  width: 0;
  border-style: solid;
  border-color: oklch(var(--bc, 0.3 0 0)) transparent transparent transparent;
  border-width: 5px;
  position: absolute;
  right: 11.5px;
  top: 50%;
  margin-top: -2.5px;
  pointer-events: none;
}

.choices[data-type*="select-one"].is-open::after {
  border-color: transparent transparent oklch(var(--bc, 0.3 0 0)) transparent;
  margin-top: -7.5px;
}

.choices[data-type*="select-multiple"] .choices__inner,
.choices[data-type*="text"] .choices__inner {
  cursor: text;
}

.choices__inner {
  display: inline-flex;
  align-items: center;
  vertical-align: top;
  width: 100%;
  background-color: var(--color-base-200);
  padding: 0 0.5rem;
  border: 1px solid oklch(var(--bc, 0.2 0 0) / 0.2);
  border-radius: var(--radius-field, 0.5rem);
  font-size: 0.875rem;
  height: 2rem;
  min-height: 2rem;
  overflow: hidden;
}

.is-focused .choices__inner,
.is-open .choices__inner {
  border-color: oklch(var(--p, 0.6 0.2 250));
  box-shadow: 0 0 0 1px oklch(var(--p, 0.6 0.2 250) / 0.2);
}

.is-open .choices__inner {
  border-radius: var(--radius-field, 0.5rem) var(--radius-field, 0.5rem) 0 0;
}

.is-flipped.is-open .choices__inner {
  border-radius: 0 0 var(--radius-field, 0.5rem) var(--radius-field, 0.5rem);
}

.choices__list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.choices__list--single {
  display: inline-block;
  padding: 0 1rem 0 0;
  width: 100%;
}

.choices__list--single .choices__item {
  width: 100%;
  color: oklch(var(--bc, 0.2 0 0));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.choices__list--multiple {
  display: inline;
}

.choices__list--multiple .choices__item {
  display: inline-block;
  vertical-align: middle;
  border-radius: var(--radius-selector, 1rem);
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  background-color: oklch(var(--p, 0.6 0.2 250));
  border: 1px solid oklch(var(--p, 0.6 0.2 250));
  color: oklch(var(--pc, 1 0 0));
  word-break: break-all;
  box-sizing: border-box;
}

.choices__list--multiple .choices__item.is-highlighted {
  background-color: oklch(var(--pf, 0.5 0.2 250));
  border-color: oklch(var(--pf, 0.5 0.2 250));
}

.is-disabled .choices__list--multiple .choices__item {
  background-color: oklch(var(--bc, 0.2 0 0) / 0.3);
  border-color: oklch(var(--bc, 0.2 0 0) / 0.3);
}

.choices__list--dropdown,
.choices__list[aria-expanded] {
  visibility: hidden;
  z-index: 50;
  position: absolute;
  width: 100%;
  background-color: var(--color-base-200);
  border: 1px solid oklch(var(--bc, 0.2 0 0) / 0.2);
  top: 100%;
  margin-top: -1px;
  border-bottom-left-radius: var(--radius-field, 0.5rem);
  border-bottom-right-radius: var(--radius-field, 0.5rem);
  overflow: hidden;
  word-break: break-all;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.is-active.choices__list--dropdown,
.is-active.choices__list[aria-expanded] {
  visibility: visible;
}

.is-open .choices__list--dropdown,
.is-open .choices__list[aria-expanded] {
  border-color: oklch(var(--p, 0.6 0.2 250));
}

.is-flipped .choices__list--dropdown,
.is-flipped .choices__list[aria-expanded] {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: -1px;
  border-radius: var(--radius-field, 0.5rem) var(--radius-field, 0.5rem) 0 0;
}

.choices__list--dropdown .choices__list,
.choices__list[aria-expanded] .choices__list {
  position: relative;
  max-height: 300px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  will-change: scroll-position;
}

.choices__list--dropdown .choices__item,
.choices__list[aria-expanded] .choices__item {
  position: relative;
  padding: 0.625rem;
  font-size: 0.875rem;
  color: oklch(var(--bc, 0.2 0 0));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
  background-color: oklch(var(--p, 0.6 0.2 250) / 0.1);
}

.choices__item {
  cursor: default;
}

.choices__item--selectable {
  cursor: pointer;
}

.choices__item--disabled {
  cursor: not-allowed;
  user-select: none;
  opacity: 0.5;
}

.choices__heading {
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.625rem;
  border-bottom: 1px solid oklch(var(--bc, 0.2 0 0) / 0.1);
  color: oklch(var(--bc, 0.2 0 0) / 0.6);
}

.choices__button {
  text-indent: -9999px;
  appearance: none;
  border: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
}

.choices__button:focus,
.choices__input:focus {
  outline: 0;
}

.choices__input {
  display: inline-block;
  vertical-align: baseline;
  background-color: var(--color-base-200);
  font-size: 0.875rem;
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  max-width: 100%;
  padding: 0.25rem 0 0.25rem 0.125rem;
  color: oklch(var(--bc, 0.2 0 0));
}

.choices__input::placeholder {
  color: oklch(var(--bc, 0.2 0 0) / 0.5);
}

.choices__placeholder {
  opacity: 0.5;
}
