/* ==============================
	Docs Page
================================= */

/* Categories Boxes */
.doc-category-blocks {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(1, 1fr);
  text-align: center;
}

@media (min-width: 769px) {
  .doc-category-blocks {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
}

.doc-category-blocks h2 {
  font-family: var(--font-primary);
  font-size: var(--h4-size);
  font-weight: 600;
  margin: 0;
}

@media (max-width: 767px) {
  .doc-category-blocks h2 {
    font-size: var(--h5-size-mobile);
  }
}

.doc-category-blocks a {
  font-size: var(--body-text-small-size);
  font-family: var(--font-primary);
  font-weight: 600;
  border: 1px solid var(--color-link-custom);
  border-radius: 4px;
  padding: 12px 20px 13px;
  display: block;
  margin: 20px auto 0 auto;
  width: Min(140px, 100%);
  color: var(--color-link);
}

.doc-category-blocks a:hover {
  border: 1px solid var(--color-button);
  background-color: var(--color-button);
  color: var(--color-button-text);
  text-decoration: none;
}

.doc-category-blocks p {
  margin: 16px 0 0;
  font-size: 15px;
  color: #888;
  line-height: 1.3;
  padding: 0 20px;
}

.doc-category-blocks .block {
  padding: 0;
}

.doc-category-blocks .block .inside {
  border: 2px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  padding: 30px 10px;
  border-radius: 8px;
}

/* Getting Started Section */
.docs-home__gettingstarted {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  position: relative;

  .docs-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 26px 40px;
    border-bottom: 1px solid #e5e5e5;
  }
}

.docs-home__gettingstarted .widget-title {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: var(--h3-size);
  line-height: 36px;
  color: #334155;
  margin-bottom: 0 !important;
}

.docs-home__gettingstarted li {
  position: relative;
  padding: 0 0 0 30px;
  background: none;
  list-style: none;
  text-indent: 0;
  margin: 0 0 20px !important;
  line-height: unset;
  width: 50%;
  border-bottom: none !important;
}

.docs-home__gettingstarted li:before {
  content: url(/wp-content/themes/imagely-edd/images/file-icon.svg);
  position: absolute;
  top: 3px;
  bottom: 0;
  left: 0;
}

.docs-home__gettingstarted ul {
  padding: 26px 40px;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.docs-home__gettingstarted li a {
  font-weight: 400;
  font-size: var(--h5-size);
  line-height: 28px;
  text-align: center;
  color: #334155;
}

.docs-home__gettingstarted li a:hover {
  color: var(--color-link-custom);
}

.docs-submit-a-ticket {
  background: var(--color-button);
  border-radius: 25px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: var(--body-text-size);
  line-height: 24px;
  color: var(--color-button-text);
  display: inline-block;
  position: absolute;
  right: 40px;
  top: 24px;
}

.docs-submit-a-ticket:hover {
  color: #f9fafb;
}

@media (max-width: 640px) {
  .docs-home__gettingstarted .widget-title {
    font-weight: 700;
    font-size: var(--h5-size);
    line-height: 32px;
    text-align: left !important;
  }

  .docs-home__gettingstarted ul {
    padding: 20px;
    display: block;
    width: 100%;
  }

  .docs-home__gettingstarted li {
    width: 100%;
  }

  .docs-home__gettingstarted li a {
    font-weight: 500;
    font-size: var(--body-text-small-size);
    line-height: 18px;
  }

  .docs-home__gettingstarted {
    display: flex;
    flex-direction: column;
  }

  .docs-submit-a-ticket {
    position: relative;
    display: inline-block;
    right: initial;
    top: initial;
    text-align: center;
  }

  .docs-widget-header {
    padding: 20px !important;
  }
}

/* Search Doc */
#docs .docs-searchbox {
  position: relative;
}

#docs .docs-site-search .docs-site-search__icon {
  position: relative;
  left: 14px;
  height: 20px;
  width: 20px;
  top: 50%;
  margin-top: -10px;
  fill: #6b7280;
}

#docs .docs-site-search .docs-site-search__icon path {
  fill: #fff !important;
}

