/* -------------------------------- 

File#: _2_multiple-custom-select
Title: Multiple Custom Select
Descr: Custom Select Input where multiple options can be selected
Usage: codyhouse.co/license

-------------------------------- */
.multi-select *, .multi-select *::after, .multi-select *::before {
  box-sizing: border-box;
}

ul {    padding-inline-start: 0;
    margin-block-start: 0;
    margin-block-end: 0;
    margin-inline-start: 0;
    margin-inline-end: 0;}

ol, ul, menu {
  list-style: none;
}

button, input, textarea, select {
  background-color: transparent;
  border-radius: 0;
  color: inherit;
  line-height: inherit;
  appearance: none;
}

textarea {
  resize: vertical;
  overflow: auto;
  vertical-align: top;
}


.customcheck {position: relative;}

/* variables */
:root {
  /* colors */
  --ma1-color-primary-hsl: 250, 84%, 54%;
  --ma1-color-bg-hsl: 0, 0%, 100%;
  --ma1-color-contrast-high-hsl: 230, 7%, 23%;
  --ma1-color-contrast-higher-hsl: 230, 13%, 9%;
  --ma1-color-contrast-lower-hsl: 240, 4%, 85%;
  --ma1-color-contrast-medium-hsl: 225, 4%, 47%;
  --ma1-color-bg-light-hsl: 0, 0%, 100%;
  --ma1-color-bg-dark-hsl: 240, 4%, 95%;
  --ma1-color-bg-lighter-hsl: 0, 0%, 100%;
  --ma1-color-white-hsl: 0, 0%, 100%;
  --ma1-color-black-hsl: 230, 13%, 9%;

  /* spacing */
  --ma1-space-3xs: 6px;
  --ma1-space-2xs: 4px;
  --ma1-space-sm: 8px;

  /* typography */
  --ma1-text-sm: 13px;
}

@media(min-width: 64rem){
  :root {
      /* spacing */
  --ma1-space-3xs: 6px;
  --ma1-space-2xs: 4px;
  --ma1-space-sm: 8px;

  /* typography */
  --ma1-text-sm: 13px;
  }
}

/* buttons */
.ma1-btn {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  white-space: nowrap;
  text-decoration: none;
  background: hsl(var(--ma1-color-bg-dark-hsl));
  color: hsl(var(--ma1-color-contrast-higher-hsl));
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: all 0.2s ease;
  will-change: transform;
  padding: var(--ma1-space-2xs) var(--ma1-space-sm);
  border-radius: var(--border-radius);
      border: 1px solid #c3c3c3;

    padding: 6px 8px;
	margin-bottom: 8px;
}

.ma1-btn:focus-visible {
  box-shadow: 0px 0px 0px 2px hsl(var(--ma1-color-bg-hsl)), 0px 0px 0px 4px hsla(var(--ma1-color-contrast-higher-hsl), 0.15);
  outline: none;
}

.ma1-btn:active {
  transform: translateY(2px);
}

.ma1-btn--subtle {
  background: hsl(var(--ma1-color-bg-lighter-hsl));
  color: hsl(var(--ma1-color-contrast-higher-hsl));
  box-shadow: unset;
}

.ma1-btn--subtle:hover {
  background: hsl(var(--ma1-color-bg-light-hsl));
  box-shadow: inset 0px 1px 0px hsla(var(--ma1-color-white-hsl), 0.1), 0px 0px 0px 1px hsla(var(--ma1-color-black-hsl), 0.02), 0px 1px 3px -1px hsla(var(--ma1-color-black-hsl), 0.2), 0 0.1px 0.3px rgba(0, 0, 0, 0.06),0 1px 2px rgba(0, 0, 0, 0.12);
}

