/**
 * @file
 * Component: Quote.
 *
 * Provides styling for quote blocks.
 */

.quote {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
}

.quote__content {
  grid-column: 1 / -1;
  grid-row: 1 / 2;

  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  align-items: center;
  gap: var(--spacing-md);
  color: var(--color-white);
  z-index: 5;
  padding: var(--spacing-lg) var(--spacing-md);
  width: 100%;
}

@media screen and (min-width: 48em) {
  .quote__content {
    padding: calc(var(--spacing-lg) * 2) var(--spacing-md);
  }
}

/* If no background, text color should fallback to default. */
.quote--unstyled-background .quote__content {
  color: var(--theme-dark-body-color);
}

.quote__quote {
  font-family: var(--font-family-secondary);
  display: grid;
  font-size: var(--font-size-2xl);
  max-width: var(--width-large);
  font-weight: var(--font-weight-light);
  line-height: 1.125;
  gap: var(--spacing-xl);
}

.quote__quote p,
.quote__quote h2 {
  font-family: var(--font-family-primary);
}

@media screen and (min-width: 48em) {
  .quote__quote {
    font-size: var(--font-size-h1);
  }
}

.quote__quote strong {
  font-weight: var(--font-weight-black);
}

.quote__quote .icon svg {
  width: 100%;
  height: auto;
  fill: var(--quote-icon-color);
}

.quote__author-provider {
  text-align: left;
  font-weight: bold;
}

.quote__background-image {
  grid-column: 1 / -1;
  grid-row: 1 / 3;
  z-index: 1;
  position: relative;
  align-self: normal;
}

.quote__background-image::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  background: var(--quote-overlay);
  backdrop-filter: blur(var(--blur-sm));
}

.quote__background-image img {
  object-fit: cover;
  height: 100%;
  width: 100%;
  position: absolute;
}

.quote__call-to-action {
  text-align: left;
}

.quote__call-to-action a {
  text-decoration: none;
  text-underline-offset: var(--underline-offset);
  color: var(--color-white);
}

.quote__call-to-action a:hover {
  text-decoration: underline;
}

.quote--unstyled-background .quote__call-to-action a {
  display: inline-block;
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--call-to-action-link-background);
  color: var(--button-primary-color);
  text-decoration: none;
  border-radius: var(--button-border-radius);
  margin-top: var(--spacing-2xs);
}

.quote--unstyled-background .quote__call-to-action a:where(:hover, :focus) {
  background: var(--button-primary-background-hover);
  color: var(--button-primary-color-hover);
  text-decoration: underline;
}

/* Last quote on the page have no padding bottom. */
.node__content .layout:last-child .block-quote:last-child {
  padding-bottom: 0;
}
