@import "./theme.css";

.react-aria-RadioGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-color);

  [slot=description] {
    font-size: 12px;
  }

  &[data-orientation=horizontal] {
    flex-direction: row;
    align-items: center;
  }
}

.react-aria-Radio {
  display: flex;
  /* This is needed so the HiddenInput is positioned correctly */
  position: relative;
  align-items: center;
  gap: 0.499625rem;
  font-size: 1.000125rem;
  color: var(--text-color);
  forced-color-adjust: none;

  &:before {
    content: '';
    display: block;
    width: 1.12525rem;
    height: 1.12525rem;
    box-sizing: border-box;
    border: 0.125125rem solid var(--border-color);
    background: var(--field-background);
    border-radius: 1.12525rem;
    transition: all 200ms;
  }

  &[data-pressed]:before {
    border-color: var(--border-color-pressed);
  }

  &[data-selected] {
    &:before {
      border-color: var(--highlight-background);
      border-width: 0.375375rem;
    }

    &[data-pressed]:before {
      border-color: var(--highlight-background-pressed);
    }
  }

  &[data-focus-visible]:before {
    outline: 2px solid var(--focus-ring-color);
    outline-offset: 2px;
  }

  &[data-invalid] {
    &:before {
      border-color: var(--invalid-color);
    }

    &[data-pressed]:before {
      border-color: var(--invalid-color-pressed);
    }
  }

  &[data-disabled] {
    color: var(--text-color-disabled);

    &:before {
      border-color: var(--border-color-disabled);
    }
  }
}
