/*!
 * Blesta Table Override
 * Meng-override tabel Atlantis & Bootstrap
 * Full Bootstrap Icons
 * @author Phillips Data, Inc.
 */

/* ============================================ */
/* RESET ATLANTIS TABLE DEFAULTS               */
/* ============================================ */

/* Override padding & height Atlantis */
.table td,
.table th {
  padding: 5px !important;
  height: auto !important;
  font-size: 0.95rem !important;
  border-color: #e1e1e1 !important;
  vertical-align: middle !important;
}

/* Override Atlantis thead */
.table thead th {
  font-weight: bold !important;
  border-bottom-width: 0 !important;
}

/* ============================================ */
/* BLESTA TABLE STYLING                        */
/* ============================================ */
table {
  border: 1px solid #e1e1e1 !important;
}

.table {
  -webkit-border-horizontal-spacing: 0px !important;
  -webkit-border-vertical-spacing: 0px !important;
}

.table > thead > tr > th {
  border-bottom: none !important;
  font-size: 12px !important;
  font-weight: bold !important;
  color: #5a6268 !important;
  background: #f8f9fa !important;
  position: relative;
  behavior: url(../javascript/PIE.htc);
}

.table > thead > tr > th > a,
.table > thead > tr > th > a:hover,
.table > thead > tr > th > a:focus {
  color: #5a6268 !important;
  text-decoration: underline !important;
}

/* ============================================ */
/* TABLE RESPONSIVE                            */
/* ============================================ */
.table-responsive {
  width: 100% !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: -ms-autohiding-scrollbar;
  padding-bottom: 0 !important;
}

.table-responsive .table tr,
.table-responsive .table td,
.table-responsive .table th {
  white-space: nowrap;
}

/* ============================================ */
/* TABLE CURVED                                */
/* ============================================ */
.table-curved {
  border-collapse: separate !important;
  border-radius: 4px !important;
  border-left: 0px !important;
  margin-bottom: 2px !important;
}

.table-curved td,
.table-curved th {
  border-left: 1px solid #e1e1e1 !important;
  border-top: 1px solid #e1e1e1 !important;
}

.table-curved th {
  border-top: none !important;
}

