@layer base {
  .group {
    display: grid;
    gap: var(--spacing-2);
  }

  .item {
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    background-color: transparent;
    cursor: pointer;
    margin: 0;
    padding: 0;
    transition: all var(--animation-duration-normal)
      cubic-bezier(0.16, 1, 0.3, 1);
    appearance: none;
    flex-shrink: 0;
  }

  .item:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 15%, transparent);
  }

  .item:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
    border-color: var(--primary);
  }

  .item[data-state="checked"] {
    border-color: var(--primary);
    transform: scale(1);
    animation: radioPulse var(--animation-duration-normal)
      cubic-bezier(0.16, 1, 0.3, 1);
  }

  .item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--muted);
  }

  .indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    padding: 0;
  }

  .indicatorInner {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: var(--radius-full);
    background-color: var(--primary);
    transform: scale(0);
    transition: transform var(--animation-duration-normal)
      cubic-bezier(0.16, 1, 0.3, 1);
  }

  .item[data-state="checked"] .indicatorInner {
    transform: scale(1);
    animation: dotAppear var(--animation-duration-normal)
      cubic-bezier(0.16, 1, 0.3, 1);
  }

  .item:disabled .indicatorInner {
    background-color: var(--muted);
  }

  @keyframes radioPulse {
    0% {
      transform: scale(0.95);
      box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 40%, transparent);
    }
    70% {
      transform: scale(1.02);
      box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 0%, transparent);
    }
    100% {
      transform: scale(1);
      box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 0%, transparent);
    }
  }

  @keyframes dotAppear {
    0% {
      transform: scale(0);
      opacity: 0;
    }
    50% {
      opacity: 1;
    }
    100% {
      transform: scale(1);
      opacity: 1;
    }
  }
}
