/* Accessible Dropdown CSS | START */
.dropdown-with-accessibility {
  --selected-dd-item-shadow: inset 0px 0px 0px 2px rgba(255, 255, 255, 1);
  position: relative;

  .dropdown-button {
    font-weight: 700;
    line-height: 1.25rem;
    padding: 0.625rem 0;
    background: none;
    width: 100%;
    text-align: left;
    border: none;
    border-bottom: 1px solid var(--bars-unselected);
    position: relative;
    font-size: 1rem;
    cursor: pointer;

    &:before {
      content: "";
      height: 1.5rem;
      width: 1.5rem;
      position: absolute;
      right: 0;
      top: 0.438rem;
      background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M12.0005 12.9462L16.6005 8.34619L17.6543 9.39994L12.0005 15.0537L6.3468 9.39994L7.40055 8.34619L12.0005 12.9462Z" fill="black"/></svg>');
    }
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid var(--bars-unselected);
    background-color: var(--tertiary-white);
    max-height: 200px;
    overflow-y: auto;
    z-index: 9;
    margin: 0;
    padding: 0;
    list-style: none;
    &.active {
      display: block;
    }

    li {
      padding: 12px;
      cursor: pointer;
      position: relative;
      padding-left: 2rem;
      font-size: 0.875rem;
      line-height: 1.25rem;

      &:before {
        content: "";
        position: absolute;
        left: 8px;
        top: calc(50% - 1px);
        transform: translateY(-50%);
        border: 1px solid var(--dark-color, #ccc);
        height: 1rem;
        width: 1rem;
        box-shadow: var(--selected-dd-item-shadow);
      }
    }

    li[data-selected="true"] {
      color: var(--primary-blue-700);
      font-weight: 600;
      &:before {
        background-color: var(--primary-blue-700);
      }
    }
  }
}

.form-dropdown:has(.dropdown-with-accessibility) {
  .validation-text {
    display: none;
    font-family: var(--body-font-arena);
    color: var(--primary-red);
    font-style: normal;
    font-weight: 300;
    font-size: .625rem;
    line-height: normal;
  }
}

.dropdown-with-accessibility:has(.dropdown-menu.active) .dropdown-button:before {
  transform: rotate(180deg);
}
/* Accessible Dropdown CSS | END */