:host {
  --sizing-check-size: 6px;
  --sizing-input-size: var(--pine-dimension-sm);
  --sizing-margin-block-start: 6px;
  align-items: center;
  display: flex;
  flex-flow: row wrap;
  position: relative;
}

:host(.is-invalid) .pds-radio__message--error {
  color: var(--pine-color-text-message-danger);
}

:host(.has-border) {
  align-items: flex-start;
  border: var(--pine-border);
  border-radius: var(--pine-dimension-125);
  column-gap: var(--pine-dimension-xs);
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: var(--pine-dimension-md);
}
@media (max-width: 767px) {
  :host(.has-border) {
    box-sizing: border-box;
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
  }
}
:host(.has-border):hover {
  border: var(--pine-border-hover);
}
:host(.has-border):has(input:checked) {
  box-shadow: 0 0 0 2px var(--pine-color-primary-hover);
}
:host(.has-border) label {
  color: var(--pine-color-text);
  font-weight: var(--pine-font-weight-semi-bold);
}
:host(.has-border) label::after {
  content: "";
  cursor: pointer;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 1;
}
:host(.has-border):has(input:disabled) {
  background: var(--pine-color-background-container-disabled);
  border-color: var(--pine-color-border-disabled);
  cursor: not-allowed;
}
:host(.has-border):has(input:disabled) label {
  color: var(--pine-color-text-label-disabled);
  cursor: not-allowed;
}
:host(.has-border).is-invalid .pds-radio__message--error {
  color: var(--pine-color-text-message-danger);
}

input {
  appearance: none;
  background: var(--pine-color-background-container);
  border: var(--pine-border);
  border-radius: var(--pine-border-radius-full);
  flex: none;
  height: var(--sizing-input-size);
  margin: 0;
  margin-block-start: var(--pine-dimension-025);
  position: relative;
  width: var(--sizing-input-size);
  /* stylelint-disable-next-line selector-no-qualifying-type */
}
input.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: polygon(0 0, 0 0, 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
input:hover {
  background: var(--pine-color-background-container-hover);
  border: var(--pine-border-hover);
}
input:checked {
  background: var(--pine-color-accent);
  border-color: var(--pine-color-accent);
}
input:checked:hover {
  background: var(--pine-color-accent-hover);
  border-color: var(--pine-color-accent-hover);
}
input:checked::after {
  /* stylelint-disable-next-line pine-design-system/prefer-semantic-tokens */
  background: var(--pine-color-white);
  border-radius: var(--pine-border-radius-full);
  content: "";
  display: block;
  height: var(--sizing-check-size);
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: var(--sizing-check-size);
}
input:disabled {
  background: var(--pine-color-background-container-disabled);
  border-color: var(--pine-color-border-disabled);
  cursor: not-allowed;
}
input:disabled:checked {
  background-color: var(--pine-color-accent-disabled);
  border-color: var(--pine-color-border-disabled);
}
input:disabled:checked::after {
  border-color: var(--pine-color-border-disabled);
}
input:focus-visible {
  outline: var(--pine-outline-focus);
}

label {
  display: flex;
  gap: var(--pine-dimension-xs);
}

label:has(input:disabled) {
  color: var(--pine-color-text-label-disabled);
  cursor: not-allowed;
}

:host:has(input:disabled) .pds-radio__message {
  color: var(--pine-color-text-label-disabled);
}

.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: polygon(0 0, 0 0, 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.pds-radio__message {
  color: var(--pine-color-text-message);
  flex-basis: 100%;
  font: var(--pine-typography-body);
  margin-inline-start: var(--pine-dimension-md);
  width: 100%;
}

.pds-radio__message--error {
  display: flex;
  gap: var(--pine-dimension-2xs);
}
.pds-radio__message--error pds-icon {
  margin-block-start: var(--pine-dimension-025);
}

:host(.has-image) {
  align-items: center;
  border: var(--pine-border);
  border-radius: var(--pine-dimension-125);
  column-gap: var(--pine-dimension-xs);
  display: flex;
  flex: 1;
  padding: var(--pine-dimension-md);
}
@media (max-width: 767px) {
  :host(.has-image) {
    box-sizing: border-box;
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
  }
}
:host(.has-image):hover {
  border: var(--pine-border-hover);
}
:host(.has-image):has(input:checked) {
  box-shadow: 0 0 0 2px var(--pine-color-primary-hover);
}
:host(.has-image) label {
  color: var(--pine-color-text);
  display: flex;
  font-weight: var(--pine-font-weight-semi-bold);
  gap: var(--pine-dimension-xs);
}
:host(.has-image) label::after {
  content: "";
  cursor: pointer;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 1;
}
:host(.has-image) .pds-radio__image-container {
  align-items: center;
  align-self: center;
  border: var(--pine-border);
  border-radius: var(--pine-border-radius-full);
  cursor: pointer;
  display: flex;
  flex: none;
  grid-area: image;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: all var(--pine-motion-duration-base) ease;
}
:host(.has-image) .pds-radio__image-container:hover {
  border-color: var(--pine-color-border-hover);
}
:host(.has-image) .pds-radio__image-container .pds-radio__image {
  height: 100%;
  object-fit: cover;
  width: 100%;
}
:host(.has-image) .pds-radio__message {
  grid-area: message;
  margin-block-start: 0;
  margin-inline-start: 0;
}
:host(.has-image).is-disabled {
  background: var(--pine-color-background-container-disabled);
  border-color: var(--pine-color-border-disabled);
  cursor: not-allowed;
}
:host(.has-image).is-disabled .pds-radio__image-container {
  border-color: var(--pine-color-border-disabled);
  cursor: not-allowed;
  opacity: 0.5;
}
:host(.has-image).is-disabled .pds-radio__image-container:hover {
  border-color: var(--pine-color-border-disabled);
}
:host(.has-image).is-disabled label {
  color: var(--pine-color-text-label-disabled);
  cursor: not-allowed;
}
:host(.has-image).is-disabled .pds-radio__message {
  color: var(--pine-color-text-label-disabled);
}
:host(.has-image).is-invalid .pds-radio__message--error {
  color: var(--pine-color-text-message-danger);
}