/**  =====================
    Customize css start
==========================  **/

$style-block-width: 375px;

.menu-styler {
  z-index: 1029;
  position: relative;

  &.open {
    .style-block {
      right: 0;
      box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    }
  }

  .style-block {
    position: fixed;
    top: 0;
    right: -#{$style-block-width};
    width: $style-block-width;
    height: 100vh;
    background: $white;
    z-index: 1079;
    transition: 0.3s ease-in-out;

    .customize-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1.25rem 1.25rem;
    }

    @media (max-width: 576px) {
      right: -280px;
      width: 280px;
    }
  }
}

@media (max-width: 600px) {
  .menu-styler {
    .style-block {
      width: 280px;
    }

    &.open {
      .pct-c-btn {
        > a {
          right: 280px;
        }
      }
    }
  }
}

.pct-c-btn {
  display: block;
  padding: 0px;
  border-right: none;
  position: fixed;
  overflow: hidden;
  right: 10px;
  top: 200px;
  z-index: 1030;
  transition: all 0.15s ease-in-out;
  border-radius: 50% 50% 4px 50%;
  box-shadow: 0 12px 14px rgba(103, 58, 183, 0.3);
  background: #673ab7;

  a {
    padding: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.08s cubic-bezier(0.37, 0.24, 0.53, 0.99);

    i {
      font-size: 24px;
      display: block;
      animation: anim-rotate 2.5s infinite linear;
      line-height: 24px;
      color: $white;
    }

    &:hover {
      background-color: rgba(33, 150, 243, 0.1);
    }
  }
}

@keyframes anim-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.pct-tabs {
  background: rgba(var(--bs-primary-rgb), 0.06);
  border-top: 1px solid $border-color;
  border-bottom: 1px solid $border-color;

  .nav-link {
    border-radius: 0px;
    background: transparent;
    font-size: 24px;
    border: none;
    color: var(--bs-body-color);
    position: relative;
    padding: 12px 16px;

    &::after {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      bottom: 1px;
      height: 0;
      background: $primary;
    }
  }

  .nav-link.active,
  .nav-item.show .nav-link {
    background: transparent;
    color: $primary;

    &::after {
      height: 2px;
    }
  }
}

.list-group-item {
  padding: 16px;
}

.preset-btn {
  border: 2px solid var(--bs-gray-300);
  --bs-btn-active-border-color: var(--bs-gray-300);

  &:hover {
    border-color: $primary;
  }

  &:active,
  &.active {
    border-color: $primary;
  }
}

.theme-color.preset-color {
  display: flex;
  position: relative;
  padding: 0;
  width: 100%;
  flex-wrap: wrap;
  padding: 0 8px 8px;

  > a {
    position: relative;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.15s ease-in-out;
    margin-right: 10px;
    margin-top: 10px;
    width: 48px;
    height: 48px;
    flex: none;

    &::after {
      content: '';
      position: absolute;
      top: 4px;
      left: 4px;
      right: 4px;
      bottom: 4px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.5);
      z-index: 1;
      transform: scale(0);
      transition: all 0.15s ease-in-out;
    }

    i {
      font-size: 27px;
      font-weight: 600;
      color: #fff;
      transform: scale(0);
      transition: all 0.15s ease-in-out;

      &::before {
        position: relative;
        z-index: 5;
      }
    }

    &:hover {
      &::after {
        transform: scale(1);
      }
    }

    &.active {
      &::after,
      i {
        transform: scale(1);
      }
    }
  }

  &.preset-color {
    $i: 1;

    @each $name, $value in $preset-colors {
      > a {
        &[data-value='preset-#{$i}'] {
          background: linear-gradient(135deg, map-get($value, 'primary') 50%, map-get($value, 'secondary') 50%);
        }
      }

      $i: $i + 1;
    }
  }
}

.theme-color {
  .btn-label {
    margin: 5px 0 14px 20px;
    position: relative;
    display: block;
    text-align: left;

    &::before,
    &::after {
      content: '';
      position: absolute;
      left: -20px;
      top: -1px;
      width: 16px;
      height: 16px;
      border-radius: 50%;
    }

    &::before {
      background: $primary;
      transform: scale(0);
    }

    &::after {
      border: 2px solid $border-color;
    }
  }

  .pc-lay-icon {
    position: relative;
    width: 35px;
    height: 25px;
    border-radius: 3px;
    display: inline-block;
    background: $body-bg;
    overflow: hidden;
    border: 1px solid $border-color;

    span {
      position: absolute;
      display: flex;
      align-items: center;
      justify-content: center;

      &:nth-child(1),
      &:nth-child(3) {
        width: 32%;
        left: 0;
      }

      &:nth-child(1) {
        background: $white;
      }

      &:nth-child(3) {
        background: $white;
      }

      &:nth-child(2),
      &:nth-child(4) {
        z-index: 1;
        width: 70%;
        left: auto;
        right: 0;
        background: $body-bg;
      }

      &:nth-child(1),
      &:nth-child(2) {
        top: 0;
        height: 35%;
      }

      &:nth-child(3),
      &:nth-child(4) {
        top: auto;
        bottom: 0;
        height: 75%;
      }

      &:nth-child(2) {
        background: $white;
      }
    }
  }
}

