.rds-radio {
  display: block;
  position: relative;
  /* use centralized tokens */

  &__group {
    gap: var(--rds-spacing-sm, 8px);
    display: flex;
  }

  &__label {
    font-weight: var(--rds-font-weight-medium, 500);
    margin-bottom: var(--rds-spacing-sm, 8px);
    display: block;
  }

  &__option {
    color: var(--rds-text-primary, var(--rds-color-text-primary));
    display: flex;
    align-items: center;
    
    .MuiFormControlLabel-label {
      font-size: var(--rds-font-size-body, 1rem);
      line-height: var(--rds-line-height-body, 1.5);
      color: var(--rds-text-secondary) !important;
    }

    &--icon {
      .MuiFormControlLabel-label {
        display: none;
      }
    }
    
    &--with-label {
      display: flex;
      align-items: center;
    }

    .MuiRadio-root {
      &:hover {
        background-color: transparent;
      }
    }

    &.Mui-disabled {
      color: var(--rds-text-disabled, var(--rds-color-text-disabled));
      
      .MuiFormControlLabel-label {
        color: var(--rds-text-disabled, var(--rds-color-text-disabled));
      }
    }
  }

  &__bottom-label {
    margin-top: var(--rds-spacing-xs, 4px);
    text-align: center;
    font-size: var(--rds-font-size-body, 1rem);
    line-height: var(--rds-line-height-body, 1.5);
    color: var(--rds-text-primary, var(--rds-color-text-primary));
    user-select: none;
    cursor: pointer;
    
    &--disabled {
      color: var(--rds-text-disabled, var(--rds-color-text-disabled)) !important;
      cursor: not-allowed;
    }
  }

  &__bottom-label-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    min-height: auto;

    .MuiRadio-root {
      margin: 0 !important;
      padding: var(--rds-spacing-xs, 4px) !important;
      display: flex;
      align-items: center;
      justify-content: center;

      &:hover {
        background-color: transparent;
      }
    }

    &--disabled {
      cursor: not-allowed;
      opacity: 0.6;
    }
  }

  &--icon {
    .MuiFormControlLabel-label {
      display: none;
    }
  }

  &--icon-with-label {
    .MuiFormControlLabel-root {
      display: flex;
      align-items: center;
    }
  }

  &--icon-with-bottom-label {
    .rds-radio__group {
      display: flex;
      flex-direction: row;
      gap: var(--rds-spacing-md, 16px);
      align-items: flex-start;
    }

    .rds-radio__bottom-label {
      margin-top: var(--rds-spacing-xs, 4px);
      text-align: center;
      font-size: var(--rds-font-size-sm, 0.875rem);
      color: var(--rds-text-primary, var(--rds-color-text-primary));
      user-select: none;
      cursor: pointer;
      display: block;
      width: 100%;
      line-height: 1.2;
    }
  }

  &--disabled {
    opacity: 0.6;
    pointer-events: none;

    .MuiRadio-root {
      color: var(--rds-text-disabled, var(--rds-color-text-disabled));
    }

    .MuiFormControlLabel-label {
      color: var(--rds-text-disabled, var(--rds-color-text-disabled));
    }
  }

  &--hover {
    .MuiRadio-root:hover {
      background-color: transparent;
    }
  }

  &:focus-visible {
    outline: var(--rds-focus-ring-width, 2px) solid var(--rds-color-primary, var(--rds-primary-main));
    outline-offset: var(--rds-focus-ring-offset, 2px);
  }

  &:disabled,
  &--disabled {
    opacity: 0.6;
    pointer-events: none;
  }

  .MuiFormLabel-root {
    color: var(--rds-text-secondary) !important;
  }

  .MuiButtonBase-root.MuiRadio-root.Mui-checked,
  .MuiRadio-root.Mui-checked {
    color: var(--rds-primary-main) !important;
  }

  .MuiRadio-root:hover {
    background-color: transparent;
  }

  .MuiRadio-root:active,
  .MuiRadio-root.Mui-focusVisible {
    background-color: transparent;
  }

  .MuiRadio-root .MuiTouchRipple-root {
    display: none;
  }

  .MuiFormControlLabel-root .MuiFormControlLabel-label.Mui-disabled {
    color: var(--rds-text-disabled) !important;
  }

}

[data-theme="dark"] .rds-radio {
  .MuiFormControlLabel-label {
    font-size: var(--rds-font-size-body, 1rem);
    line-height: var(--rds-line-height-body, 1.5);
    color: var(--rds-color-light) !important;
  }
   .MuiFormLabel-root {
    color: var(--rds-color-light) !important;
  }
  
  .MuiRadio-root.Mui-checked,
  .MuiButtonBase-root.MuiRadio-root.Mui-checked {
    color: var(--rds-primary-main) !important;
    
    svg {
      color: var(--rds-primary-main) !important;
      fill: var(--rds-primary-main) !important;
    }
  }
}
