//
// WordPress Specifics
//
[data-sek-level="module"] .sek-module-inner {
   .wp-caption figcaption {
    color: #6d6d6d;
    font-style: italic;
    max-width: 100%;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    /* Keep wide captions from overflowing their container. */
    padding: 4px;
    margin-top: 1rem;
  }
  figure {
    display: block;
  }
  // Image block
  .wp-block-image .aligncenter, .wp-block-image .alignleft, .wp-block-image .alignright {
    display: table;
  }
  .wp-block-image figcaption {
    font-size: 13px;
    text-align: center;
  }

  // Gallery block
  .wp-block-gallery, ul.blocks-gallery-grid {
    @if ( true == $is_rtl ) {
      margin-right: 0;
    }
    @else {
      margin-left: 0;
    }
  }

  // Generic block style
  [class*="wp-block-"]:not(:last-child) {
    margin-bottom: 1.5em;
  }

  // Gutenberg alignments
  @at-root .sek-col-100 .sek-module-inner {
    .alignfull {
        margin-left: calc(-100vw / 2 + 100% / 2);
        margin-right: calc(-100vw / 2 + 100% / 2);
        max-width: 100vw;
        width: auto;
    }
    .alignwide {
      margin-left: calc((100% - 80vw) / 2);
      width: 80vw;
      max-width: 80vw;
    }
  }

  // Other core WP default classes
  .aligncenter, .aligncenter img {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
  .alignleft {
    float: left;
  }
  .alignright {
    float: right;
  }
  .alignnone, .aligncenter, .alignleft, .alignright {
    margin-top: 1.5rem;
    margin-right: auto;
    margin-bottom: 1.5rem;
    margin-left: auto;
  }

  /* WP Search Widget */
  [role=search].search-form {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    max-width: 100%;
    @if ( true == $is_rtl ) {
      float:left;
    } @else {
      float:right;
    }
    //max-width: 768px)
    @include media-breakpoint-down(sm) {
      float: none;
    }
  }

  [role=search].search-form label {
    position: relative;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    margin-right: 5px;
  }

  [role=search].search-form label input {
    padding-left: 5px;
    line-height: 20px;
    width: 100%;
    max-width: 185px;
    min-width: 80px;
    //max-width: 768px)
    @include media-breakpoint-down(sm) {
        max-width: none;
    }
  }

  [role=search].search-form input[type=submit] {
    line-height: 15px;
    /*width: 25%;*/;
  }

  input[type="submit"]{
    background: $grey;
    color: #fff;
    padding: 10px 10px;
    font-weight: normal;
    display: inline-block;
    border: none;
    cursor: pointer;
    -webkit-border-radius: 3px;
    border-radius: 3px;
  }

  .search-form input[type="search"] {
    margin: 0;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-border-radius: 0;
    border-radius: 0;
    background: #fff;
    border: 2px solid #ddd;
    color: #777;
    display: block;
    max-width: 100%;
    padding: 7px 8px;
  }
}

// Password Protected page/post
// april 2020 for https://github.com/presscustomizr/nimble-builder/issues/673
.sektion-wrapper.sek-password-protected {
  display: flex;
  align-items: center;
  justify-content: center;
  -ms-flex-direction: column;
  flex-direction: column;
  form.post-password-form {
    max-width: 450px;
    height: auto;
    padding: 4em 1em;
    font-size: 1em;
  }
}

.sektion-wrapper .sek-module-inner .avatar {
  border-radius: 50%;
}

.sek-next-post-link::after, .sek-previous-post-link::before {
  width: 15px;
  height: 10px;
  display: inline-block;
  position: relative;
  vertical-align: middle;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left-color: inherit;
  border-right-color: inherit;
}
// Template tags
@if ( true == $is_rtl ) {
  .sek-previous-post-link::before {
    content: '';
    border-left: 6px solid;
    left: 7px;
  }
  .sek-next-post-link::after {
    content: '';
    border-right: 6px solid;
    right: 7px;
  }
}  @else {
  .sek-previous-post-link::before {
    content: '';
    border-right: 6px solid;
    right: 7px;
  }
  .sek-next-post-link::after {
    content: '';
    border-left: 6px solid;
    left: 7px;
  }
}