/* =========================================
   Table Theme
========================================= */

.tbl-theme-2 {

  /* Colors */
  --tbl-bg: var(--clr-white);
  --tbl-header-bg: var(--clr-gray-100);
  --tbl-text: var(--clr-gray-dark);
  --tbl-border: #e5e7eb;

  /* Indicator */
  --indicator-height: 35px;
  --indicator-width: 146px;
  --indicator-radius: 999px;

  /* Spacing */
  --tbl-padding: 12px;
}


/* =========================================
   Table Structure
========================================= */

.tbl-theme-2 table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 5px 4px;
  font-size: 14px;
  color: var(--tbl-text);
  line-height: 1.14285714285;
}

.tbl-theme-2 thead th {
  background: var(--clr-white);
  padding: var(--tbl-padding);
  border-radius: 0;
  white-space: normal;
  vertical-align: top;
  font-weight: var(--fw-normal);
  border: none;
  color: var(--clr-gray-dark);
  position: relative;
}

.tbl-theme-2 thead th:first-child {
  text-align: left;
}

.tbl-theme-2 .th-label {
  position: relative;
  z-index: 1;
}

/* =========================================
   Table Body
========================================= */

.tbl-theme-2 tbody td {
  padding: 0;
  border: none;
}

.tbl-theme-2 tbody td:first-child {
  text-align: left;
  font-weight: 500;
  vertical-align: middle;
  text-align: right;
  padding: 4px 12px;
  background: var(--clr-gray-100);
}

/* =========================================
   Country Link
========================================= */
.td-link-col {
  position: relative;
}

.tbl-theme-2 tbody td:first-child a:hover {
  text-decoration: underline;
}

tr:not(:last-child) .td-link-col .td-link-wrap:after {
  position: absolute;
  content: "";
  width: 100%;
  height: 4px;
  top: 100%;
  left: 0;
  display: block;
  background: var(--clr-gray-100);
}

.td-link-wrap {
  display: flex;
  justify-content: flex-end;
}

.td-link-wrap a {
  text-decoration: none !important;
}

/* first td */
.tbl-theme-2 th,
.tbl-theme-2 tbody tr .td-link-col {
  background-color: var(--clr-white);
  border-radius: 0 !important;
}

.tbl-theme-2 th:before,
.tbl-theme-2 tbody tr .td-link-col:before {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  background: var(--clr-gray-100);
}

.tbl-theme-2 tbody tr:last-child .td-link-col:before {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.tbl-theme-2 tbody tr:first-child .td-link-col:before {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.tbl-theme-2 tr .td-link-col .td-link-wrap a {
  position: relative;
  z-index: 1;
}

.tbl-theme-2 th:before {
  border-radius: 8px;
  background: var(--tbl-header-bg)
}

/* white patch after first col */
.tbl-theme-2 tr>*:first-child {
  position: relative;
}

.tbl-theme-2 tr>*:first-child:after {
  content: "";
  position: absolute;
  height: 100%;
  width: 6px;
  top: 0;
  left: 100%;
  margin-left: -2px;
  background: var(--clr-white);
  z-index: -1;
}

.tbl-theme-2 tr>th:first-child:after {
  margin-left: 0px;
  width: 4px;
}

/* =========================================
   Score Indicator
========================================= */

.tbl-theme-2 .data-value--indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--indicator-height);
  width: var(--indicator-width);
  border-radius: var(--indicator-radius);
  background: var(--data-color, transparent);
  font-size: 0;
  transition: all 0.2s linear 0s;
  position: relative;
  overflow: hidden;
}

.tbl-theme-2 .data-value--indicator:hover {
  transform: scale(1.02);
  box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.1);
}

.data-value--indicator:after {
  content: "";
  background: rgba(0, 0, 0, 0.15);
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
}

.data-value--indicator:hover:after {
  opacity: 1;
}

/* =========================================
   sticky
========================================= */

.tbl-theme-2 tr>*:first-child {
  position: sticky;
  left: 0px;
  z-index: 2;
}

.tbl-theme-2 table {
  margin-left: -4px;
  margin-right: -4px;
}

/* =========================================
   Responsive
========================================= */

@media (max-width: 1024px) {

  .tbl-theme-2 table {
    font-size: 13px;
  }

  .tbl-theme-2 .data-value--indicator {
    height: 30px;
  }

}

@media (max-width: 767px) {
  .tbl-theme-2 .td-link-wrap a {
    font-size: 12px;
  }
}
