/* Dropdown Web Component Styles */

dropdown-select {
  display: inline-block;
}

.dropdown-container {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dropdown-label {
  color: var(--content-primary);
  margin: 0;
}

.dropdown-wrapper {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.dropdown-trigger {
  background: var(--background-secondary);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px 3px 6px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  outline: none;
  user-select: none;
}

.dropdown-trigger:focus-visible {
  box-shadow: 0 0 0 2px var(--border-tertiary);
}

.dropdown-value {
  color: var(--content-primary);
  padding-top: 1px;
}

.dropdown-icon {
  display: inline-block;
  flex-shrink: 0;
  color: var(--content-primary);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-wrapper.open .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 100;
  border-radius: 4px;
  background: var(--background-tertiary);
  display: none;
  padding: 2px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dropdown-wrapper.open .dropdown-menu {
  display: flex;
}

.dropdown-item {
  display: flex;
  padding: 2px 4px;
  align-items: flex-start;
  align-self: stretch;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.dropdown-item:hover {
  background: color-mix(in srgb, var(--content-primary) 5%, transparent);
}

.dropdown-item.selected {
  background: var(--background-secondary);
}

.dropdown-item-label {
  color: var(--content-primary);
}
