.Tab {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;

  width: auto;
  margin: 0;
  padding: 0.625rem 1.125rem;
  border: none;
  border-top-left-radius: var(--border-radius-messages-small);
  border-top-right-radius: var(--border-radius-messages-small);

  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);

  appearance: none;
  background: none;

  &,
  &:active,
  &:focus {
    outline: none;
  }

  &--interactive {
    cursor: var(--custom-cursor, pointer);

    @media (hover: hover) {
      &:not(&--active):hover {
        background: var(--color-interactive-element-hover);
      }
    }

    @media (max-width: 600px) {
      &:not(&--active):active {
        background: var(--color-interactive-element-hover);
      }
    }
  }

  &--active {
    cursor: var(--custom-cursor, default);
    color: var(--color-primary);

    .platform {
      opacity: 1 !important;
    }
  }

  .Tab_inner {
    position: relative;

    display: flex;
    gap: 1px; // Prevent custom emoji sticking to the text
    align-items: center;

    height: 1.5rem; // Emoji-only titles ignore line-height on Windows

    white-space: nowrap;
  }

  .badge {
    flex-shrink: 0;

    min-width: 1.25rem;
    height: 1.25rem;
    margin-inline-start: 0.3125rem;
    padding: 0 0.3125rem;
    border-radius: 0.75rem;

    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.3125rem;
    color: white;
    text-align: center;

    background: var(--color-gray);

    body.is-ios &,
    body.is-macos & {
      line-height: 1.25rem;
    }
  }

  &__badge--active {
    background: var(--color-primary) !important;
  }

  .blocked {
    position: absolute;
    bottom: -0.625rem;
    left: 50%;
    transform: translateX(-50%);

    font-size: 0.75rem;
  }

  .platform {
    pointer-events: none;

    position: absolute;
    right: -0.5rem;
    bottom: -0.625rem;
    left: -0.5rem;
    transform-origin: left;

    box-sizing: content-box;
    height: 0.1875rem;
    border-radius: 0.1875rem 0.1875rem 0 0;

    opacity: 0;
    background-color: var(--color-primary);

    &.animate {
      transition: transform var(--slide-transition);

      body.no-page-transitions & {
        transition: none !important;
      }
    }
  }
}

.Tab-context-menu {
  position: absolute;
}
