:where(.wp-block-button__link) {
  border-radius: 9999px;
}

.wp-block-buttons.is-content-justification-center {
  justify-content: center;
}

.mailform {
  dl {
    margin-block-start: 2.4rem;
  }

  dt {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;

    i {
      flex: 0 0 auto;
      padding-block-start: calc(0.8em - 0.625rem);
      font-style: normal;

      span {
        display: block;
        padding: 0.125rem 0.5rem;
        border-radius: 2px;
        color: #fff;
        background: var(--wp--preset--color--light-green-cyan);
        font-size: 0.75rem;
        line-height: 1rem;

        &.required {
          background: var(--wp--preset--color--vivid-red);
        }
      }
    }
  }

  dd {
    margin-block-start: 1.2rem;
    margin-inline-start: 0;

    > [class^='error_'] {
      display: block;
      margin-top: 0.6rem;
      color: var(--wp--preset--color--vivid-red);
    }
  }

  ul {
    list-style: none;
    padding-inline-start: 0;
  }

  li {
    margin-block-start: 0.6rem;
  }

  input:not(
    [type='button'],
    [type='checkbox'],
    [type='radio'],
    [type='submit']
  ),
  textarea {
    border: 1px solid #ccc;
    border-radius: 2px;
    font: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;

    &:hover {
      border-color: #999;
    }

    &:hover,
    &:focus {
      box-shadow: inset 0 0 2px #ccce;
    }
  }

  input:not(
    [type='button'],
    [type='checkbox'],
    [type='radio'],
    [type='submit']
  ),
  select,
  textarea,
  ul[role='list'] {
    &:has(~ [class^='error_']:not(:empty)) {
      background: color(from var(--wp--preset--color--vivid-red) srgb r g b / 0.05);
    }
  }

  input[type='text'],
  input[type='email'],
  textarea {
    width: 100%;
    padding: 0.5rem 1rem;
  }

  textarea {
    height: 10em;
  }
}
