:root {
  --#{$CSS_VAR_PFX}blockquote-accent-color: var(--#{$CSS_VAR_PFX}color-accent-primary);
}

blockquote {
  position: relative;
  z-index: 0;
  overflow: hidden;
  line-height: var(--#{$CSS_VAR_PFX}large-line-height);
  margin: 0 0 var(--#{$CSS_VAR_PFX}paragraph-mb);
  border-radius: calc(var(--#{$CSS_VAR_PFX}border-radius) * 0.5);
  border-style: solid;
  border-color: var(--#{$CSS_VAR_PFX}blockquote-accent-color);
  border-width: 0;
  border-inline-start-width: 0.5em;

  &:not(.no-icon):before {
    content: " ";
    position: absolute;
    z-index: -1;
    opacity: 0.1;
    background-color: currentColor;
    mask: var(--#{$CSS_VAR_PFX}blockquote-icon) no-repeat 50% 50%;
    -webkit-mask: var(--#{$CSS_VAR_PFX}blockquote-icon) no-repeat 50% 50%;
    filter: brightness(100%);
  }

  &:not(.large) {
    font-size: 1em;
    line-height: var(--#{$CSS_VAR_PFX}large-line-height);
    padding: 0.75em 1.25em;
    border-start-start-radius: calc(var(--#{$CSS_VAR_PFX}border-radius) * 0.5);
    border-start-end-radius: var(--#{$CSS_VAR_PFX}border-radius);
    border-end-end-radius: var(--#{$CSS_VAR_PFX}border-radius);
    border-end-start-radius: calc(var(--#{$CSS_VAR_PFX}border-radius) * 0.5);

    &:before {
      // blockquote icon
      top: 1em;
      width: 7em;
      height: 7em;
      inset-inline-start: 1em;
    }
  }

  &.large {
    font-size: 1.25em;
    border-width: 0.5em 0;
    padding: 1.25em 0.75em;
    margin-top: 2em;

    &:before {
      // blockquote icon
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      width: 15em;
      height: 15em;
      margin: auto;
    }
  }

  &.large:not(.text-align-fill) {
    text-align: center;
  }

  cite {
    display: block;
    font-size: 0.64em;
    font-style: normal;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding-top: 1.5em;
    opacity: 0.8;
  }
}
