@use "global";
@use "variables";

.dark-mode {
  .tv-label {
    color: variables.$dark-text;
  }

  & span.tv-label-icon {
    fill: currentColor;
  }
}

.light-mode {
  .tv-label {
    color: variables.$light-text;
  }

  & span.tv-label-icon {
    fill: currentColor;
  }
}

.tv-label {
  align-items: center;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;
  font-size: 14px;
  font-weight: 500;
  justify-content: center;
  line-height: 1.5;
  padding: 0 10px;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;

  &.tv-label-sm {
    font-size: 12px;
    height: 24px;
    padding: 0 8px;

    & span.tv-label-icon {
      height: 12px;
      width: 12px;
    }
  }

  &.tv-label-md {
    font-size: 14px;
    height: 32px;
    padding: 0 12px;

    & span.tv-label-icon {
      height: 14px;
      width: 14px;
    }
  }

  &.tv-label-lg {
    font-size: 16px;
    height: 40px;
    padding: 0 16px;

    & span.tv-label-icon {
      height: 16px;
      width: 16px;
    }
  }

  &.tv-label--reverse {
    flex-direction: row-reverse;
  }

  &.tv-label--outline {
    border-radius: 50px;
  }

  &:hover {
    filter: brightness(0.92);
  }

  &:active {
    filter: brightness(0.85);
    transform: scale(0.97);
  }

  span.tv-label-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    &.tv-icon-position-right {
      margin-left: 6px;
    }

    &.tv-icon-position-left {
      margin-right: 6px;
    }
  }
}