@use "../../utils" as *;

/*----------------------------------------*/
/*  5.3 sidebar
/*----------------------------------------*/

// Sidebar rr-sticky
.sidebar-rr-sticky {
  position: sticky;
  top: 120px;
  
  @media #{$xs, $sm, $md, $lg} {
    margin-top: 50px;
  }
}
// Sidebar Widget
.sidebar__widget {
  &:not(:last-child) {
    margin-bottom: 30px;
  }
}

.sidebar__widget {
  padding: 30px;
  @include border-radius(10px);
  background: var(--rr-common-white);
  border-radius: 20px;
  box-shadow: 0px 0px 60px rgba(0, 0, 0, 0.05);

  @media #{$md, $sm, $xs} {
    margin-top: 50px;
  }
  
  &-title {
    font-family: var(--rr-ff-heading);
    color: var(--rr-heading-primary);
    font-weight: var(--rr-fw-bold);
    line-height: var(--rr-lh-h5);
    font-size: 22px;
    font-style: normal;
    border-bottom: 1px solid #E3DBD8;
    padding-bottom: 15px;
    
    &__have-bar {
      position: relative;
    }
  }
  
  &-service {
    display: flex;
    flex-direction: column;
    gap: 17px;
    
    a {
      padding-bottom: 20px;
      display: flex;
      gap: 10px;
      align-items: center;
      font-size: 18px;
      line-height: 27px;
      border-bottom: 1px solid rgba(0, 15, 32, 0.10);;
      color: var(--rr-heading-primary);
      
      &:last-child {
        padding-bottom: 0;
        border-bottom: 0;
      }
      
      &:hover {
        color: var(--rr-theme-primary);
      }
      
      i {
        color: var(--rr-theme-primary);
        font-size: 14px;
        font-style: normal;
        font-weight: 900;
        line-height: normal;
      }
    }
  }
  
  &-download {
    display: flex;
    flex-direction: column;
    gap: 20px;
    
    a {
      padding: 11.5px 20px;
      display: flex;
      gap: 10px;
      align-items: center;
      font-size: 16px;
      line-height: 25px;
      @include border-radius(4px);
      border: 1px solid rgba(0, 15, 32, 0.10);
      color: var(--rr-heading-primary);
      
      img {
        max-width: 15px;
      }
      
      &:hover {
        background-color: var(--rr-theme-primary);
        color: var(--rr-common-white);
        
        img {
          filter: brightness(0) invert(1);
        }
      }
    }
  }
  
  &-search {
    .search__bar {
      height: 50px;
      width: 100%;
      position: relative;
      @include border-radius(4px);

      input {
        height:100%;
        padding: 14px 35px 14px 20px;
        width: 100%;
        @include border-radius(30px);
        border: 1px solid #E3DBD8;
        background: var(--rr-common-white);
        color: var(--rr-text-body);
        font-family: var(--rr-ff-body);
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
        line-height: 10px;
        margin-left: 0;
      }

      button {
        position: absolute;
        left: 18px;
        padding: 0;
        height: 100%;
        line-height:0;
        
        &:hover {
          svg path[stroke="#525257"] {
            stroke: var(--rr-theme-primary);
          }
        }
      }
      .icon{
        position: absolute;
        top: 20%;
        right: 5px;
        transform: translate(-50%);
      }
    }
  }
  
  &-category {
    display: flex;
    flex-direction: column;
    gap: 12px;
  
    a {
      display: flex;
      align-items: center;
      gap: 10px;
      justify-content: space-between;
      color: var(--rr-heading-primary);
      font-size: var(--rr-fs-body2);
      font-style: normal;
      font-weight: 400;
      line-height: normal;
      
      span:first-child {
        display: flex;
        align-items: center;
      }
      
      &:hover {
        color: var(--rr-theme-primary);
        
        span:first-child {
          svg circle[fill="#525257"] {
            fill: var(--rr-theme-primary);
          }
        }
      }
    }
  }
  
  &-tags {
    .tags {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      
      a {
        display: block;
        padding: 5px 10px;
        @include border-radius(30px);
        background: var(--rr-common-white);
        border: 1px solid rgba(0, 15, 32, 0.10);
        font-size: 13px;
        font-style: normal;
        font-weight: 400;
        line-height: 22px;
        
        &:hover {
          color: var(--rr-common-white);
          background: var(--rr-theme-primary);
        }
      }
    }
  }
  
  &-have_any_question {
    padding:30px;
    @include border-radius(10px);
    background: var(--rr-theme-primary);
    box-shadow: 0px 1px 3px 0px rgba(0, 15, 32, 0.10);
    background-repeat: no-repeat;
    background-size: cover;
    
    &-space {
      padding: 0;
      @include border-radius(0px);
      box-shadow: none;
    }
    
    &-media {
      padding-left: 41px;
      margin-top: -93px;
      margin-bottom: -30px;
      margin-right: -30px;
      max-width: 367px;
    }
    
    h3 {
      margin-bottom: 5px;
    }
    
    p {
      max-width: 275px;
      opacity: 0.8;
      color: var(--rr-common-white);
    }
    
    .rr-btn {
      .text-one {
        color: var(--rr-heading-primary);
      }
    }
  }
  
  .sidebar-post {
    margin-bottom: 20px;
    &:last-child {
      margin-bottom: 0;
    }
    
    display: flex;
    gap: 18px;
    align-items: center;

    @media #{$lg, $md} {
      flex-wrap: wrap;
    }
    
    &_thumb {
      width: 90px;
      overflow: hidden;
      height: 90px;
      min-width:90px;
      min-height: 90px;
      @include border-radius(20px);
      
      img {
        width:100%;
        height:100%;
        object-fit: cover;
      }
      
      &:hover {
        img {
          @include transform(scale(1.2));
        }
      }
    }
    
    &_content {
      max-width: 186px;
      
      @media #{$lg, $md, $sm, $xs} {
        max-width: 100%;
      }
      
      .post-meta {
        margin-bottom: 6px;
        
        li {
          font-family: var(--rr-ff-body);
          color: var(--rr-text-body);
          font-weight: var(--rr-fw-regular);
          line-height: var(--rr-lh-h5);
          display: flex;
          gap: 10px;
          align-items: center;
          font-size: 16px;
          font-style: normal;
          @media #{$mxm} {
            font-size: 12px;
          }
          
          i {
            color: var(--rr-theme-primary);
          }
        }
      }
      
      h3 {
        font-family: var(--rr-ff-heading);
        color: var(--rr-heading-primary);
        font-weight: var(--rr-fw-sbold);
        line-height: 28px;
        font-size: 18px;
        font-style: normal;

        @media #{$mxs} {
          font-size: 13px;
          line-height: 20px;
        }
      }
      
      a {
        &:hover {
          
          h3 {
            color: var(--rr-theme-primary);
          }
        }
      }
    }
  }
}
