* {
  box-sizing: border-box !important;
}

.affi-wrap-my-account {
  width: 100% !important;
  margin: 0;
  max-width: 1000px !important;
  display: flex;
  justify-content: space-between;

  .affi-title {
    display: flex;
    justify-content: space-between;

    &.affi-title-tab-payout {
      display: grid;

      &.affi-title-grid-3 {
        grid-template-columns: 1fr 1fr 1fr;
      }

      &.affi-title-grid-2 {
        grid-template-columns: 1fr 1fr;
      }

      .affi-title-text-wrap {
        cursor: pointer;
        display: flex;
        justify-content: center;

        border: 1px solid transparent;
        box-shadow: 0 2px 5px 0 rgba(43, 50, 59, 0.18);

        h2 {
          margin: 5px 0;
          justify-content: center;
        }
      }

      .affi-inactive {
        background-color: #efefef;
      }
    }

    h2 {
      color: #000;
      display: flex;
      font-size: 24px;
      justify-content: space-between;
      line-height: 36px;
      margin-bottom: 12px;
    }

    .affi-title-rank-wrap {
      position: relative;

      .affi-rank-badge-wrap {
        width: 40px;
        height: auto;
        cursor: pointer;
      }

      .affi-rank-info-wrap {
        position: absolute;
        right: 0;
        width: 300px;
        border: 1px solid transparent;
        box-shadow: 0 2px 5px 0 rgba(43, 50, 59, 0.18);
        padding: 10px;
        background-color: #fff;
        border-radius: 5px;

        &.affi-hidden {
          display: none;
        }

        .affi-rank-achieve-wrap {
          text-align: center;
        }
      }
    }
  }

  .affi-data-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 15px;
    column-gap: 16px;
    padding-bottom: 20px;

    .affi-data-card {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      border-radius: 4px;
      flex-basis: 23%;
      background: #fff;
      border: 1px solid transparent;
      box-shadow: 0 2px 5px 0 rgba(43, 50, 59, .18);
      min-width: 100px;
      overflow: hidden;
      cursor: pointer;

      &.blueSty {
        border-bottom: 4px solid #026bff
      }

      &.graySty {
        border-bottom: 4px solid #ff9100
      }

      &.greenSty {
        border-bottom: 4px solid #00e676
      }

      &.yellowSty {
        border-bottom: 4px solid #ffea00
      }

      &.redSty {
        border-bottom: 4px solid #ff1744
      }

      &.defaultSty {
        background-color: transparent;
        border-bottom: 4px solid #fff;
        box-shadow: none
      }

      .affi-data-card-label {
        padding: 12px 16px 0;
        color: #2b323b;
        font-size: 16px;
        font-weight: 400;
        line-height: 1.5;
      }

      .affi-data-card-value {
        font-size: 24px;
        padding: 0 16px 16px;
      }
    }
  }

  .affi-card {
    background: #fff;
    border: 1px solid transparent;
    border-radius: 12px;
    box-shadow: 0 2px 5px 0 rgba(43, 50, 59, .18);
    min-width: 100px;
    overflow: hidden;

    .affi-card-body {
      padding: 12px 16px;

      .affi-hidden {
        display: none;
      }

      .affi-payment-info-wrap {

        .affi-payment-label-wrap {
          margin-bottom: 10px;
        }

        .affi-payment-default-wrap {

          .affi-payment-default-select {
            margin: 5px;
          }
        }

        .affi-payment-data-line-wrap {
          margin-bottom: 5px;

          .affi-payment-data-line-header {
            font-weight: bold;
          }

          .affi-payment-data-line-info {
            margin-bottom: 5px;

            .affi-payment-data-line-input {

              input {
                width: 100%;
              }

              select {
                width: 100%;
              }
            }
          }
        }

        .affi-payment-info-btn-wrap {
          cursor: pointer;
          color: #fff;
          opacity: 0.8;
          display: inline-block;
          font-size: inherit;
          padding: 8px 15px;
          margin: 10px 0 5px;
          border: 2px solid transparent;
          text-align: center;
          background: #475f85;
          -webkit-transition: all 0.3s ease-in-out;
          -o-transition: all 0.3s ease-in-out;
          transition: all 0.3s ease-in-out;
          will-change: transform;
        }
      }

      .affi-request-payout-wrap {

        .affi-payment-label-wrap {
          background-color: #edf4ff;
          border: 1px solid #3d8eff;
          box-shadow: none;
          padding: 8px 12px;
          border-radius: 6px;
        }

        .affi-request-line {
          display: grid;
          grid-template-columns: 1fr 3fr;
          margin-top: 10px;

          .affi-request-balance-label-wrap {
            align-content: center;
          }
        }

        .affi-request-balance-data-wrap {

          .affi-request-balance-data {
            padding: 5px 10px;
          }
        }

        .affi-request-payout-btn-wrap {
          cursor: pointer;
          color: #fff;
          opacity: 0.8;
          display: inline-block;
          font-size: inherit;
          padding: 8px 15px;
          margin: 10px 0 5px;
          border: 2px solid transparent;
          text-align: center;
          background: #82b735;
          -webkit-transition: all 0.3s ease-in-out;
          -o-transition: all 0.3s ease-in-out;
          transition: all 0.3s ease-in-out;
          will-change: transform;

          &.affi-disable {
            background-color: #bebebe;
            cursor: not-allowed;
          }
        }
      }
    }
  }

  ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
  }

  a {
    text-decoration: none;

    &.affi-active {
      font-weight: 700;
    }
  }

  .affi-column {

    &.affi-MyAccount-navigation {
      width: 25%;

      ul {
        li {
          list-style: none;
          padding: 1rem 0;

          &:first-child {
            padding-top: 0;
          }

          a {
            transition: all 0.3s ease;
            outline: none !important;

            &:hover {
              font-weight: bold;
            }
          }

        }
      }

    }

    &.affi-MyAccount-content {
      width: 74%;

      .affi-dashboard-time-header-wrap {
        display: grid;
        grid-template-columns: 1fr 3fr;

        .affi-dashboard-link-wrap {
          text-align: right;

          .affi-dashboard-link-copy {
            cursor: copy;
            height: 32px;
            width: fit-content;
            max-width: 80%;
          }
        }
      }
    }
  }

  .affi-card-products {
    padding: 5px !important;

    .affi-products-content-wrap {
      position: relative;

      .affi-products-filter-wrap {
        margin-bottom: 10px;
        display: grid;
        grid-template-columns: 1fr 1fr;

        .affi-products-catergory-wrap {
          text-align: left;

          .affi-products-catergory-input {
            height: 36px;
            width: 100%;
            border-color: rgba(0, 0, 0, 0.1);
          }
        }

        .affi-products-search-wrap {
          text-align: right;

          .affi-products-search-input {
            height: 36px;
            width: 100%;
            padding: 0 15px;
            border-color: rgba(0, 0, 0, 0.1);
          }
        }

      }

      .affi-products-results-wrap {
        min-height: 500px;

        .affi-products-result-loading-wrap {
          width: 100%;
          height: 100%;
          position: absolute;
          background-color: #fff;

          .affi-icon {
            width: fit-content;
            height: fit-content;
            position: absolute;
            top: 40%;
            left: 50%;
            transform: translateX(-50%) translateY(-50%);

            &:before {
              font-size: 30px;
            }
          }
        }

        .affi-products-results {
          display: grid;
          grid-gap: 10px;
          grid-template-columns: 1fr 1fr 1fr;

          .affi-product-block {
            display: flex;
            flex-direction: column;
            justify-content: space-between;

            .affi-product-earning-wrap {
              display: flex;

              .affi-product-earning-label {
                padding-right: 5px;
              }
            }

            .affi-product-promote-wrap {
              background-color: #026bff;
              border-radius: 6px;
              color: #fff;
              cursor: pointer;
              font-size: 14px;
              font-weight: 400;
              height: 32px;
              line-height: 32px;
              text-align: center;
              vertical-align: middle;
              width: 100%;
            }

            p {
              margin-bottom: 0;
              margin-top: 0;
            }
          }

          .affi-product-img-wrap {
            width: 100%;
            height: auto;

            img {
              width: 100%;
              height: auto;
            }
          }
        }
      }

      .affi-products-paging-wrap {
        margin-top: 10px;
        display: flex;
        justify-content: center;

        .affi-products-paging {
          margin: auto 0;

          .affi-product-paging-wrap {
            text-align: -webkit-right;

            .affi-product-paging {
              display: flex;
              width: fit-content;
            }

            .affi-product-pages {
              margin: auto;
              padding: 0 5px;
              font-size: 14px;
              line-height: 16px;
              color: #ABABAB;

              &:not(.affi-product-page-active) {
                cursor: pointer;
              }

              &:hover {
                color: #000000;
                text-decoration: underline;
              }

              &.affi-product-page-active {
                color: #000000;
                text-decoration: underline;
              }
            }

            .affi-product-pages-break {
              margin: auto;
              padding: 0 5px;
              font-size: 14px;
              line-height: 16px;
              color: #ABABAB;
            }
          }
        }
      }
    }
  }

  &.affi-is-wc-myaccount-page {
    flex-direction: column;

    .affi-column {
      &.affi-MyAccount-navigation {
        width: 100%;

        ul {
          display: flex;
          width: 100%;
          justify-content: space-around;
          align-items: center;

          li {
            padding: 0;
          }
        }
      }

      &.affi-MyAccount-content {
        width: 100%;
      }
    }
  }
}

