@import './ToggleButton.css';
@import "./theme.css";

.react-aria-TagGroup {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: small;
  color: var(--text-color);
}

.react-aria-TagList {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.react-aria-Tag {
  color: var(--text-color);
  border: 1px solid var(--border-color);
  forced-color-adjust: none;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.812875rem;
  outline: none;
  cursor: default;
  display: flex;
  align-items: center;
  transition: border-color 200ms;

  &[data-hovered] {
    border-color: var(--border-color-hover);
  }

  &[data-focus-visible] {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
  }

  &[data-selected] {
    border-color: var(--highlight-background);
    background: var(--highlight-background);
    color: var(--highlight-foreground);
  }

  [slot=remove] {
    background: none;
    border: none;
    padding: 0;
    margin-left: 2px;
    color: var(--text-color-base);
    transition: color 200ms;
    outline: none;
    font-size: 0.95em;
    border-radius: 100%;
    aspect-ratio: 1/1;
    height: 100%;

    &[data-hovered] {
      color: var(--text-color-hover);
    }

    &[data-focus-visible] {
      outline: 2px solid var(--focus-ring-color);
      outline-offset: -1px;
    }
  }

  &[data-selected] {
    [slot=remove] {
      color: inherit;
    }
  }
}

.react-aria-Tag[data-href] {
  text-decoration: none;
  cursor: pointer;
}

.react-aria-TagList {
  .react-aria-Tag {
    &[data-disabled] {
      border-color: var(--border-color-disabled);
      color: var(--text-color-disabled);
    }
  }
}

.react-aria-TagGroup {
  [slot=description] {
    font-size: 12px;
  }

  [slot=errorMessage] {
    font-size: 12px;
    color: var(--invalid-color);
  }
}
