.platform-switch {
  box-sizing: border-box;
  display: inline-flex;
  align-items: stretch;
  flex: 0 0 auto;
  gap: 8px;
  width: max-content;
  min-width: max-content;
  height: 28px;
  min-height: 28px;
  padding: 0;
  position: relative;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.075);
  line-height: 1rem;
}

.platform-switch__indicator {
  position: absolute;
  z-index: 0;
  top: -1px;
  left: 0;
  height: 30px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  pointer-events: none;
  transform: translateX(0);
  transition:
    width 180ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 120ms ease;
}

.platform-switch.is-full-width {
  width: 100%;
  min-width: 0;
}

.platform-switch.is-full-width .platform-switch__option {
  min-width: 0;
  flex: 1 1 0;
}

.platform-switch__option {
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 30px;
  min-height: 30px;
  margin-top: -1px;
  padding: 4px 12px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1rem;
  white-space: nowrap;
  cursor: pointer;
}

.platform-switch__option.is-active {
  background: transparent;
  color: #fff;
}

.platform-switch__option:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.72);
  outline-offset: -1px;
}

.platform-switch__option:disabled,
.platform-switch.is-disabled .platform-switch__option {
  cursor: default;
  opacity: 0.45;
}

@media (prefers-reduced-motion: reduce) {
  .platform-switch__indicator {
    transition-duration: 1ms;
  }
}