.affi-general-reports-dashboard {
  background-color: white;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;

  .affi-dashboard-link-wrap {
    margin-bottom: 20px;

    h2 {
      margin: 0 0 20px 0;
      font-size: 23px;
    }

    div {
      display: flex;
      align-items: center;

      input {
        padding: 10px 0 10px 10px;
        margin: 0;
        height: 36px;
        background-color: #e3e3e3;
        border: 1px solid #e3e3e3;
        border-radius: 6px;
        font-size: 16px;
        outline: none !important;
        width: 100%;
        cursor: pointer;
      }
    }


  }

  .affi-select-time-range {

    .affi-select-time-group {
      display: flex;

      .affi-select-time-title {
        margin: 5px 0;
      }
    }

    .affi-custom-time-range {
      display: none;

      .affi-view-reports {
        margin-left: 10px;
        width: auto;
        height: 32px;
        border: solid 1px #a0a2ad;
        border-radius: 4px;
        outline: none !important;
        font-size: 13px;
        background-color: #ffffff;
        color: #333333;
        cursor: pointer;

        &:hover {
          color: #ffffff;
          background-color: #333333;
        }
      }
    }

    .affi-select-time-1 {
      width: 170px;
      max-width: 100%;

      .affi-select-time-report {
        width: 100%;
        height: 32px;
        border: solid 1px rgba(0, 0, 0, 0.2);
        border-radius: 4px;
        outline: none !important;
      }
    }

    .affi-custom-time-range-flex-layer {
      width: 100%;
      display: flex;
      font-size: 14px;

      .affi-input {
        margin-left: 10px;

        input {
          width: 100%;
          height: 32px;
          border: solid 1px rgba(0, 0, 0, 0.2);
          border-radius: 4px;
          outline: none !important;
        }
      }
    }
  }

  .affi-general-reports-group {
    margin-top: 20px;
    margin-bottom: 10px;
    display: flex;

    table {
      width: 100%;
      text-align: center;
      border-collapse: separate;
      border-spacing: 20px;
    }

    .affi-report-cell {
      text-align: center;
      width: 100%;
      border: 1px solid #ccc;
      border-radius: 3px;
      background: linear-gradient(to bottom, white, #fafbfc);
      padding: 10px;

      &:not(:first-child) {
        margin-left: 15px;
      }
    }

    h5 {
      font-weight: 500;
      margin: 0;
      margin-bottom: 5px;
    }

    table td div {
      margin: 0.5rem 0;
    }
  }

  .affi-my-account-chart-container {
    margin: auto;
    max-width: 100% !important;
    padding: 10px 0;

    .affi-my-account-total-chart {
      min-height: 200px;
    }
  }
}

.affi-table {
  display: flex;
  flex-direction: column;
  width: 100%;

  .affi-table-tr {
    display: flex;

    &.affi-row-empty {
      flex: 1 0 100%;
      align-items: center;
      justify-content: center;
    }

    .affi-table-empty {
      color: #a0a2ad;
      padding: 20px 0;
      text-align: center;
    }

    .affi-table-th {
      padding: 12px;
      background: #f1f2f4;
      border-bottom: 1px solid #e2e5e9;
      color: #818a98;
      font-weight: 500;
      text-align: left;
      flex: auto;

      &.affi-table-th-center {
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }

    .affi-table-td {
      padding: 12px;
      border-bottom: 1px solid #e2e5e9;
      background: #fff;
      color: #2b323b;
      font-size: 0.875rem;

      &.affi-table-td-center {
        display: flex;
        align-items: center;
        justify-content: center;

        &.affi-transaction-table__cell-products {
          display: block;

          .affi-table-order-line-product {
            padding-bottom: 5px;

            &:last-child {
              padding-bottom: 0;
            }
          }
        }
      }
    }

    .affi-notifications-table__header-title,
    .affi-notifications-table__cell-title {
      flex: 1 0 auto;

      .affi-table-notify-view {
        display: none;
        cursor: pointer;
        font-size: small;
        padding: 0 10px;
        color: #5974ff;
      }

      &:hover {

        .affi-table-notify-view {
          display: initial;
        }
      }
    }

    .affi-notifications-table__header-date,
    .affi-notifications-table__cell-date {
      flex: 0 0 220px;
    }

    .affi-notifications-table__header-actions,
    .affi-notifications-table__cell-actions {
      flex: 0 0 100px;
    }
  }

  .affi-account-paging-wrap {
    padding: 0 35px;
    align-self: center;

    .affi-account-paging {
      display: flex;
      width: fit-content;
    }

    .affi-account-pages {
      margin: auto;
      padding: 0 5px;
      font-size: 14px;
      line-height: 16px;
      color: #ABABAB;

      &:not(.affi-account-page-active) {
        cursor: pointer;
      }

      &:hover {
        color: #000000;
        text-decoration: underline;
      }

      &.affi-account-page-active {
        color: #000000;
        text-decoration: underline;
      }
    }

    .affi-account-pages-break {
      margin: auto;
      padding: 0 5px;
      font-size: 14px;
      line-height: 16px;
      color: #ABABAB;
    }
  }

  .affi-notify-detail-wrap {

    &.affi-hidden {
      display: none;
    }

    .affi-notify-detail-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 980;
      cursor: pointer;
      background-color: rgba(0, 0, 0, .75);
    }

    .affi-notify-detail-container {
      box-sizing: border-box;
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translateX(-50%) translateY(-50%);
      width: 500px;
      max-width: 90%;
      padding: 20px;
      border-radius: 5px;
      max-height: 90%;
      overflow-y: auto;
      z-index: 981;
      background-color: #FFFFFF;
      backface-visibility: hidden;
      border: 1px solid transparent;
      box-shadow: 0 2px 5px 0 rgba(43, 50, 59, 0.18);

      .affi-notify-loading-wrap {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #fff;

        .affi-icon {
          color: cornflowerblue;
          width: fit-content;
          position: absolute;
          top: 45%;
          left: 50%;
          scale: 2;
          transform: translateX(-50%) translateY(-50%);
        }
      }

      .affi-notify-detail-header-wrap {
        font-size: large;
        font-weight: bold;
        text-align: center;
      }

      .affi-notify-detail-body-wrap {

        .affi-notify-detail-line {
          display: grid;
          grid-template-columns: 1fr 3fr;
          padding: 15px 5px;
        }
      }
    }
  }

  &.affi-MyAccount-notifications {

    .affi-hidden {
      display: none;
    }
  }

  &.affi-MyAccount-transaction {

    .affi-table-tr {
      display: grid;
      grid-template-columns: 0.5fr 3fr 1fr 1fr 1fr 2fr;
    }

    .affi-transaction-paging-wrap {
      padding: 0 35px;
      align-self: center;

      .affi-transaction-paging {
        display: flex;
        width: fit-content;
      }

      .affi-transaction-pages {
        margin: auto;
        padding: 0 5px;
        font-size: 14px;
        line-height: 16px;
        color: #ABABAB;

        &:not(.affi-transaction-page-active) {
          cursor: pointer;
        }

        &:hover {
          color: #000000;
          text-decoration: underline;
        }

        &.affi-transaction-page-active {
          color: #000000;
          text-decoration: underline;
        }
      }

      .affi-transaction-pages-break {
        margin: auto;
        padding: 0 5px;
        font-size: 14px;
        line-height: 16px;
        color: #ABABAB;
      }
    }

    .affi-table-empty {
      text-align: center;
      padding: 10px 0;
    }
  }

  &.affi-MyAccount-payouts {

    .affi-table-tr {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr 2fr 2fr;
    }

    .affi-payout-paging-wrap {
      padding: 0 35px;
      align-self: center;

      .affi-payout-paging {
        display: flex;
        width: fit-content;
      }

      .affi-payout-pages {
        margin: auto;
        padding: 0 5px;
        font-size: 14px;
        line-height: 16px;
        color: #ABABAB;

        &:not(.affi-payout-page-active) {
          cursor: pointer;
        }

        &:hover {
          color: #000000;
          text-decoration: underline;
        }

        &.affi-payout-page-active {
          color: #000000;
          text-decoration: underline;
        }
      }

      .affi-payout-pages-break {
        margin: auto;
        padding: 0 5px;
        font-size: 14px;
        line-height: 16px;
        color: #ABABAB;
      }
    }

    .affi-table-empty {
      text-align: center;
      padding: 10px 0;
    }
  }

  .affi-payment-data-wrap {

    .affi-payment-data {
      width: 100%;
      min-height: 100px;
      height: auto;
    }
  }

  .affi-table-thead {
    display: flex;
    flex-direction: column;

    .affi-table-tr {

      .affi-table-th {
      }
    }
  }

  .affi-table-tbody {
    display: flex;
    flex-direction: column;

    .affi-table-tr {
      .affi-table-td {
      }
    }
  }
}

@media (max-width: 640px) {
  .affi-table {

    .affi-table-tr {
      .affi-table-th {
      }

      .affi-table-td {

      }
    }

    .affi-table-thead {

      display: none;

      .affi-table-tr {

        .affi-table-th {
        }
      }
    }

    .affi-table-tbody {
      padding: 0 !important;

      .affi-table-tr {
        display: flex !important;
        flex-direction: column;
        background-color: #fff;

        &:nth-child(2n) {
          background-color: #ccc;
        }

        .affi-table-td {
          //display: flex !important;
          //align-items: center;
          //justify-content: space-between;
          background: transparent;

          &:before {
            content: attr(data-title) ": ";
            font-weight: 700;
          }
        }
      }
    }
  }

  .affi-wrap-my-account {
    display: block;

    &.affi-is-wc-myaccount-page {
      .affi-column {

        &.affi-MyAccount-navigation {
          width: 100%;

          > ul {
            display: flex;
            flex-direction: column;
            align-items: flex-start;

            li {
              padding: 6px 0;

              &:first-child {
                padding: 0 0 6px;
              }
            }
          }
        }

        &.affi-MyAccount-content {
          width: 100%;
        }

        .affi-data-cards {
          row-gap: 5px;
          column-gap: 5px;
        }

        .affi-my-account-total-chart {
          min-height: 160px;
        }

        .affi-data-cards {
          .affi-data-card {
            flex-basis: 49%;
          }
        }
      }
    }


  }

  .affi-general-reports-dashboard {

    .affi-dashboard-time-header-wrap {
      width: 100%;
      grid-template-columns: 1fr 1fr !important;

      .affi-select-time-range {

        .affi-select-time-group {

          .affi-select-time-1 {
            width: 100%;

            .affi-select-time-report {
              padding: 0 5px 0 2px;
            }
          }
        }
      }

      .affi-dashboard-link-wrap {

        .affi-dashboard-link-copy {
          width: 100%;
        }
      }
    }
  }

  .affi-card-body-payout {
    overflow-x: auto;
  }

  .affi-card-body-notification {
    overflow-x: auto;
  }

  .affi-card-body-transaction {
    overflow-x: auto;
    padding: 0 !important;
  }

  .affi-card-products {
    //overflow-x: auto;

    .affi-products-content-wrap {

      .affi-products-results-wrap {

        .affi-products-results {
          display: block !important;

          .affi-product-img-wrap {
            width: 100%;
            height: auto;

            img {
              width: 100%;
              height: auto;
            }
          }

          .affi-product-block {
            padding-bottom: 10px;
          }
        }
      }
    }
  }

}