@import 'variables';
@import 'theme-colors';

// SCSS For Horizontal Tab
.horizontal-tab {
  .nav-tabs {
    border-bottom: 1px solid var(--default-border-color);

    .nav-item {
      margin-bottom: -2px !important;
      color: var(--default-font-color);
      padding: $default-padding-margin;

      &:hover {
        color: $brand-color;
      }

      &.active {
        color: $brand-color;
        border-bottom: 3px solid $brand-color;
      }

      svg {
        width: 16px;
        height: 16px;
      }
    }
  }

  .tab-content {
    padding: $default-padding-margin;
  }
}

// SCSS For Vertical Tab
.vertical-tab {
  display: flex;

  .tab-menu {
    width: 270px;
    flex-shrink: 0;
    border-radius: $default-radius;
    margin: 0 $default-padding-margin 0 0;
    box-shadow: var(--default-box-shadow);
    background-color: var(--default-card-bg);

    .tab-icon {
      height: 90px;
      position: relative;
      background-color: var(--vertical-tab-header-bg);
      border-radius: $default-radius $default-radius 0 0;

      .tab-icon-wrapper {
        position: absolute;
        bottom: -30px;
        left: 50%;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translateX(-50%);
        box-shadow: var(--vertical-tab-icon-shadow);
        background-color: var(--vertical-tab-icon-bg);

        svg {
          width: 30px;
          height: 30px;
          stroke-width: 1.5;
          color: $brand-color;
        }
      }
    }

    .nav-pills {
      display: flex;
      flex-direction: column;
      padding: $default-padding-margin;

      .nav-link {
        padding: 0.75rem 0;
        color: $muted-color;
        display: flex;
        align-items: center;
        justify-content: space-between;


        &:after {
          opacity: 0;
          content: '\f054';
          display: inline-block;
          font: normal normal 600 $sidebar-arrow-font-size/1 'Font Awesome 5 Free';
          transition: $default-transition-duration $action-transition-timing-function;
        }

        &:hover {
          color: var(--default-font-color);

          &:after {
            opacity: 1;
          }
        }

        &.active {
          color: $primary-color;
          background-color: transparent;

          &:after {
            opacity: 1;
          }
        }
      }
    }
  }

  .tab-content {
    flex-grow: 1;
    border-radius: $default-radius;
    box-shadow: var(--default-box-shadow);
    background-color: var(--default-card-bg);

    .tab-pane {
      .title {
        height: 90px;
        display: flex;
        margin-bottom: 0;
        align-items: center;
        font-weight: normal;
        padding: 0 $default-padding-margin;
        border-bottom: 1px solid var(--default-border-color);
      }

      .content {
        padding: $default-padding-margin;
      }
    }
  }

  @media (max-width: 767px) {
    flex-direction: column;

    .tab-menu {
      width: 100%;
      margin-bottom: $default-padding-margin/2;

      .nav-pills {
        flex-direction: row;

        .nav-link {
          padding: 0.75rem 1rem;

          &:after {
            display: none;
          }

          &:first-child {
            padding-left: 0;
          }
        }
      }
    }
  }
}

// SCSS For RTL Layout
[dir="rtl"] {
  .vertical-tab {
    .tab-menu {
      margin: 0 0 0 $default-padding-margin;

      .nav-pills {
        .nav-link {
          &:after {
            content: '\f053';
          }
        }
      }
    }

    @media (max-width: 767px) {
      .tab-menu {
        .nav-pills {
          .nav-link {
            &:first-child {
              padding-right: 0;
              padding-left: 1rem;
            }
          }
        }
      }
    }
  }
}

