//.mh-table to .ninja_footable
//.table-wrapper to .ninja_table_wrapper

/* Table Styles */

.ninja_table_wrapper {
  margin-left: 5px;
  margin-right: 5px;
  margin-bottom: 50px;
  padding-bottom: 30px;
  overflow-x: auto;
  border: none;
  position: relative;
  //max-width: 100%;
  @include desktop-minus {
    margin-left: 0;
    margin-right: 0;
    td {
      min-width: 15ch;
    }
  }
  [class*="column"]+[class*="column"]:last-child {
    float: none;
  }
  .footable.mh-ninja-table_scrollable {
    @include desktop-minus {
      margin-top: 40px;
      &:before {
        content: "向右拖曳查看更多 >";
        display: block;
        text-align: right;
        font-size: 14px;
        padding: 0 0 10px;
        position: absolute;
        top: 10px;
        right: 0;
        color: #969696;
      }
    }
  }
  .footable.mh-ninja-table, .footable.ninja_footable.white {
    .input-group-btn, .input-group-btn.open {
      button {
        border: none;
        background: mhcolor(sharp-blue)!important;
        &:hover, &:focus {
          transform: none;
          background: mhcolor(blue)!important;
          color: white;
        }
      }
      input {
        box-shadow: none;
      }
      li {
        margin-left: 0;
      }
    }
    &:after {
      content: "製表：";
      display: block;
      font-size: 12px;
      background: url('https://blogassets.moneyhero.com.hk/wp-content/uploads/sites/3/2019/12/03182322/MH-h-logo-color.png');
      height: 22px;
      width: 140px;
      background-size: contain;
      background-repeat: no-repeat;
      background-position: right center;
      left: 0;
      position: absolute;
      bottom: 20px;
    }
  }
}
#page #primary #content .entry-content .footable.mh-ninja-table, #page #primary #content .entry-content .footable.ninja_footable.white {
  position: unset;
  border: 1px solid mhcolor(light-grey);
  width: calc(100% - 2px);
  background: none !important;
  border-collapse: collapse;
  background-color: white;
  box-shadow: 0 20px 20px -21px rgba(0, 0, 0, 0.2);
  td, th {
    padding: point(1);
    font-size: 14px;
    line-height: 150%;
    font-weight: normal;
    white-space: normal;
  }
  tbody {
    tr:nth-child(even) {
      background: #f8f8f8;
    }
    tr:nth-child(odd) {
      background: white;
    }
    tr:hover>td {
      background: #dfe8d7 !important;
      color: black !important;
      @include desktop-plus {
        border-color: transparent !important;
      }
    }
    tr.footable-detail-row:hover>td {
      background: mhcolor(grey) !important;
      color: inherit !important;
      @include desktop-plus {
        border-color: transparent !important;
      }
    }
    td {
      border-right: 1px solid #f8f8f8;
      &:last-child {
        border: none;
      }
      color: mhcolor(black);
      transition: all 0.2s ease;
      &>ul {
        margin: 0 auto;
        display: inline-grid;
      }
      &>ol {
        margin: 0 auto;
        display: inline-grid;
      }
    }
  }
  thead {
    .footable-header th {
      color: #ffffff;
      background: mhcolor(blue);
      text-transform: initial;
      border: none;
      min-width: 10ch;
    }
    .footable-filtering th {
      background: mhcolor(dark-blue) !important;
      border: none;
    }
  }
  tbody {
    th {
      background: mhcolor(blue) !important;
    }
  }
  .footable-detail-row>td {
    background: mhcolor(grey);
  }
  img {
    vertical-align: top;
  }
  a {
    text-decoration: underline;
    font-weight: bold;
  }
  tfoot .pagination {
    margin: 0;
    .footable-page.active a {
      background-color: mhcolor(blue)!important;
    }
    a:hover {
      background-color: mhcolor(sharp-blue)!important;
    }
  }
}