
:root {
  --primary: #92E3CA;
}

.combo *,
.combo *::before,
.combo *::after {
  box-sizing: border-box;
}

.combo {
  display: block;
  position: relative;
}

/* chevron */
.combo::after {
  border-bottom: 2px solid #757575;
  border-right: 2px solid #757575;
  content: "";
  display: block;
  height: 10px;
  pointer-events: none;
  position: absolute;
  right: 18px;
  top: 32px;
  transform: translate(0, -65%) rotate(45deg);
  width: 10px;
}

.combo-input {
  background-color: white;
  border: 1px solid #EDF0EC;
  border-radius: 0.125rem;
  display: block;
  font-size: 1.125rem;
  height: 62px;
  padding: 12px 16px 14px;
  text-align: left;
  width: 100%;
  padding: 1.5rem 0.75rem 0.5rem;
}

.combo-input:focus {
  border-color: var(--primary) !important;
  outline: 4px solid var(--primary);
  outline-offset: 2px;
}

.combo-label {
  display: block;
  position: absolute;
  top: 16px;
  left: 16px;
  color: #757575;
  font-size: 1rem;
  font-weight: 300;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
}

.combo-input:focus ~ .combo-label,
.combo-input:not(:empty) ~ .combo-label {
  left: 0.75rem;
  top: 0.5rem;
  font-size: 0.75em;
}

.combo-input:focus ~ .combo-label {
  color: var(--primary) !important;
}

form.submitted .combo-input:empty {
  border: 1px solid #E0423A;
}

form.submitted .combo-input:empty ~ .combo-label {
  color: #E0423A;
}

.combo-menu {
  background-color: white;
  border: 1px solid #EDF0EC;
  border-radius: 4px;
  display: none;
  max-height: 300px;
  overflow-y: scroll;
  left: 0;
  position: absolute;
  top: calc(100% + 6px);
  width: 100%;
  z-index: 100;
}

.open .combo-menu {
  display: block;
}

.combo-option {
  padding: 10px 12px 12px;
}

.combo-option:hover {
  background-color: #EDF0EC40;
}

.combo-option.option-current {
  background-color: #EDF0EC40;
}

.combo-option[aria-selected="true"] {
  padding-right: 30px;
  position: relative;
}

/* checkmark */
.combo-option[aria-selected="true"]::after {
  border-bottom: 2px solid #757575;
  border-right: 2px solid #757575;
  content: "";
  height: 16px;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translate(0, -50%) rotate(45deg);
  width: 8px;
}
