@use './variables.scss';

#toolbar {
  position: absolute;
  top: 0px;
  left: 0px;
  backdrop-filter: blur(4px);
  height: auto;
  border-radius: 6px;
  padding: 2px;
  transition: 0.2s ease-in-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
}

.DropdownTrigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  position: relative;
  z-index: 2;

  &:hover {
    background-color: variables.$black-400;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

    .logo-image {
      filter: brightness(1.4) contrast(1.1);
      transform: scale(1.05);
    }

    .dropdown-arrow {
      opacity: 1;
      transform: translateY(-1px);
    }
  }

  &[data-state='open'] {
    background-color: variables.$black-400;

    .dropdown-arrow {
      transform: rotate(180deg);
    }
  }
}

.logo-image {
  height: 40px;
  width: 40px;
  transition: all 0.2s ease-in-out;
}

.dropdown-arrow {
  opacity: 0;
  transition: all 0.2s ease-in-out;
  color: variables.$lightgray-100;
}

.DropdownLabel {
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  color: variables.$lightgray-100;
  margin: 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.DropdownContent {
  min-width: 200px;
  background-color: variables.$bgalphadarker;
  border-radius: 8px;
  padding: 6px;
  box-shadow:
    0px 10px 38px -10px rgba(22, 23, 24, 0.35),
    0px 10px 20px -15px rgba(22, 23, 24, 0.2);
  animation-duration: 400ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
  z-index: 10;
  backdrop-filter: blur(8.5px);
  -webkit-backdrop-filter: blur(8.5px);
}

.DropdownSubContent {
  min-width: 250px;
  background-color: variables.$bgalphadarker;
  border-radius: 8px;
  padding: 6px;
  box-shadow:
    0px 10px 38px -10px rgba(22, 23, 24, 0.35),
    0px 10px 20px -15px rgba(22, 23, 24, 0.2);
  animation-duration: 400ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
  z-index: 15;
  backdrop-filter: blur(8.5px);
  -webkit-backdrop-filter: blur(8.5px);
  max-height: 80vh;
  overflow-y: auto;
}

.DropdownItem,
.DropdownCheckboxItem,
.DropdownSubTrigger {
  all: unset;
  font-size: 16px;
  line-height: 1.2;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  padding: 4px 12px;
  position: relative;
  user-select: none;
  cursor: pointer;
  margin: 1px 0;
  transition: background-color 0.15s ease-in-out;

  &[data-highlighted] {
    background-color: variables.$black-100;
    outline: none;
  }

  &[data-disabled] {
    color: variables.$lightgray-800;
    pointer-events: none;
  }
}

.DropdownCheckboxItem {
  padding-left: 36px;
}

.DropdownSubTrigger {
  &[data-state='open'] {
    background-color: variables.$black-100;
  }
}

.DropdownItemIndicator {
  position: absolute;
  left: 12px;
  width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.DropdownSeparator {
  height: 1px;
  background-color: variables.$lightgray;
  margin: 6px 4px;
}

.RightSlot {
  margin-left: auto;
  padding-left: 20px;
  color: variables.$lightgray-100;
}

[data-highlighted] > .RightSlot {
  color: variables.$white;
}

[data-disabled] > .RightSlot {
  color: variables.$lightgray-400;
}

.pro-badge {
  background-color: #774dee;
  padding: 0px 8px;
  border-radius: 8px;
  margin-left: 8px;
  font-size: 0.775rem;
  font-weight: normal;
  display: inline-block;
}