.docs-site-search::after {
  content: url(/wp-content/themes/imagely-edd/images/magnifying-glass.svg);
  top: 18px;
  left: 18px;
  position: absolute;
}

#docs .docs-searchbox .docs-site-search__field::-webkit-input-placeholder {
  /* Edge */
  font-weight: 500;
  font-size: 20px;
  line-height: 30px;
  color: #a3a3a3;
}

#docs .docs-searchbox .docs-site-search__field:-ms-input-placeholder {
  /* Internet Explorer 10-11 */
  font-weight: 500;
  font-size: 20px;
  line-height: 30px;
  color: #a3a3a3;
}

#docs .docs-searchbox .docs-site-search__field::placeholder {
  font-weight: 500;
  font-size: 20px;
  line-height: 30px;
  color: #a3a3a3;
}

#docs .docs-searchbox-wrapper {
  padding: 20px 0 20px 0 !important;
}

#docs-home__search .docs-container {
  padding: 0 !important;
}

#docs .docs-searchbox #docs-search-results {
  color: #0c182b !important;
  background: #faf7f1;
  padding: 20px;
}

#docs .docs-searchbox #docs-loading {
  text-align: center;
}

#docs .docs-searchbox .loading {
  text-align: center;
}

#docs .docs-searchbox .loading:after {
  content: " .";
  animation: dots 1s steps(5, end) infinite;
}

@keyframes dots {
  0%,
  20% {
    color: rgba(0, 0, 0, 0);
    text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0);
  }
  40% {
    color: black;
    text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0);
  }
  60% {
    text-shadow: 0.25em 0 0 black, 0.5em 0 0 rgba(0, 0, 0, 0);
  }
  80%,
  100% {
    text-shadow: 0.25em 0 0 black, 0.5em 0 0 black;
  }
}

#docs .docs-searchbox #docs-search-results-list {
  text-align: left;
  margin-top: 10px;
}

#docs .docs-searchbox #docs-search-results-list li {
  padding: 5px 0;
  list-style: decimal !important;
  margin-left: 40px;

  a {
    color: var(--color-link);
    &:hover {
      color: var(--color-link-hover);
    }
  }
}

#docs .docs-site-search .docs-site-search__field_custom {
  flex-grow: 1;
  margin: 0 0 0 0;
  line-height: 1;
  background-repeat: no-repeat;
  background-position: right 5px center;
  background-image: none;
  padding: 24px 64px !important;
  background-color: #ffffff;
  border: 1px solid #e5e5e5 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  width: 100%;
}

@media (max-width: 640px) {
  #docs .docs-searchbox .docs-site-search__field::-webkit-input-placeholder {
    /* Edge */
    font-weight: 500;
    font-size: 12px;
    line-height: 20px;
    color: #6b7280;
  }

  #docs .docs-searchbox .docs-site-search__field:-ms-input-placeholder {
    /* Internet Explorer 10-11 */
    font-weight: 500;
    font-size: 12px;
    line-height: 20px;
    color: #6b7280;
  }

  #docs .docs-searchbox .docs-site-search__field::placeholder {
    font-weight: 500;
    font-size: 12px;
    line-height: 20px;
    color: #6b7280;
  }

  #docs .docs-site-search .docs-site-search__field_custom {
    padding: 15px 10px 15px 45px !important;
    font-size: 12px;
  }

  .docs-site-search:after {
    top: 8px;
    left: 8px;
    position: absolute;
  }
}

/* Docs Sidebar */
.envira-docs-sidebar-most-popular {
  h3.widget-title {
    font-size: 19px;
    font-weight: 700;
    font-family: var(--font-primary);
  }

  ul {
    margin-top: 20px;
    width: 100%;

    li {
      position: relative;
      padding: 0 0 0 30px;
      background: none;
      list-style: none;
      text-indent: 0;
      margin: 0 0 15px !important;
      line-height: unset;
      width: 100%;
      border-bottom: 1px solid #f1f1f6 !important;
      padding-bottom: 15px;

      &::before {
        content: url(/wp-content/themes/imagely-edd/images/file-icon.svg);
        position: absolute;
        top: 1px;
        bottom: 0;
        left: 0;
      }

      a {
        font-weight: 400;
        font-size: var(--body-text-size);
        text-align: left;
        color: var(--color-link);

        &:hover {
          color: var(--color-link-hover);
        }
      }
    }
  }
}

