// 8.4 Gutenberg

/*  ----------------------------------------------------------------------------
    less for Gutenberg elements
*/
.wp-block-image {
  figcaption {
    font-family: @font2;
    text-align: left;
    margin: 6px 0 26px 0;
    font-size: 11px;
    font-style: italic;
    font-weight: normal;
    line-height: 17px;
    color: #444;
  }
}

// Gallery - block
.wp-block-gallery {

  .blocks-gallery-image,
  .blocks-gallery-item {

    figcaption {
      font-family: @font2;
      font-size: 11px;
      line-height: 17px;
    }
  }
}

// Categories - block
.wp-block-categories {
  padding: 0 10px;

  &,
  ul {
    list-style-type: none;
  }

  ul {
    margin: 5px 0 0;
    padding-left: 26px;
  }

  li {
    margin-left: 0;
    margin-bottom: 5px;

    &:last-child {
      margin-bottom: 0;
    }
  }

  a {
    color: #000;

    &:hover {
      text-decoration: none;
      color: @td_theme_color;
    }
  }

  .td-widget-no {
    float: right;
  }

  select {
   // width: 100%;
    height: 30px;
    margin-bottom: 10px;
    margin-top: 13px;
    padding: 0 5px;
  }
}

//Blockquotes block
.wp-block-quote {
  cite {
    color: #6c7781;
    font-size: 13px;
    margin-top: 1em;
    position: relative;
    font-style: normal;
  }
}

// Archive block
.wp-block-archives {
  font-family: @font1;

  li {
    line-height: 30px;
    list-style: none;
    padding: 0;
    margin-left: 0 !important;

    a {
      color: #222222;

      &:hover {
        color: @td_theme_color;
        text-decoration: none !important;

      }
    }
  }
}

// Latest comments - block
.wp-block-latest-comments {
  &.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt, &.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta {
    margin-left: 0;
  }

  .wp-block-latest-comments__comment {
    display: flex;
    margin: 10px 0 !important;
    line-height: 21px;
    padding-bottom: 13px;
    font-size: 12px;

    .wp-block-latest-comments__comment-date {
      display: block;
      font-family: @font1;
      font-size: 11px;
      line-height: 16px;
      color: #b5b5b5;
      font-style: italic;
      margin-bottom: 5px;
    }

    p {
      margin-bottom: 0;
    }

    a {
      color: #222222;
      font-style: italic;
      font-size: 11px;
      font-weight: bold;

      &:hover {
        color: @td_theme_color;
        text-decoration: none !important;
      }

    }
  }
}

//Latest Posts
.wp-block-latest-posts:not(.is-grid) {

  li {
    list-style: none;
    margin-bottom: 8px !important;
    margin-left: 0;
    padding-bottom: 7px;
    border-bottom: 1px dashed #f1f1f1;
    font-family: @font3;

    &:last-child {
      border-bottom: none;
    }

    a {
      display: inline-block;
      color: #222222;
      line-height: 21px;

      &:hover {
        color: @td_theme_color;
        text-decoration: none !important;

      }
    }
  }

  .wp-block-latest-posts__post-date {
    display: block;
    font-family: @font1;
    font-size: 11px;
    line-height: 16px;
    color: #b5b5b5;
    font-style: italic;
    margin-bottom: 5px;
  }
}

//Button
.wp-block-button {

  &:not(.is-style-outline) {

    .wp-block-button__link {
      transition: background-color 0.1s ease;
      -webkit-transition: background-color 0.1s ease;
      padding: 9px 12px;
      font-size: 16px;
      line-height: 20px;
      font-family: @font1;
      font-weight: 600;

      &:hover {
        background-color: #444 !important;
        text-decoration: none !important;
      }

      &:not([class*="has-background"]) {
        background-color: @td_theme_color;
      }
    }

  }

  &.is-style-outline {

    .wp-block-button__link {
      border-width: 2px;
      border-style: solid;
      transition: all 0.1s ease;
      -webkit-transition: all 0.1s ease;


      &:not([class*="has-background"]) {
        background-color: transparent;

        &:hover {
          background-color: #4db2ec;
        }
      }
      &:not([class*="has-text-color"]) {
        color: @td_theme_color;
        border-color: @td_theme_color;
      }

      &:hover {
        background-color: #444;
        color: #fff;
        text-decoration: none !important;
      }

    }

  }

}

//Paragraph shortcode - dropcaps
p.has-drop-cap {

  &:not(:focus):first-letter {
    font-size: 79px;
    line-height: 69px;
    margin: 0 9px 0 0;
    padding: 0 13px 0 0;
    color: inherit;
  }
  &:not([class*="has-text-color"]) {

    &:not(:focus):first-letter {
      //font-size: 79px;
      //line-height: 69px;
      //margin: 0 9px 0 0;
      //padding: 0 13px 0 0;
      color: #4B4B4B;
    }
  }
}

.alignwide {

  @media (min-width: 1485px) {
    width: calc(~'100% + 400px');
    margin-left: -200px;
    max-width: 100vw;

    &.wp-block-video video {
      width: 100%;
    }
  }
}

.alignfull {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw !important;
  max-width: none !important;
  margin-left: 0;
  margin-right: 0;

  &.wp-block-cover.has-parallax {
    left: auto;
    transform: none;
    margin-left: calc(~'(-100vw + 100%) / 2');
  }
  &.wp-block-columns {
    padding-left: 8px;
    padding-right: 8px;
  }
  &.wp-block-embed-wordpress-tv {
    .wp-block-embed__wrapper {
      padding-bottom: 56.25%;
    }

    iframe {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      padding-left: 8px;
      padding-right: 8px;
    }
  }
}

.wp-block-media-text {
  margin-bottom: 26px;
}

.td-post-content p {
  &.has-small-font-size {
    font-size: 11px;
  }
  &.has-large-font-size {
    font-size: 32px;
  }
  &.has-larger-font-size {
  font-size: 50px;
  }
}