.table-curved th:first-child { border-radius: 4px 0 0 0 !important; }
.table-curved th:last-child { border-radius: 0 4px 0 0 !important; }
.table-curved th:only-child { border-radius: 4px 4px 0 0 !important; }
.table-curved tr:last-child td:first-child { border-radius: 0 0 0 4px !important; }
.table-curved tr:last-child td:last-child { border-radius: 0 0 4px 0 !important; }
.table-curved thead tr:first-child td:first-child { border-radius: 4px 0 0 0 !important; }
.table-curved thead tr:first-child td:last-child { border-radius: 0 4px 0 0 !important; }
.table-curved thead tr:not(:first-child) td { border-radius: 0 !important; }
.table-curved tbody > tr > td { border-left: 1px solid transparent !important; }
.table-curved tbody > tr > td:first-child { border-left: 1px solid #e1e1e1 !important; }

.table-curved .form-group { margin-bottom: 0 !important; }

/* ============================================ */
/* TABLE STRIPED                               */
/* ============================================ */
.table-striped td,
.table-striped th {
  border-top: 0 !important;
  border-bottom: 0 !important;
}

.table-striped > tbody > tr:nth-child(2n+1) > td,
.table-striped-alt > tbody > tr:nth-child(2n+1) > td,
.table-striped > tbody > tr:nth-child(2n+1) > th,
.table-striped-alt > tbody > tr:nth-child(2n+1) > th {
  background-color: #ffffff !important;
}

.table-striped > tbody > tr:nth-child(2n) > td,
.table-striped-alt > tbody > tr:nth-child(2n) > td,
.table-striped > tbody > tr:nth-child(2n) > th,
.table-striped-alt > tbody > tr:nth-child(2n) > th {
  background-color: #f9f9f9 !important;
}

.table-striped-alt > tbody > tr:nth-child(4n+3) > td,
.table-striped-alt > tbody > tr:nth-child(4n+3) > th {
  background-color: #f9f9f9 !important;
}

/* ============================================ */
/* TABLE HEAD BACKGROUND STATES (override)     */
/* ============================================ */
.table-head-bg-default thead th,
.table-striped-bg-default tbody tr:nth-of-type(odd) {
  background: #1a2035 !important;
  color: #ffffff !important;
  border: 0px !important;
}

.table-head-bg-primary thead th,
.table-striped-bg-primary tbody tr:nth-of-type(odd) {
  background: #1572e8 !important;
  color: #ffffff !important;
  border: 0px !important;
}

.table-head-bg-secondary thead th,
.table-striped-bg-secondary tbody tr:nth-of-type(odd) {
  background: #6861ce !important;
  color: #ffffff !important;
  border: 0px !important;
}

.table-head-bg-info thead th,
.table-striped-bg-info tbody tr:nth-of-type(odd) {
  background: #48abf7 !important;
  color: #ffffff !important;
  border: 0px !important;
}

.table-head-bg-success thead th,
.table-striped-bg-success tbody tr:nth-of-type(odd) {
  background: #31ce36 !important;
  color: #ffffff !important;
  border: 0px !important;
}

.table-head-bg-warning thead th,
.table-striped-bg-warning tbody tr:nth-of-type(odd) {
  background: #ffad46 !important;
  color: #ffffff !important;
  border: 0px !important;
}

.table-head-bg-danger thead th,
.table-striped-bg-danger tbody tr:nth-of-type(odd) {
  background: #f25961 !important;
  color: #ffffff !important;
  border: 0px !important;
}

/* ============================================ */
/* TABLE BORDERED STATES                       */
/* ============================================ */
.table-bordered-bd-default td,
.table-bordered-bd-default th {
  border: 1px solid #1a2035 !important;
}

.table-bordered-bd-primary td,
.table-bordered-bd-primary th {
  border: 1px solid #1572e8 !important;
}

.table-bordered-bd-secondary td,
.table-bordered-bd-secondary th {
  border: 1px solid #6861ce !important;
}

.table-bordered-bd-info td,
.table-bordered-bd-info th {
  border: 1px solid #48abf7 !important;
}

.table-bordered-bd-success td,
.table-bordered-bd-success th {
  border: 1px solid #31ce36 !important;
}

.table-bordered-bd-warning td,
.table-bordered-bd-warning th {
  border: 1px solid #ffad46 !important;
}

.table-bordered-bd-danger td,
.table-bordered-bd-danger th {
  border: 1px solid #f25961 !important;
}

/* ============================================ */
/* TABLE FULL WIDTH                            */
/* ============================================ */
.table-full-width {
  margin-left: -15px;
  margin-right: -15px;
}

/* ============================================ */
/* TABLE EXPANDABLE ROWS (Bootstrap Icons)     */
/* ============================================ */
tr.expand { cursor: pointer; }

tr.expand td:last-of-type {
  padding-right: 30px !important;
}

tr.expand td:last-of-type::after {
  content: '\F282';                    /* bi-chevron-down */
  font-family: "bootstrap-icons" !important;
  font-weight: normal !important;
  display: block;
  float: right;
  margin-right: -20px;
  margin-top: 2px;
}

tr.expand.expanded td:last-of-type::after {
  content: '\F286';                    /* bi-chevron-up */
}

tr.expand_details { display: none; }

.table > tbody > tr.expand_details > td,
.table > tbody > tr.expand_details > td:hover {
  background-color: #f8f9fa !important;
  border-top: 2px solid #ccc !important;
}

.table > tbody > tr.expand_details td .alert {
  margin-bottom: 0 !important;
}

/* ============================================ */
/* TABLE MULTI HEADING                         */
/* ============================================ */
.table.multi_heading .email_header {
  background-color: #f8f9fa !important;
}

.table.multi_heading .email_header td:first-child {
  width: 80px !important;
  font-weight: bold !important;
}

.table.multi_heading .body {
  word-wrap: break-word;
  word-break: break-word;
}

/* ============================================ */
/* TABLE SORTING ICONS (Bootstrap Icons)       */
/* ============================================ */
th > a.asc:after {
  content: " \F286";                  /* bi-chevron-up */
  font-family: "bootstrap-icons" !important;
  font-weight: normal !important;
  text-decoration: none;
}

th > a.desc:after {
  content: " \F282";                  /* bi-chevron-down */
  font-family: "bootstrap-icons" !important;
  font-weight: normal !important;
  text-decoration: none;
}

/* ============================================ */
/* TOTAL SUMMARY TABLE                         */
/* ============================================ */
.total-summary h4 { margin: 0; }

.total-summary .table,
.total-summary .table tbody > tr,
.total-summary .table tbody > tr > td {
  border: none !important;
}

/* ============================================ */
/* CART SUMMARY TABLE                          */
/* ============================================ */
.cart-summary table,
.cart-summary .table > tbody > tr > td {
  border: none !important;
}

.totals tbody > tr > td {
  padding-top: 2px !important;
  padding-bottom: 2px !important;
}