.theme-layout {
  .btn {
    i {
      font-size: 26px;
    }
  }
}

.customize-body {
  position: relative;
  height: calc(100% - 140px);
}

.preset-btn {
  padding: 3px;
  width: 100%;
  line-height: 0;
  border-radius: 7px;

  .pc-lay-icon {
    width: 100%;
    height: 35px;
    min-width: 50px;
  }

  &.size {
    width: 50px !important;
    height: 50px;
  }

  &.active {
    border-color: $primary;

    .btn-label {
      &::before {
        background: $primary;
        transform: scale(0.5);
      }

      &::after {
        border-color: $primary;
      }
    }
  }
}

.theme-layout {
  .btn[data-value='false'] {
    .pc-lay-icon {
      span {
        &:nth-child(1),
        &:nth-child(3) {
          background: lighten($dark, 8%);
        }

        &:nth-child(2),
        &:nth-child(4) {
          background: $dark;
        }
      }
    }
  }

  .btn[data-value='true'] {
    .pc-lay-icon {
      span {
        &:nth-child(1),
        &:nth-child(3) {
          background: $white;
        }

        &:nth-child(2),
        &:nth-child(4) {
          background: $body-bg;
        }
      }
    }
  }
}

.theme-sidebar-color {
  .btn[data-value='false'] {
    span:not(.btn-label) {
      &:nth-child(1),
      &:nth-child(3) {
        background: $white;
      }
    }
  }

  .btn[data-value='true'] {
    .pc-lay-icon {
      span {
        &:nth-child(1),
        &:nth-child(3) {
          background: $dark;
        }
      }
    }
  }
}

.theme-nav-caption {
  .btn span {
    &:nth-child(3) {
      flex-direction: column;

      span {
        position: absolute;
        background: $indigo-500;
        height: 4px;
        width: 40% !important;
        left: 0 !important;
        border-radius: 3px;

        &:before,
        &:after {
          border-radius: 3px;
          content: '';
          position: absolute;
          left: 0;
          background: $list-group-color;
          height: 3px;
          width: 150%;
        }

        &:before {
          top: 5px;
        }

        &:after {
          top: 10px;
        }

        &:nth-child(2) {
          top: 15px;
        }
      }
    }
  }

  .btn[data-value='false'] span {
    &:nth-child(3) {
      span {
        background: transparent;
      }
    }
  }
}

.theme-direction {
  .btn[data-value='true'] {
    .pc-lay-icon {
      span {
        &:nth-child(1),
        &:nth-child(3) {
          left: auto;
          right: 0;
        }

        &:nth-child(2),
        &:nth-child(4) {
          left: 0;
          right: auto;
        }
      }
    }
  }
}

.theme-container {
  .btn span {
    &:nth-child(4) {
      padding: 5px;

      &:after {
        content: '';
        position: absolute;
        left: 0;
        background: rgba(0, 0, 0, 0.15);
        height: 100%;
        width: 100%;
      }

      > span {
        border-radius: 3px;
        position: relative;
        z-index: 5;
        background: var(--bs-offcanvas-bg);
        height: 100%;
        width: 100%;
      }
    }
  }

  .btn[data-value='true'] span {
    &:nth-child(4) {
      > span {
        width: 60%;
      }
    }
  }
}

.theme-font-style {
  padding: 8px;

  .form-check {
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 8px;

    .form-check-label {
      padding: 13px 18px;
      border-radius: var(--bs-border-radius);
      border: 1px solid $border-color;
      display: flex;
    }

    .form-check-input {
      display: none;

      &:checked {
        ~ .form-check-label {
          border-color: #2689e2;
          box-shadow:
            0 0 0 1px rgba(33, 150, 243, 1),
            0 0 0 6px rgba(33, 150, 243, 0.12);
        }
      }
    }
  }
}

.pc-box-width {
  @include media-breakpoint-down(xl) {
    display: none;
  }
}

/**  =====================
     Customize css end
  ==========================  **/
