/*
    This file defines a lot of style necessary to make Wordpress work
    correctly.

    It is not recommended to edit it unless you know exactly what you
    are doing.
*/

body {
  -webkit-font-smoothing: antialiased;

}

#content-wrapper {
  background: #FBFBFB;
}

#main {
  background: #FBFBFB;
  padding-bottom: @footer-padding;
}

.navbar-spacer {
  height: @navbar-height;
}

.navbar {
  border: 0;
  .box-shadow(0 0 10px @gray-dark);
  .navbar-brand {
    font-weight: bold;
    padding: 0 @navbar-padding-horizontal;
    color: #FFF;
    line-height: @navbar-height;
    img {
      max-height: @navbar-height;
    }
  }
  .navbar-nav {
    > li {
      > a {
        border-top: @navbar-border solid transparent;
        border-bottom: @navbar-border solid transparent;
      }
      &.active {
        a {
          border-color: @color-concrete;
        }
      }
    }
  }
}

.nav-show-admin-bar {
  height: 28px;
  @media screen and (max-width: 782px) {
    height: 46px;
  }
}

.post-header {
  background-size: cover;
  padding-bottom: 25%;
  position: relative;
  background-position: center center;
}

.bg-color(@background, @foreground, @links) {
  background: @background;
  color: @foreground;
  a:not(.btn) {
    color: @links;
  }
  h1, h2, h3, h4, h5, h6 {
    color: @links;
  }
  table {
    background: lighten(@background, 2%);
    border-color: lighten(@background, 10%);
    tbody, thead {
      td, th {
        border-color: lighten(@background, 5%);
      }
    }
  }
}

