/**
 * Strong Testimonials > Guide pages
 */

$blue: #3063A5;
$gold: #FB8139;
$green: #25A383;

/* == Structure
--------------------------------------------------*/
.wpmtst-guide {
}

.guide-wrapper {
  display: flex;
  max-width: 1024px;
}

#guide {
  margin-right: 40px;
}

#plugin-sidebar {
  flex: 1 0 30%;
}

.section {
  margin-bottom: 40px;

  &:not(:first-child) {
    margin-top: 30px;
  }
}

/** == Elements
--------------------------------------------------*/
.wpmtst-guide {
  p,
  ol,
  ul {
    font-size: 1.2em;
    line-height: 1.5;
  }

  p.sig {
    font-size: 1.5em;
    font-style: italic;
    margin: 2em 0 1em;
  }

  ul > li {
    list-style-type: disc;
    margin-left: 1.3em;
    padding-left: .3em;
  }

  h1.large {
    color: $blue;
    font-size: 36px;
    font-weight: 600;
    margin: 1em 0;
  }

  .dashicons {
    color: $gold;
    font-size: 24px;
    margin-right: 0.5em;
  }
}

#guide {
  .section {
    &:first-child p {
      margin-top: 0;
    }
  }

  h2 {
    font-size: 1.7em;
    line-height: 1.3;
    margin: 0 0 1em;
  }
}

.highlight {
  background: #FFFF99;
  border: 1px solid #EEEE00;
  display: inline-block;
  padding: 3px 6px 2px;
}

code {
  font-size: 16px;
}

.code {
  display: inline-block;
  font-family: Consolas, Monaco, monospace;
  background: white;
  padding: 5px 15px;
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
}

.highlight {
  background: rgba(#FFE587, 0.5);
  border: 1px solid #FFDC5D;
  border-radius: 3px;
  color: #1E1800;
  padding: 5px 15px;
}

/* Plugin Sidebar
------------------------------------------------*/
#plugin-sidebar {

  .sidebar-block {
    padding: 1em;
    margin-bottom: 2em;
  }

  .sidebar-news {
    position: relative;
    background: #FFF;
    border: 1px solid $green;
    border-top-width: 5px;
    box-sizing: border-box;

    button {
      background: $green;
      color: white;
      border: 0;
      border-radius: 4px;
      padding: 3px 10px 5px;
      font-size: 16px;

      a:link,
      a:visited,
      a:active {
        color: #FFF;
        text-decoration: none;
        text-transform: uppercase;
      }

      a:hover {
      }

      &:hover {
        background: #337147;
      }
    }

    h2 {
      font-size: 1.5em;
      line-height: 1.3;
      margin-top: 0;
      text-align: left;
      margin-left: 46px; /* to account for icon */
    }

    h3 {
      text-align: center;
    }

    .actions {
      text-align: center;
    }

    &.addon {
      &:before {
        font-family: fontawesome;
        background: $green;
        color: #FFF;
        font-size: 24px;
        width: 46px;
        line-height: 46px;
        text-align: center;
        position: absolute;
        top: -5px; /* to account for top border */
        left: 0;
      }
      &.review-markup:before {
        content: "\f005";
      }
      &.multiple-forms:before {
        content: "\f0c5";
      }
      &.properties:before {
        content: "\f0ad";
      }
    }
  }

  .sidebar-links {
    background: #FFF;
    border: 1px solid $blue;
    border-top-width: 5px;
    box-sizing: border-box;

    a {
      white-space: nowrap;
    }

    h3 {
      margin: 0;
      padding-top: 4px;
      line-height: 1.3;
      white-space: nowrap;
    }

    div {
      margin: 0 0 20px 45px;
      font-size: 1.1em;

      &:last-child {
        margin-bottom: 0;
      }
    }

    p {
      margin: 0;
    }

    ul {
      font-size: 1em;
      margin: 0;
    }

    li {
      list-style-type: none;
      padding-left: 0;
      margin: 0.5em 0;
    }

    .has-icon:before {
      font-family: fontawesome;
      color: $blue;
      float: left;
      font-size: 34px;
      margin-left: -45px;
      position: relative;
      top: 10px;
    }

    .icon-help:before {
      content: "\f059";
    }

    .icon-document:before {
      content: "\f05a";
    }

    .icon-donate:before {
      content: "\f118";
    }

    .new-doc {
      background: #FF8900;
      color: #FFF;
      font-size: 0.8em;
      padding: 1px 5px;
      border-radius: 1px;
      margin-left: 8px;
    }
  }
}

/* ==Responsive
--------------------------------------------------*/

@media screen and (max-width: 320px) {
  #plugin-sidebar {
    div {
      padding: 0;
    }

    .has-icon::before {
      display: none;
    }
  }
}

@media screen and (max-width: 667px) {
  #plugin-sidebar {
    margin-top: 40px;
  }

  h1.large {
    font-size: 30px;
    line-height: 1.5;
  }

  .guide-wrapper {
    display: block;
  }
}

@media screen and (max-width: 768px) {
  .guide-wrapper {
    max-width: 768px;
  }
}

@media screen and (min-width: 668px) and (max-width: 782px) {
  #plugin-sidebar {
    .has-icon::before {
      display: none;
    }
  }
}

@media screen and (max-width: 1024px) {
  #plugin-sidebar {
    .sidebar-news.addon {
      &:before {
        display: none;
      }

      h2 {
        margin-left: 0;
        text-align: center;
        font-size: 1.3em;
      }
    }
  }
}