/**
 * Content CSS File
 * Contains all content related styles.
 *
 * @author      Flurin Dürst
 * @version     3.0.2
 * @since       WPSeed 0.1
 *
 */


/*=======================================================
Table of Contents:
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––
 1.0 GENERAL
 2.0 TYPO
 3.0 GUTENBERG BLOCKS
=======================================================*/



@import 'vars';


/*==================================================================================
  1.0 GENERAL
==================================================================================*/

/* Anchors
/––––––––––––––––––––––––*/
a {
  color: $a__linkcolor;
  text-decoration: $a__textdecoration;
  transition: $transition_fast;
  &:hover {
    color: $a__hovercolor;
  }
}


/* Vertical Spacing
/––––––––––––––––––––––––*/
article,
.wp-block-wpseed-container {
  & > p,
  & > ul,
  & > figure,
  & > blockquote,
  & > .wp-block-button,
  & > .wp-block-cover,
  & > .wp-block-file,
  & > .wp-block-columns .wp-block-column p {
    margin-bottom: 1rem;
  }
}

h1 {
  margin-bottom: .5rem;
}

h2 {
  margin-bottom: 0;
}


/*==================================================================================
  2.0 TYPO
==================================================================================*/
// see «Vertical Spacing» at «1.0 GENERAL» for bottom/top spacing

h1 {
  width: 100%;
  font-size: 2rem;
  font-weight: $bold;
}

h2 {
  width: 100%;
  font-size: 1.5rem;
  font-weight: $bold;
}

p {
  font-weight: $regular;
  b,
  strong {
    font-weight: $bold;
  }
}

main ul {
  margin-left: 1rem;
  padding-left: 1rem;
}



/*==================================================================================
  3.0 GUTENBERG BLOCKS
==================================================================================*/

/* Container
/––––––––––––––––––––––––*/
// WPSeed uses the Gutenberg container from the plugin wpseed-container-block
// => https://github.com/flurinduerst/WPSeed-Container-Block/
.wp-block-wpseed-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}


/* Image Blocks
/––––––––––––––––––––––––*/
// -> https://www.billerickson.net/full-and-wide-alignment-in-gutenberg/
.wp-block-image img {
  width: 100%;
}

.alignfull {
  // should span the full width of the screen
  width: 100vw;
  max-width: 100vw;
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);
}

.alignwide {
  // should be wider than the main content area, but not as wide as the full alignment
  margin-right: calc(25% - 25vw);
  margin-left: calc(25% - 25vw);
}


/* Cover Blocks
/––––––––––––––––––––––––*/
.wp-block-cover {
  position: relative;
  display: flex;
  justify-content: center; // vertical position
  align-items: center; // horizontal position
  min-height: 20rem;
  overflow: hidden;
  background-position: center center;
  background-size: cover;
}

.wp-block-cover::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  background-color: black;
  opacity: .3;
  content: '';
}

.wp-block-cover .wp-block-cover-text {
  z-index: 1;
  max-width: 50%;
  margin-bottom: 0;
  padding: 1rem;
  font-size: 1.5rem;
  color: white;
  text-align: left;
}


/* Columns
/––––––––––––––––––––––––*/
.wp-block-columns {
  display: flex;
  @include mobile {
    flex-direction: column;
  }
}
.wp-block-column {
  display: flex;
  width: calc(50% - .5rem);
  @include desktop {
    &:not(:last-child) {
      margin-right: 1rem;
    }
  }
  @include mobile {
    width: 100%;
    margin-right: 0;
  }
}


/* Separator
/––––––––––––––––––––––––*/
hr.wp-block-separator {
  width: 20%;
  margin: 1rem auto;
  &.is-style-wide {
    width: 100%;
  }
  &.is-style-dots {
    max-width: none;
    height: auto;
    text-align: center;
    line-height: 1;
    background: 0 0;
    border: none;
    &:before {
      padding-left: 1rem; // = font-size
      font-size: 1rem;
      letter-spacing: 1rem;
      content: '\00b7 \00b7 \00b7';
    }
  }
}


/* Quote
/––––––––––––––––––––––––*/
.wp-block-quote {
  padding-left: .5rem;
  border-left: .2rem solid $color__dark;
  cite {
    font-size: .8rem;
    font-style: normal;
    opacity: .6;
  }
}


/* Button
/––––––––––––––––––––––––*/
.wp-block-button {
  color: $color__bright;
  &.aligncenter {
    text-align: center;
  }
  &.alignright {
    text-align: right;
  }
  &.alignleft {
    text-align: left;
  }
  &.is-style-squared .wp-block-button__link {
    border-radius: 0;
  }
  &.is-style-outline .wp-block-button__link {
    color: $color__dark;
    background-color: transparent;
    border: 2px solid $color__dark;
  }
  .wp-block-button__link {
    display: inline-block;
    margin: 0;
    padding: .5rem 1rem;
    font-size: 18px;
    color: inherit;
    text-align: center;
    text-decoration: none;
    background-color: $color__dark;
    border: none;
    border-radius: .5rem;
    box-shadow: none;
    cursor: pointer;
    white-space: normal;

    overflow-wrap: break-word;
    &:hover {
      text-decoration: none;
      background: $color__main;
    }
  }
}


/* Download
/––––––––––––––––––––––––*/
// hide output of name file
.wp-block-file a:first-of-type {
  display: none;
}