.envira-docs-sidebar-category {
  ul.menu {
    margin-top: 20px;
    width: 100%;

    li.menu-item {
      position: relative;
      background: none;
      list-style: none;
      text-indent: 0;
      margin: 0 0 15px !important;
      line-height: unset;
      width: 100%;
      border-bottom: 1px solid #f1f1f6 !important;
      padding-bottom: 15px;

      a {
        font-size: 19px;
        font-weight: 700;
        font-weight: Inter;
        color: var(--color-link);

        &:hover {
          color: var(--color-link-hover);
        }
      }

      &.current-menu-item {
        a {
          color: var(--color-link-custom);
        }
        &:hover {
          color: var(--color-link-hover-custom);
        }
      }
    }
  }
}

.envira-docs-sidebar-search {
  #docs .docs-site-search .docs-site-search__field_custom {
    padding: 20px 42px !important;
    font-size: var(--body-text-small-size);
    font-weight: 500;
    background: #f9fafb;
    color: #737373;
  }

  .docs-site-search:after {
    top: 17px;
    left: 12px;
    position: absolute;
    content: url(/wp-content/themes/imagely-edd/images/sidebar-search-icon.svg);
  }

  #docs .docs-searchbox-wrapper {
    padding: 0 0 30px 0 !important;
  }
}

/* Single Doc Page */

.envira-single-doc-content {
  a {
    color: var(--color-link-custom);
    text-decoration: none;

    &:hover {
      color: var(--color-link-hover-custom);
    }
  }

  h2 {
    font-size: var(--h2-size-content) !important;
  }

  h3 {
    font-size: var(--h3-size-content) !important;
  }

  h4 {
    font-size: var(--h4-size-content) !important;
  }

  h5 {
    font-size: var(--h5-size-content) !important;
  }

  h6 {
    font-size: var(--h6-size-content) !important;
  }
}

.envira-single-doc-help-link {
  ul {
    display: flex;
    justify-content: space-between; /* Push first li left, second li right */
    align-items: center;
    padding: 0;
    list-style: none;
    gap: 20px;

    li {
      font-size: var(--body-text-small-size);
      flex: 1;
      background: none;
      list-style: none;
      text-indent: 0;

      &.contact {
        background: url(/wp-content/themes/imagely-edd/images/email.svg) 0 50%
          no-repeat;
        text-indent: 25px;
        text-align: left;
      }

      &.last-modified {
        font-style: italic;
        text-align: right;
      }

      a {
        text-decoration: underline;
        color: var(--color-link-custom);

        &:hover {
          color: var(--color-link-hover-custom);
        }
      }
    }
  }
}

@media (max-width: 768px) {
  .envira-single-doc-help-link ul {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .envira-single-doc-row {
    display: flex;
    flex-direction: column-reverse;
    text-align: left !important;

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      text-align: left !important;
    }
  }
}

/* Docs Category Posts */

ul.envira-doc-category-posts {
  margin-top: 20px;
  width: 100%;

  li {
    position: relative;
    padding: 0 0 0 30px;
    background: none;
    list-style: none;
    text-indent: 0;
    margin: 0 0 15px !important;
    line-height: unset;
    width: 100%;
    padding-bottom: 10px;

    &::before {
      content: url(/wp-content/themes/imagely-edd/images/file-icon.svg);
      position: absolute;
      top: 1px;
      bottom: 0;
      left: 0;
    }

    a {
      font-weight: 400;
      font-size: var(--body-text-size);
      text-align: left;
      color: var(--color-link);

      &:hover {
        color: var(--color-link-hover);
      }
    }
  }
}

@media (max-width: 640px) {
  .envira-docs-category-posts-row {
    display: flex;
    flex-direction: column-reverse;
  }
}
