/*
Text page

Styleguide 2.banner.calina
*/

// Colour variables used in this paragraph
$d-p-text-paged-subtitle-color: $color-agamemnon !default;
$d-p-text-paged-line-color: $color-agamemnon !default;
$d-p-text-paged-line-color-inverted: $color-nestor !default;
$d-p-text-paged-color: $color-hecuba !default;
$d-p-text-paged-background-invert-color: $color-agamemnon !default;
$d-p-text-paged-theme-invert-background-color: $color-agamemnon !default;
$d-p-text-paged-theme-invert-text-color: $color-odysseus !default;

// Margins, paddings and sizing.
$d-p-text-paged-subtitle-margin-y: 1.125rem !default;

.theme-default {
  .paragraph--type--d-p-text-paged {
    > div > h3.field--name-field-d-subtitle {
      color: $d-p-text-paged-subtitle-color;
    }

    .field--name-field-d-long-text {
      color: $d-p-text-paged-color;
    }
  }
}

.paragraph--type--d-p-text-paged {
  text-align: center;

  > div > .field--name-field-d-media-icon {
    text-align: center;
  }

  > div > .field--name-field-d-main-title {
    @include font-main-header;
    text-align: center;
  }

  > div > h3.field--name-field-d-subtitle {
    margin: $d-p-text-paged-subtitle-margin-y 0;
    @include font-subtitle;
    text-align: center;
  }

  .field--type-link {
    text-align: center;
  }

  .field--name-field-d-main-title,
  .field--name-field-d-subtitle {
    + div > .field--type-link,
    + .field--name-field-d-long-text {
      &::before {
        @include decoration-header-line-main-center($d-p-text-paged-line-color, $d-p-text-paged-line-color-inverted)
      }
    }
  }

  .field--name-field-d-long-text {
    p {
      word-wrap: break-word;
      hyphens: auto;
    }
  }
}
