/**
 * Table Visual Enhancements for Stats Theme
 *
 * This file adds visual styling on top of the base table styles
 * provided by the stats_migrate module.
 *
 * Includes: colors, typography, refined spacing
 */
.stats-tabs .tab-container {
  position: relative;
}
.stats-tabs .tab-headers-bar {
  display: flex;
  border-bottom: 2px solid #ccc;
  margin-bottom: 10px;
}
.stats-tabs .tab-header {
  cursor: pointer;
  padding: 10px 20px;
  background: #e6e6e6;
  border: 1px solid #ccc;
  border-bottom: none;
  margin: 0;
}
.stats-tabs .tab-header.active {
  background: #ccc;
  font-weight: bold;
}
.stats-tabs [role=tabpanel][hidden] {
  display: none;
}
.stats-tabs .stats-tabs__tablist {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  /* Show all tabs when expanded on mobile */
}
.stats-tabs .stats-tabs__tablist.is-expanded .stats-tabs__tab,
.stats-tabs .stats-tabs__tablist.is-expanded button.stats-tabs__tab {
  display: flex;
}
.stats-tabs .stats-tabs__tab,
.stats-tabs button.stats-tabs__tab {
  display: none;
  margin: 0;
  margin-block-end: -1px;
  cursor: pointer;
}
.stats-tabs .stats-tabs__tab.active, .stats-tabs .stats-tabs__tab[aria-selected=true],
.stats-tabs button.stats-tabs__tab.active,
.stats-tabs button.stats-tabs__tab[aria-selected=true] {
  display: flex;
}
@media screen and (min-width: 640px) {
  .stats-tabs .stats-tabs__tab,
  .stats-tabs button.stats-tabs__tab {
    display: flex;
    margin-block-end: 0;
    margin-inline-start: -1px;
    flex: 0 0 auto;
  }
}
.stats-tabs .stats-tabs__tab.stats-tabs__tab,
.stats-tabs button.stats-tabs__tab.stats-tabs__tab {
  align-items: center;
  height: 3rem;
  padding: 0.5rem 1.5rem;
  color: #6c757d;
  border: 1px solid #cccccc;
  background-color: #fff;
  font-size: 1rem;
  font-weight: 400;
  vertical-align: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.stats-tabs .stats-tabs__tab.stats-tabs__tab:hover,
.stats-tabs button.stats-tabs__tab.stats-tabs__tab:hover {
  color: #0f599a;
  background-color: #f7faff;
  border: solid 1px #0f599a;
}
.stats-tabs .stats-tabs__tab.stats-tabs__tab.active, .stats-tabs .stats-tabs__tab.stats-tabs__tab[aria-selected=true],
.stats-tabs button.stats-tabs__tab.stats-tabs__tab.active,
.stats-tabs button.stats-tabs__tab.stats-tabs__tab[aria-selected=true] {
  position: relative;
  color: #0f599a;
  background-color: #e6e6e6;
  border-bottom: 6px solid #0f599a;
  font-weight: 600;
  padding-bottom: calc(0.5rem - 5px);
}
.stats-tabs .stats-tabs__tab a,
.stats-tabs button.stats-tabs__tab a {
  display: flex;
  align-items: center;
  height: 3rem;
  padding: 0.5rem 1.5rem;
  transition: all 0.2s;
  text-decoration: none;
  letter-spacing: 1px;
  color: #6c757d;
  border: 1px solid #cccccc;
  background-color: #fff;
  font-size: 1rem;
  font-weight: 400;
}
.stats-tabs .stats-tabs__tab a:hover,
.stats-tabs button.stats-tabs__tab a:hover {
  color: #212529;
  background-color: #d9d9d9;
}
.stats-tabs .stats-tabs__tab a:focus,
.stats-tabs button.stats-tabs__tab a:focus {
  position: relative;
  outline: solid 3px #0f599a;
  outline-offset: -3px;
}
.stats-tabs .stats-tabs__tab a[aria-selected=true],
.stats-tabs button.stats-tabs__tab a[aria-selected=true] {
  color: #0f599a;
  background-color: #e6f2ff;
  border-color: #0f599a;
  border-bottom: 6px solid #0f599a;
  font-weight: 600;
  padding-bottom: calc(0.5rem - 5px);
}
.stats-tabs {
  /* Button that opens and closes table tabs at narrow viewports. */
}
.stats-tabs .stats-tabs__trigger {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
  border: solid 1px #cccccc;
  background-color: #fff;
  z-index: 100;
}
.stats-tabs .stats-tabs__trigger:hover {
  background-color: #f7faff;
}
.stats-tabs .stats-tabs__trigger:focus {
  border-color: #0f599a;
  outline: none;
}
@media screen and (min-width: 640px) {
  .stats-tabs .stats-tabs__trigger {
    display: none;
  }
}
.stats-tabs .stats-tabs__tab,
.stats-tabs button.stats-tabs__tab {
  flex: 1 1 100%;
}
@media screen and (min-width: 640px) {
  .stats-tabs .stats-tabs__tab,
  .stats-tabs button.stats-tabs__tab {
    flex: 0 0 auto;
    margin-inline-start: -1px;
  }
}
.stats-tabs .stats-tabs__trigger-icon {
  position: relative;
  display: block;
  width: 1rem;
  height: 10px;
}
.stats-tabs .stats-tabs__trigger-icon > span {
  position: absolute;
  inset-inline-start: 0;
  display: block;
  width: 100%;
  transition: transform 0.2s, opacity 0.2s, top 0.2s;
  border-block-start: solid 2px #0f599a;
}
.stats-tabs .stats-tabs__trigger-icon > span:nth-child(1) {
  inset-block-start: 0;
}
.stats-tabs .stats-tabs__trigger-icon > span:nth-child(2) {
  inset-block-start: calc(50% + 1px);
}
.stats-tabs .stats-tabs__trigger-icon > span:nth-child(3) {
  inset-block-start: calc(100% + 2px);
}
.stats-tabs .stats-tabs__trigger[aria-expanded=true] .stats-tabs__trigger-icon > span:nth-child(1) {
  inset-block-start: calc(50% + 1px);
  transform: rotate(45deg);
}
.stats-tabs .stats-tabs__trigger[aria-expanded=true] .stats-tabs__trigger-icon > span:nth-child(2) {
  opacity: 0;
}
.stats-tabs .stats-tabs__trigger[aria-expanded=true] .stats-tabs__trigger-icon > span:nth-child(3) {
  inset-block-start: calc(50% + 1px);
  transform: rotate(-45deg);
}
@media screen and (min-width: 640px) {
  .stats-tabs [role=tab][aria-selected=true] {
    border-left: 6px solid #0f599a !important;
    border-bottom: 1px solid #ccc !important;
  }
}
.stats-tabs [role=tab][aria-selected=true] {
  color: #0f599a;
  background-color: #e6f2ff;
  border-bottom: 6px solid #0f599a;
  font-weight: 600;
}
.stats-tabs .tab-content {
  width: 100%;
}
.stats-tabs .tab-content.active {
  display: table;
}
.stats-tabs tbody td {
  border-left: none;
  border-right: none;
}
.stats-tabs tbody tr.head {
  font-size: 1rem;
}
.stats-tabs {
  /* Basic table structure */
}
.stats-tabs .stats-table {
  width: auto;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.stats-tabs .stats-table thead th {
  background-color: #0f599a !important;
}
.stats-tabs thead {
  background-color: #fff;
  border-top: 1px solid #ccc;
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}
.stats-tabs th {
  background-color: #0f599a;
  color: #fff;
  font-size: 14px;
  text-align: right;
  padding: 0.75rem;
}
.stats-tabs th a,
.stats-tabs th a:visited {
  color: #fff;
  text-decoration: underline;
}
.stats-tabs th a:hover {
  text-decoration: none;
}
.stats-tabs .toolbar-horizontal th {
  top: 50px;
}
.stats-tabs tbody tr {
  border-bottom: 1px solid #ccc;
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
}
.stats-tabs tbody tr:nth-child(2n) {
  background-color: transparent;
}
.stats-tabs tbody tr.stats-row--odd {
  background-color: #eef7fe;
}
.stats-tabs tbody tr.blank {
  background-color: #f5f5f5;
  border: none;
  border-bottom: 1px solid #ccc;
  height: 50%;
}
.stats-tabs tbody tr.blank td {
  line-height: 10px;
  background-color: #f5f5f5;
}
.stats-tabs tbody tr.head {
  background-color: #fff;
  border-bottom: 1px solid #ccc;
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
  font-weight: bold;
  font-size: 1rem;
  line-height: 1rem;
}
.stats-tabs tbody,
.stats-tabs table {
  border: none;
  background-color: #f5f5f5;
}
.stats-tabs table {
  table-layout: fixed;
}

.sticky-header-clone table thead {
  background-color: #0f599a;
  border-top: 1px solid #ccc;
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}
.sticky-header-clone table thead th {
  background-color: #0f599a;
  color: #fff;
  font-size: 14px;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}

.stats-table--sub-annual td:nth-child(n+3),
.stats-table--sub-annual th:nth-child(n+3) {
  width: 110px;
  min-width: 110px;
}

.stats-table--annual th {
  font-size: 16px;
}

.stats-table tbody tr.stats-row--odd td:first-child {
  background-color: #e4edf4;
}
.stats-table tbody tr.stats-row--even {
  background-color: #fff;
}

.gnwt-button a,
a.button {
  color: #fff;
  font-size: 0.8rem;
  padding: 0.5em;
  height: auto;
  min-height: 36px;
  min-width: 36px;
  white-space: normal;
  display: inline-block;
  margin-bottom: 0;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  -ms-touch-action: manipulation;
  touch-action: manipulation;
  cursor: pointer;
  background-image: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background-color: #0f599a;
}
.gnwt-button a:hover,
a.button:hover {
  text-decoration: none;
  background-color: rgb(10.4733727811, 62.1420118343, 107.5266272189);
}
.gnwt-button a:visited,
a.button:visited {
  color: #fff;
}

.supertask a,
a.button.supertask {
  background-color: #318000;
  font-size: 1.1rem;
  padding: 0.5em 1em;
}
.supertask a:hover,
a.button.supertask:hover {
  background-color: rgb(29.4765625, 77, 0);
}

.primary a,
a.button.primary {
  background-color: #0f599a;
}
.primary a:hover,
a.button.primary:hover {
  background-color: rgb(10.4733727811, 62.1420118343, 107.5266272189);
}

.secondary a,
a.button.secondary {
  background-color: transparent;
  color: #0f599a;
  border: solid 2px #0f599a;
}
.secondary a:visited,
a.button.secondary:visited {
  color: #0f599a;
}
.secondary a:hover,
a.button.secondary:hover {
  background-color: rgb(10.4733727811, 62.1420118343, 107.5266272189);
  border-color: rgb(10.4733727811, 62.1420118343, 107.5266272189);
  color: #fff;
}

.danger a,
a.button.danger {
  background-color: #cc0000;
  border-color: #990000;
}
.danger a:hover,
a.button.danger:hover {
  background-color: #990000;
}

.stats-indicator-items-block {
  padding: 1rem 0;
}

.indicator-card {
  border: none;
}
.indicator-card .indicator-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0;
}
.indicator-card .indicator-sub-title {
  color: #0f599a;
}

.indicator-trend-icon--green {
  color: #318000;
}
.indicator-trend-icon--red {
  color: #cc0000;
}
.indicator-trend-icon--neutral {
  color: #676869;
}
