.radio-group {
  display: grid;
  gap: calc(var(--spacing) * 3);
}

.radio-group-item {
  flex-shrink: 0;
  width: calc(var(--spacing) * 4);
  height: calc(var(--spacing) * 4);
  transition: color var(--default-transition-duration)
    var(--default-transition-timing-function);
  border: 1px solid var(--color-input);
  border-radius: var(--radius-rounded);
  outline: none;
  background-color: transparent;
  box-shadow: var(--shadow-xs);
  color: var(--color-primary);
  aspect-ratio: 1 / 1;

  /* Indicator */
  [data-slot="radio-group-indicator"] {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;

    svg {
      width: calc(var(--spacing) * 2);
      height: calc(var(--spacing) * 2);
      fill: currentcolor;
    }
  }

  /* Invalid */
  &[aria-invalid="true"] {
    border-color: var(--color-destructive);
    color: var(--color-destructive);
  }

  /* Focus */
  &:focus-visible {
    border-color: var(--color-ring);
    box-shadow: 0 0 0 3px
      color-mix(in oklab, var(--color-ring) 50%, transparent);

    &[aria-invalid="true"] {
      border-color: var(--color-destructive);
      box-shadow: 0 0 0 2px
        color-mix(in oklab, var(--color-destructive) 20%, transparent);
    }
  }

  /* Disabled */
  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
}