.bg-white {
  .bg-color(#FFF, inherit, inherit);
}

.bg-concrete {
  .bg-color(@color-concrete, #fff, @color-midnight-blue);
}

.bg-green-sea {
  .bg-color(@color-green-sea, #fff, @color-concrete);
}

.bg-belize-hole {
  .bg-color(@color-belize-hole, #fff, @color-concrete);
}

.bg-pommegenade {
  .bg-color(@color-pommegenade, #fff, @color-concrete);
}

.bg-midnight-blue {
  .bg-color(@color-midnight-blue, #fff, @color-concrete);
}

.link-without-style() {
  a {
    color: inherit;
    text-decoration: none;
    &:hover, &:focus {
      text-decoration: none;
      color: @link-hover-color;
    }
  }
}

/* post styling */
.main-container {
  background-size: cover;
  background-position: center center;
}

#main > div > article {
  header {
    .link-without-style();
    .meta {
      .link-without-style();
      margin-bottom: 20px;
    }
  }

  section {
    .clearfix();
    img {
      .img-responsive();
      width: auto;

      &.alignleft {
        .pull-left();
        margin-right: 10px;
      }

      &.alignright {
        .pull-right();
        margin-left: 10px;
      }

      &.aligncenter {
        display: block;
        margin: 0 auto;
      }
    }

    .wp-video {
      margin-left: auto;
      margin-right: auto;
    }
  }
}

.tags {
  a {
    .label;
    .label-default;
  }
}

.video-container {
  .embed-responsive();
  .embed-responsive-16by9();
}

.post {
  margin-top: @grid-gutter-width / 2;
  margin-bottom: @grid-gutter-width / 2;
  &.sticky {
    background-color: @table-bg;
  }
}

.commentlist {
  .list-unstyled();

  .children {
    .list-unstyled();
    margin-left: 20px;
  }

  .comment-body {
    padding: 30px 0;
    border-bottom: 1px solid @hr-border;

    .edit-link a {
      &::before {
        content: "\270f";
        .glyphicon();
        padding-right: 3px;
      }
      .text-muted();
      text-decoration: none;
      &:hover, &:focus {
        text-decoration: none;
        color: @link-hover-color;
      }
    }
  }

  .comment .comment-body {
    & > * {
      padding-left: 50px;
      position: relative;
      .avatar {
        border: 1px solid rgba(0, 0, 0, 0.1);
        padding: 2px;
        position: absolute;
        left: 0;
        height: 34px;
        top: 2px;
        width: 34px;
      }
    }
    .comment-author {
      margin-bottom: 5px;
      .link-without-style();
      .fn {
        font-weight: bold;
      }
    }
    .comment-metadata {
      margin-bottom: 5px;
      .link-without-style();
      .text-muted();

      & > a {
        &::before {
          content: "\e023";
          .glyphicon();
          padding-right: 3px;
        }
      }
    }
    .reply a {
      &::before {
        content: "\e095";
        .glyphicon();
        padding-right: 3px;
      }
    }
  }
}

.comment-navigation {
  .list-inline();
  & > li {
    padding: 0;
    & > a {
      padding: 0 5px;
    }
  }
}

.comment-form {
  .comment-form-author,
  .comment-form-email,
  .comment-form-url,
  .comment-form-comment {
    .form-group;

    input,
    textarea {
      .form-control;
    }

    textarea {
      height: auto;
    }
  }
  .form-allowed-tags {
    code {
      white-space: normal;
      color: @text-color;
      background-color: transparent;
    }
  }
  input[type='submit'] {
    .btn;
    .btn-primary;
  }
}

/*

/* visual form */
.visual-form-builder-container {
  h3 {
    margin: 0;
  }
  ul {
    margin: 0;
    padding: 0;
  }
  li {
    line-height: @line-height-computed * 1.5;
  }
}

/* widget styles */

.widget {
  margin-bottom: 38px;
  &:last-of-type {
    margin-bottom: 18px;
  }
}

.widgettitle {
  margin-bottom: 9px;
}

.tagcloud {
  text-align: center;
  a {
    .label;
    .label-default;
    line-height: auto;
    display: inline-block;
    margin: 2px 0;
  }
}

/* calendar widget */

.widget_calendar {
  > div {
    .table-responsive();
  }
  table {
    td, th {
      text-align: center;
    }
    width: 100%;
    line-height: @line-height-large*2;
    a {
      display: block;
      background-color: @table-bg-accent;
      &:hover {
        background: @color-concrete;
      }
    }
    caption {
      font-weight: bold;
    }
  }
}

/* widgets */

.vertical-nav {
  .widget ul {
    .list-unstyled();
    li {
      .link-without-style();
      padding: 5px 0;
      border-bottom: 1px solid @hr-border;
      &:last-of-type {
        border-bottom: 0;
      }
      ul {
        margin-left: 15px;
      }
    }
  }
}

#inner-footer {
  background-color: @footer-bg;
  padding-top: @footer-padding;
  padding-bottom: (@footer-padding - @padding-base-vertical);
  border-top: 1px solid @navbar-default-border;
}

/* gallery */

.gallery {
  .make-row();
  .clearfix();
  .gallery-item {
    text-align: center;
    .make-xs-column(3);
    a {
      display: block;
      text-align: center;
    }
    img {
      .img-responsive();
      .img-thumbnail();
      margin: 0 auto;
    }
  }
  &.gallery-columns-1 {
    .gallery-item {
      .make-xs-column(12);
    }
  }
  &.gallery-columns-2 {
    .gallery-item {
      .make-xs-column(6);
    }
  }
  &.gallery-columns-3 {
    .gallery-item {
      .make-xs-column(4);
    }
  }
  &.gallery-columns-4 {
    .gallery-item {
      .make-xs-column(3);
    }
  }
  &.gallery-columns-5,
  &.gallery-columns-6 {
    .gallery-item {
      .make-xs-column(2);
    }
  }
}

/* a style used for all headers */

.article-header {
  padding-bottom: ((@line-height-computed / 2) - 1);
  margin-bottom: @line-height-computed;
  border-bottom: 1px solid @page-header-border-color;
  .has-post-thumbnail & {
    border-bottom: none;
  }
}

/* just a little style to remove spacing on the pager */

.pager-unspaced {
  margin: 0 0 @padding-base-vertical 0;
}

/* empty styles to please wordpress theme checker */

.wp-caption { /**/
}

.wp-caption-text { /**/
}

.sticky { /**/
}

.gallery-caption { /**/
}

.bypostauthor { /**/
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* =WordPress Core
-------------------------------------------------------------- */
.alignnone {
  margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
  display: block;
  margin: 5px auto 5px auto;
}

.alignright {
  float: right;
  margin: 5px 0 20px 20px;
}

.alignleft {
  float: left;
  margin: 5px 20px 20px 0;
}

a img.alignright {
  float: right;
  margin: 5px 0 20px 20px;
}

a img.alignnone {
  margin: 5px 20px 20px 0;
}

a img.alignleft {
  float: left;
  margin: 5px 20px 20px 0;
}

a img.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto
}

.wp-caption {
  .thumbnail();
  clear: both;
}

.wp-caption.alignnone {
  margin: 5px 20px 20px 0;
}

.wp-caption.alignleft {
  margin: 5px 20px 20px 0;
}

.wp-caption.alignright {
  margin: 5px 0 20px 20px;
}

.wp-caption img {
  &:extend(.img-responsive);
  margin-left: auto;
  margin-right: auto;
}

.wp-caption .wp-caption-text {
  padding: @thumbnail-caption-padding;
  color: @thumbnail-caption-color;
}

/* Text meant only for screen readers. */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  color: #21759b;
  display: block;
  font-weight: bold;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000; /* Above WP toolbar. */
}