.ma1-btn--subtle:focus {
  box-shadow: inset 0px 1px 0px hsla(var(--ma1-color-white-hsl), 0.1), 0px 0px 0px 1px hsla(var(--ma1-color-black-hsl), 0.02), 0px 1px 3px -1px hsla(var(--ma1-color-black-hsl), 0.2), 0 0.1px 0.3px rgba(0, 0, 0, 0.06),0 1px 2px rgba(0, 0, 0, 0.12), 0px 0px 0px 2px hsl(var(--ma1-color-bg-hsl)), 0px 0px 0px 4px hsl(var(--ma1-color-contrast-high-hsl));
}

/* form elements */
.ma1-form-label {
  display: inline-block;
  font-size: var(--ma1-text-sm);
}

/* icons */
.ma1-icon {
  height: var(--ma1-size, 1em);
  width: var(--ma1-size, 1em);
  display: inline-block;
  color: inherit;
  fill: currentColor;
  line-height: 1;
  flex-shrink: 0;
  max-width: initial;
}

.ma1-icon--2xs {
  --ma1-size: 12px;
}

/* component */
:root {
  --multi-select-dropdown-gap: 4px;
}

.multi-select {
  position: relative;
}

.multi-select__button {
  width: 100%;
}

.multi-select__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.multi-select__dropdown {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 200px;
  max-height: 1px;
  background-color: hsl(var(--ma1-color-bg-light-hsl));
  box-shadow: inset 0 0 0.5px 1px hsla(0, 0%, 100%, 0.075), 0 0.3px 0.4px rgba(0, 0, 0, 0.025),0 0.9px 1.5px rgba(0, 0, 0, 0.05), 0 3.5px 6px rgba(0, 0, 0, 0.1);
  padding: var(--ma1-space-3xs) 0;
  border-radius: 0.25em;
  z-index: 5;
  margin-top: var(--multi-select-dropdown-gap);
  margin-bottom: var(--multi-select-dropdown-gap);
  overflow: auto;
  font-size: 1rem;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s 0.2s, opacity 0.2s;
}

.multi-select__dropdown--right {
  right: 0;
  left: auto;
}

.multi-select__dropdown--up {
  bottom: 100%;
  top: auto;
}

.multi-select__button[aria-expanded=true] + .multi-select__dropdown {
  visibility: visible;
  opacity: 1;
  transition: visibility 0s, opacity 0.2s;
}

.multi-select__list:not(:first-of-type) {
  padding-top: var(--ma1-space-3xs);
}

.multi-select__list:not(:last-of-type) {
  border-bottom: 1px solid hsl(var(--ma1-color-contrast-lower-hsl));
  padding-bottom: var(--ma1-space-3xs);
}

.multi-select__item {
  position: relative;
  display: block;
  padding: var(--ma1-space-3xs) var(--ma1-space-sm);
  color: hsl(var(--ma1-color-contrast-high-hsl));
  width: 100%;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.multi-select__item--optgroup {
  font-size: 16px;
  color: hsl(var(--ma1-color-contrast-medium-hsl));
}

.checkbox + .multi-select__item--option {
  --checkbox-radio-gap: var(--ma1-space-2xs);
  display: block;
  cursor: pointer;
  transition: 0.2s;
  padding-left: calc(var(--checkbox-radio-size) + var(--checkbox-radio-gap) + var(--ma1-space-sm));
}
.checkbox + .multi-select__item--option:hover {
  background-color: hsla(var(--ma1-color-contrast-higher-hsl), 0.075);
}
.checkbox + .multi-select__item--option span {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.multi-select__term + .multi-select__details::before {
  content: ": ";
}

/* utility classes */
.ma1-sr-only {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.ma1-margin-left-2xs {
  margin-left: var(--ma1-space-2xs);
}

.ma1-justify-between {
  justify-content: space-between;
}

.ma1-inline-block {
  display: inline-block;
}

.ma1-margin-bottom-3xs {
  margin-bottom: var(--ma1-space-3xs);
}

.ma1-items-start {
  align-items: flex-start;
}

.ma1-flex-column {
  flex-direction: column;
}

.ma1-flex {
  display: flex;
}

.ma1-margin-bottom-2xs {
  margin-bottom: var(--ma1-space-2xs);
}

.ma1-hide {
  display: none !important;
}