/**
 * @package Helix Ultimate Framework
 * @author JoomShaper https://www.joomshaper.com
 * @copyright Copyright (c) 2010 - 2018 JoomShaper
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/

body,
.sp-preloader {
  background-color: $bg_color;
  color: $text_color;
}

.sp-preloader {
  > div {
    background: $link_color;
    &:after {
      background: $bg_color;
    }
  }
}

#sp-top-bar {
  background: $topbar_bg_color;
  color: $topbar_text_color;
  a {
    color: $topbar_text_color;
  }
}

#sp-header {
  background: $header_bg_color;
}

// Anchor
a {
  color: $link_color;
  &:hover,
  &:focus,
  &:active {
    color: $link_hover_color;
  }
}

.tags {
  > li {
    display: inline-block;
    a {
      @if $link_color {
        background: fadeOut($link_color, 0.9);
      }
      color: $link_color;
      &:hover {
        background: $link_hover_color;
      }
    }
  }
}

.article-social-share {
  .social-share-icon {
    ul {
      li {
        a {
          color: $text_color;
          &:hover,
          &:focus {
            background: $link_color;
          }
        }
      }
    }
  }
}

.pager {
  > li {
    a {
      border: 1px solid #ededed;
      color: $text_color;
    }
  }
}

// Reading Progress Bar Color
.sp-reading-progress-bar {
  background-color: $link_color;
}

// Megamenu
.sp-megamenu-parent {
  > li {
    > a {
      color: $menu_text_color;
    }
    &:hover > a {
      color: $menu_text_hover_color;
    }
    &.active > a,
    &.active:hover > a {
      color: $menu_text_active_color;
    }
  }
  .sp-dropdown {
    .sp-dropdown-inner {
      background: $menu_dropdown_bg_color;
    }
    li.sp-menu-item {
      > a {
        color: $menu_dropdown_text_color;
        &:hover {
          color: $menu_dropdown_text_hover_color;
        }
      }
      &.active > a {
        color: $menu_dropdown_text_active_color;
      }
    }
  }
  .sp-mega-group {
    > li {
      > a {
        color: $menu_dropdown_text_color;
      }
    }
  }
}

// Off Canvas
#offcanvas-toggler {
  > .fa {
    color: $menu_text_color;
    &:hover,
    &:focus,
    &:active {
      color: $menu_text_hover_color;
    }
  }
}

.offcanvas-menu {
  background-color: $menu_dropdown_bg_color;
  color: $menu_dropdown_text_color;
  .offcanvas-inner {
    .sp-module {
      ul {
        > li {
          a,
          span {
            color: $menu_dropdown_text_color;
            &:hover,
            &:focus {
              color: $menu_dropdown_text_hover_color;
            }
          }
          &.menu-parent {
            > a,
            > .menu-separator {
              > .menu-toggler {
                @if $menu_dropdown_text_color {
                  color: fade-out($menu_dropdown_text_color, 0.5);
                }
              }
            }
          }
          ul {
            li {
              a {
                @if $menu_dropdown_text_color {
                  color: fade-out($menu_dropdown_text_color, 0.2);
                }
              }
            }
          }
        }
      }
    }
  }
}

//Button
.btn-primary,
.sppb-btn-primary {
  border-color: $link_color;
  background-color: $link_color;
  &:hover {
    border-color: $link_hover_color;
    background-color: $link_hover_color;
  }
}

// Topbar Social
ul.social-icons {
  > li {
    a {
      &:hover {
        color: $link_color;
      }
    }
  }
}

// Page Title
.sp-page-title {
  background: $link_color;
}

// Body Innerwrapper
.layout-boxed .body-innerwrapper {
  background: $bg_color;
}

// Module
.sp-module {
  ul {
    > li {
      > a {
        color: $text_color;
        &:hover {
          color: $link_color;
        }
      }
    }
  }
  .latestnews {
    > div {
      > a {
        color: $text_color;
        &:hover {
          color: $link_color;
        }
      }
    }
  }
  .tagscloud {
    .tag-name {
      &:hover {
        background: $link_color;
      }
    }
  }
}

// Search
.search {
  .btn-toolbar {
    button {
      background: $link_color;
    }
  }
}

// Footer
#sp-bottom-top,
#sp-footer,
#sp-bottom {
  background: $footer_bg_color;
  color: rgba($footer_text_color, 0.6);
  .text-color {
    color: $footer_text_color;
  }
  a {
    color: rgba($footer_link_color, 0.6);
    &:hover,
    &:active,
    &:focus {
      color: $footer_link_hover_color;
    }
  }
}

#sp-bottom {
  .sp-module-content {
    .latestnews {
      > li {
        > a {
          > span {
            color: $footer_text_color;
          }
        }
      }
    }
  }
}

// Comingsoon
.sp-comingsoon body {
  background-color: $link_color;
}

// Pagination
.pagination > li > a,
.pagination > li > span {
  color: #000;
  &:hover,
  &:focus {
    color: $text_color;
  }
}

.pagination > .active > a,
.pagination > .active > span {
  border-color: $link_color;
  background-color: $link_color;
  &:hover,
  &:focus {
    border-color: $link_color;
    background-color: $link_color;
  }
}

// Error
.error-code,
.coming-soon-number {
  color: $link_color;
}

//Template related css
body a {
  color: $text_color;
  &:hover,
  &:focus {
    color: $text_color;
  }
}

.hero-slider {
  div[class*="sp-slider-content-align"] {
    background-color: rgba($primary_color, 0.6);
  }
}

#sp-bottom-top .sppb-btn,
.sppb-btn {
  &.sppb-btn-primary {
    background-color: $link_color;
    &.sppb-btn-outline {
      border: 1px solid $link_color;
      color: $link_color;
      &:hover,
      &:focus {
        background-color: $link_color;
      }
    }
    &:hover,
    &:focus {
      background-color: darken($link_color, 10%);
    }
  }
  &.sppb-btn-default {
    color: $link_color;
    &:hover,
    &:focus {
      background-color: darken(#fff, 10%);
    }
    &.sppb-btn-outline {
      &:hover,
      &:focus {
        color: $link_color;
      }
    }
  }
  &.sppb-btn-link {
    color: $text_color;
    &.sppb-btn-primary-link {
      color: $link_color;
    }
  }
}

#sp-header {
  height: $header_height;
  .logo {
    height: $header_height;
    background-color: $primary_color;
  }
}

.login {
  .list-group {
    > a {
      color: $text_color;
    }
  }
}

.article-list {
  .article {
    .article-header {
      h1,
      h2 {
        a {
          color: $text_color;
          &:hover,
          &:active,
          &:focus {
            color: $text_color;
          }
        }
      }
    }
  }
}

.article-details {
  .article-ratings-social-share {
    border-top: 1px solid rgba($text_color, 0.1);
    border-bottom: 1px solid rgba($text_color, 0.1);
  }
}

.pager {
  border-top: 1px solid rgba($text_color, 0.15);
}

html.coming-soon {
  body {
    &:before {
      background-color: rgba($primary_color, 0.5);
    }
  }
}

html.error-page {
  .error-code {
    color: $text_color;
  }
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="date"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
select {
  &:not(.form-control) {
    color: $text_color;
    &::placeholder {
      color: rgba($text_color, 0.5);
    }
  }
}
textarea.sppb-form-control,
.sppb-form-group textarea.sppb-form-control {
  border-bottom: 1px solid rgba($text_color, 0.5);
  &::placeholder {
    color: rgba($text_color, 0.5);
  }
}

//common css classes
.primary-bg {
  background-color: $primary_color;
}
.secondary-bg {
  background-color: $secondary_color;
}
.primary-bg-op5 {
  background-color: rgba($primary_color, 0.5);
  .sppb-row-overlay {
    background-color: rgba($primary_color, 0.5);
  }
}
.primary-bg-op6 {
  background-color: rgba($primary_color, 0.6);
}
.primary-bg-op3 {
  background-color: rgba($primary_color, 0.3);
}
#sp-logo {
  .sp-column {
    a {
      color: $text_color;
    }
  }
}

.mod-languages {
  &:hover {
    form .chzn-container .chzn-single,
    &:before {
      color: $text_color;
    }
  }
  form {
    .chzn-container {
      .chzn-single {
        color: $text_color;
        border-bottom: 1px solid rgba($text_color, 0.3);
        &:hover,
        &:focus {
          color: $text_color;
          border-bottom-color: $text_color;
        }
      }
      &.chzn-container-active {
        .chzn-single {
          border-bottom-color: $text_color;
        }
      }
      .chzn-drop {
        color: $text_color;
        .chzn-results {
          li {
            &:hover,
            &:focus,
            &.result-selected {
              color: $link_color;
            }
          }
        }
      }
    }
  }
}

.hero-slider {
  div[class*="sp-slider-content-align"] {
    background-color: rgba($primary_color, 0.6);
  }
}

.req-a-call {
  .sppb-form-builder-btn {
    button {
      &:hover,
      &:focus {
        color: $link_color;
      }
    }
  }
}

.sppb-addon-testimonial {
  .sppb-addon-content {
    border-left: 3px solid $secondary_color;
    .sppb-addon-testimonial-review {
      border-bottom: 1px solid rgba($text_color, 0.1);
    }
  }
  &:hover {
    .sppb-addon-content {
      background-color: $secondary_color;
    }
  }
  .sppb-addon-testimonial-footer {
    .sppb-addon-testimonial-client-url,
    .sppb-addon-testimonial-client {
      color: $text_color;
    }
  }
}

.sppb-addon-form-builder:not(.req-a-call) {
  .sppb-form-control,
  .sppb-form-group .sppb-form-control {
    &::placeholder {
      color: rgba($text_color, 0.5);
    }
  }

  .form-builder-checkbox-item label::before,
  .form-builder-radio-item label::before,
  .sppb-form-check-label::before {
    border-color: $text_color;
  }
  .form-builder-checkbox-item input:checked + label::before,
  .form-builder-radio-item input:checked + label::before,
  .sppb-form-check-input:checked + label::before {
    background: $text_color;
    border-color: $text_color;
  }
  textarea.sppb-form-control {
    border-bottom: 1px solid rgba($text_color, 0.5);
  }
  .sppb-form-builder-btn {
    .sppb-btn {
      background-color: $secondary_color;
      &:hover,
      &:focus {
        background-color: lighten($secondary_color, 5%);
      }
    }
  }
}

.sppb-addon-persion .sppb-person-information > span.sppb-person-designation,
.sppb-addon-persion .sppb-person-information > span.sppb-person-email,
.sppb-addon-person .sppb-person-information > span.sppb-person-designation,
.sppb-addon-person .sppb-person-information > span.sppb-person-email {
  color: $text_color;
}

.sppb-addon-person {
  .person-content-show-on-hover {
    background: $link_color;
  }
}
.sppb-addon-ajax-contact {
  background-color: $secondary_color;
}
.sppb-addon-form-builder.contact-from-wrap {
  background-color: $secondary_color;
}
.bd-column-wrap {
  border: 1px solid $secondary_color;
}
.sp-simpleportfolio-view-items {
  .carousel-item {
    .sp-simpleportfolio-info {
      .sp-simpleportfolio-title {
        > a {
          color: $text_color;
          &:hover,
          &:focus {
            color: $text_color;
          }
        }
      }
    }
  }

  .sp-simpleportfolio-filter {
    ul {
      > li {
        &.active > a {
          border-bottom-color: $text_color;
        }
        &.active > a,
        > a {
          color: $text_color;
        }
      }
    }
  }
}
.sp-simpleportfolio-items {
  .sp-simpleportfolio-item {
    .sp-simpleportfolio-info {
      .sp-simpleportfolio-title > a {
        color: $text_color;
      }
    }
  }
}
.project-details-info-wrap {
  background-color: $secondary_color;
}
.megainc-custom-tab {
  .sppb-nav-custom {
    background-color: rgba($primary_color, 0.3);
    > li {
      > a {
        color: $text_color;
        &:hover,
        &:focus {
          border-left-color: $text_color !important;
          background-color: $secondary_color;
          color: rgba($text_color, 0.6);
        }
      }
      &.active > a {
        border-left-color: $text_color !important;
        background-color: $secondary_color;
        color: rgba($text_color, 0.6);
      }
    }
  }
}

.sppb-addon-articles {
  .sppb-addon-article {
    border-top: 3px solid $secondary_color;
    a {
      color: $text_color;
      &:hover,
      &:focus {
        color: $text_color;
      }
    }
    .sppb-article-info-wrap {
      h3 {
        a {
          color: $text_color;
          &:hover,
          &:focus {
            color: $text_color;
          }
        }
      }
      .sppb-article-meta {
        > span {
          color: $text_color;
        }
      }
    }
  }
}
.view-article {
  .article-details {
    .sppb-addon-text-block {
      blockquote {
        border-left: 3px solid $secondary_color;
      }
    }
    a {
      color: $text_color;
      &:hover,
      &:focus {
        opacity: 0.7;
      }
    }
  }
}
.categories-module.mod-list {
  a {
    color: $text_color;
    &:hover,
    &:focus {
      color: $text_color;
    }
  }
}
.social-icons-only {
  a {
    color: $text_color;
    &:hover,
    &:focus {
      color: $text_color;
    }
  }
}
input[type="text"],
input[type="email"],
input[type="url"],
input[type="date"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
select {
  &:not(.form-control) {
    border-bottom: 1px solid rgba($text_color, 0.5);
    &:focus {
      color: $text_color;
      border-bottom-color: $text_color;
    }
  }
}
textarea.sppb-form-control,
.sppb-form-group textarea.sppb-form-control {
  color: $text_color;
}

body.preset-white {
  .sppb-addon-testimonial:hover .sppb-addon-content {
    border-left-color: $link_color;
  }
  #sp-header .logo {
    background-color: $link_color;
  }
  #sp-menu-right {
    .sppb-btn.btn-white {
      border-color: $link_color;
      color: $link_color;
    }
  }
  .sppb-btn.preset-white-btn {
    background-color: $link_color;
  }
  .sp-simpleportfolio-view-items .carousel-control-prev,
  .sp-simpleportfolio-view-items .carousel-control-next {
    color: $text_color;
  }
  .megainc-custom-tab .sppb-nav-custom {
    background-color: $link_color;
  }
  .contact-from-wrap.gray-section {
    .sppb-form-builder-btn {
      button {
        background-color: $link_color;
      }
    }
  }
  &.com-users {
    #sp-main-body .sppb-btn.sppb-btn-default {
      background-color: $link_color;
    }
  }
}
