/**
 * Document tabs on publication category pages (inc/document-tabs.php).
 *
 * Tabs wrap onto further rows rather than scrolling sideways, so every category
 * stays visible. Square corners and the blue/cyan pair match the document
 * tables and their View / Download buttons.
 */

.cbk-doctabs {
  margin-top: 30px;
  scroll-margin-top: 120px;
}

/* "Use the full page width": no sidebar, so the content takes the whole row. */
.single .bnr-sec-mn-sec-inr.cbk-doctabs-full .main-content {
  max-width: none;
}

.cbk-doctabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 30px;
  padding: 0 0 20px;
  border-bottom: 1px solid #C6CAD1;
}

.cbk-doctabs .cbk-doctabs__tab {
  flex: 0 1 auto;
  margin: 0;
  padding: 11px 18px;
  border: 1px solid #194C9F;
  border-radius: 0;
  background: #fff;
  color: #194C9F;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cbk-doctabs .cbk-doctabs__tab:hover {
  border-color: #194C9F;
  background: #E5F7FD;
}

.cbk-doctabs .cbk-doctabs__tab[aria-selected="true"] {
  background: #194C9F;
  color: #fff;
}

.cbk-doctabs .cbk-doctabs__tab:focus {
  outline: none;
}

.cbk-doctabs .cbk-doctabs__tab:focus-visible {
  outline: 2px solid #00AEEF;
  outline-offset: 2px;
}

.cbk-doctabs__panel[hidden] {
  display: none;
}

.cbk-doctabs__panel:focus {
  outline: none;
}

.cbk-doctabs__panel:focus-visible {
  outline: 2px solid #00AEEF;
  outline-offset: 4px;
}

/* ---- Years inside a tab listed by year -------------------------------- */

/* Equal cells that wrap onto further rows, like the year tabs on the old
   FinAccess page. */
.cbk-doctabs.cbk-doctabs--years {
  margin-top: 0;
}

.cbk-doctabs--years .cbk-doctabs__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 6px;
  margin: 0 0 24px;
  padding: 0;
  border-bottom: 0;
}

.cbk-doctabs--years .cbk-doctabs__tab {
  padding: 10px 12px;
}

/* ---- Dashboard (Power BI) --------------------------------------------- */

.cbk-doctabs__embed {
  margin: 0 0 30px;
}

/* A 16:9 report page plus the 56px Power BI footer bar, so the report fills
   the frame without letterboxing at any width. */
.cbk-doctabs__frame {
  position: relative;
  height: 0;
  padding-top: calc(56.25% + 56px);
  border: 1px solid #00C8FF;
  border-top: 10px solid #025BBF;
  background: #F3F4F6;
}

.cbk-doctabs__frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.cbk-doctabs__embed-link {
  margin: 10px 0 0;
  font-family: "Lexend", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.cbk-doctabs__embed-link a {
  color: #194C9F;
  text-decoration: underline;
}

.cbk-doctabs__embed-link a:hover {
  color: #00AEEF;
}

/* ---- Category with no documents yet ---------------------------------- */

.single .bnr-sec-mn-sec-inr .main-content .cbk-doctabs table tbody tr td.cbk-doctabs__empty {
  padding: 40px 24px;
  text-align: center;
  text-transform: none;
  font-family: "Lexend", sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  color: #4B5563;
}

.cbk-doctabs__empty-icon {
  display: block;
  margin: 0 auto 12px;
  color: #194C9F;
}

.cbk-doctabs__badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 12px;
  background: #E5F7FD;
  border: 1px solid #00AEEF;
  color: #194C9F;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cbk-doctabs__empty-text {
  display: block;
}

@media only screen and (max-width: 767px) {
  .cbk-doctabs__list {
    margin-bottom: 24px;
    padding-bottom: 16px;
  }

  /* Two per row; long names wrap inside the button instead of overflowing. */
  .cbk-doctabs .cbk-doctabs__tab {
    flex: 1 1 calc(50% - 4px);
    padding: 10px 12px;
    font-size: 14px;
  }

  .single .bnr-sec-mn-sec-inr .main-content .cbk-doctabs table tbody tr td.cbk-doctabs__empty {
    padding: 28px 16px !important;
    font-size: 15px;
  }

  .cbk-doctabs--years .cbk-doctabs__list {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    margin-bottom: 20px;
    padding-bottom: 0;
  }
}
