/* ==========================================================
   01. REFERENCE DIRECTORY
   ========================================================== */
.tt-reference-directory {
  width: 100%;
}

/* ----------------------------------------------------------
   01.1 Region navigation
   ---------------------------------------------------------- */
.tt-reference-regions {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding-bottom: 20px;
  margin-bottom: 20px;
  padding-top: 12px;
  border-bottom: 1px solid #d7dfe3;
}

.tt-reference-region-mobile {
  display: none;
}

/* Region button: default */
.tt-reference-region {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  background: #fff;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none !important;
  border: unset;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.tt-reference-region:not(.is-active) {
  color: #485961;
}

/* Region button: active */
.tt-reference-region.is-active {
  color: #fff;
  background: #0087DC;
}

/* Region button: hover/focus */
.tt-reference-region:not(.is-active):hover,
.tt-reference-region:not(.is-active):focus {
  color: #0087DC;
  background: #fff;
}

/* Region button: active hover/focus */
.tt-reference-region.is-active:hover,
.tt-reference-region.is-active:focus {
  color: #fff;
  background: #0087DC;
}

/* ==========================================================
   02. FILTER CONTROLS
   ========================================================== */
.tt-reference-filters {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

@media screen and (max-width: 992px) { 
	.tt-reference-dropdown,
	.tt-reference-search	{
		flex-grow: 1;
		width: unset;
	}
}

.tt-reference-sector-form {
  margin: 0;
}

.tt-reference-select-wrap {
  position: relative;
  width: 380px;
  max-width: 100%;
}

.tt-reference-select {
  width: 100%;
  height: 56px;
  padding: 0 48px 0 20px;
  color: #111;
  background: #fff;
  border: 1px solid #008fdf;
  border-radius: 9px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.tt-reference-select:focus {
  border-color: #007fc6;
  box-shadow: 0 0 0 1px #007fc6;
}

.tt-reference-select-arrow {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  color: #008fdf;
  font-size: 16px;
  pointer-events: none;
}

/* ==========================================================
   03. RESULTS META
   Count + reset
   ========================================================== */
.tt-reference-results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.tt-reference-reset {
	background: transparent;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	color: #0087DC;
	font-size: 16px;
	line-height: 1.25rem;
	font-weight: 400;
	border: unset;
	outline: unset;
	cursor: pointer;
	
}

.tt-reference-result-count {
  color: #58676f;
  font-size: 14px;
  font-weight: 400;
}

@media (max-width: 575px) {
	.tt-reference-view-toggle {
		width: 100%;
	}
	
	.tt-reference-view-button {
		flex-grow: 1;
	}
}

/* ----------------------------------------------------------
   03.1 Responsive filter/meta controls
   ---------------------------------------------------------- */
@media (max-width: 767px) {
  .tt-reference-regions {
    display: none;
  }

  .tt-reference-region-mobile {
    display: block;
    width: 100%;
    margin-bottom: 20px;
	margin-top: 12px;
  }

  .tt-reference-region-mobile .tt-reference-dropdown,
  .tt-reference-region-mobile .tt-reference-dropdown__button {
    width: 100%;
  }

  .tt-reference-filters {
    margin-bottom: 18px;
  }

  .tt-reference-sector-form,
  .tt-reference-select-wrap {
    width: 100%;
  }

  .tt-reference-select {
    height: 52px;
  }

  .tt-reference-results-meta {
    margin-bottom: 18px;
  }
}

/* ==========================================================
   04. CARD GRID
   ========================================================== */
.tt-reference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

/* ----------------------------------------------------------
   04.1 Card shell
   ---------------------------------------------------------- */
.tt-reference-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 458px;
  min-height: 458px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d7dfe3;
  border-radius: 16px 16px 16px 0;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.tt-reference-card:hover,
.tt-reference-card:focus-within {
  border-color: #cbd5da;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

/* ----------------------------------------------------------
   04.2 Card media
   Default: 230px
   Hover target: 98px
   ---------------------------------------------------------- */
.tt-reference-card__media {
  position: relative;
  flex: 0 1 230px;
  height: 230px;
  min-height: 0;
  overflow: hidden;
  transition: flex-basis 0.35s ease, height 0.35s ease;
}

.tt-reference-card:hover .tt-reference-card__media,
.tt-reference-card:focus-within .tt-reference-card__media {
  flex-basis: 98px;
  height: 98px;
}

/* Card featured image */
.tt-reference-card__image {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.tt-reference-card__image::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	background: #000;
	opacity: 0.5;
	width: 100%;
	height: 100%;
}

.tt-reference-card__image img {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  transition: transform 0.3s ease !important;
}

/* Card sector/category badge */
.tt-reference-card__sector {
  position: absolute;
  z-index: 5;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  color: #fff;
  background: #0798df;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: top 0.35s ease, left 0.35s ease;
}

/* Card country badge */
.tt-reference-card__country {
  position: absolute;
  z-index: 5;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 9px;
  color: #566268;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  transition: top 0.35s ease, right 0.35s ease;
}

.tt-reference-table__country img,
.tt-reference-card__country img {
	outline: 1px solid #E6E6E6;
	border-radius: 2px;
}

/* Card country flag */
.tt-reference-card__flag {
  display: block;
  width: 19px;
  height: 16px;
  object-fit: cover;
}

/* Card content area */
.tt-reference-card__content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 20px;
  background: #fff;
}

/* Card client row */
.tt-reference-card__client {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 20px;
}

/* Card client logo
   Wrapper: 80x80
   Outer white circle: 100x100 */
.tt-reference-card__client-logo {
  position: relative;
  z-index: 2;
  flex: 0 0 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  padding: 8px;
  background: #fff;
  border-radius: 50%;
}

/* Outer white visual ring */
.tt-reference-card__client-logo::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 50%;
}

.tt-reference-card__client-logo::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.1);
  border-radius: 50%;
}

.tt-reference-card__client-logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Card client name: WordPress Custom Excerpt */
.tt-reference-card__client-name {
  flex: 1;
  min-width: 0;
  color: #111;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

/* Card project description: WordPress post title */
.tt-reference-card__description {
  flex: 0 0 auto;
  color: #171717;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
}

.tt-reference-card__status {
  display: inline-flex;
  background: #fb9b41;
  border-radius: 6px;
  transform: translateY(-2px);
  font-size: 14px;
  padding: 4px 8px;
  color: #fff;
  line-height: 16px;
}

/* Card hover-only details */
.tt-reference-card__hover-content {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  max-height: 0;
  margin-top: 0;
  gap: 4px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: max-height 0.35s ease, margin-top 0.35s ease, opacity 0.25s ease, visibility 0.25s ease, transform 0.3s ease;
}

/* Card hover state */
.tt-reference-card:hover .tt-reference-card__hover-content,
.tt-reference-card:focus-within .tt-reference-card__hover-content {
  max-height: 220px;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Card authority/funder rows */
.tt-reference-card__detail {
  color: #222;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
}

.tt-reference-card__detail strong {
  color: #008fdf;
  font-weight: 600;
}

.tt-reference-card__detail span {
  color: #222;
}

/* Card action area */
.tt-reference-card__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
}

/* Card action button */
.tt-reference-card__button,
.tt-reference-card__button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  padding: 10px 16px;
  color: #fff !important;
  background: #0798df;
  border: 0;
  border-radius: 6px;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

.tt-reference-card__button:hover,
.tt-reference-card__button:focus {
  color: #fff !important;
  background: #087fbc;
  text-decoration: none !important;
}

/* Card action arrow */
.tt-reference-card__arrow,
.tt-reference-card__button span[aria-hidden="true"] {
  font-size: 18px;
  line-height: 1;
}

/* ==========================================================
   05. RESULTS STATE
   Empty + loading
   ========================================================== */
.tt-reference-empty {
  margin: 30px 0;
}

.tt-reference-results {
  transition: opacity 0.2s ease;
}

.tt-reference-directory.is-loading .tt-reference-results {
  opacity: 0.45;
  pointer-events: none;
}

/* ==========================================================
   06. PAGINATION
   ========================================================== */

.tt-reference-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 32px;
}

.tt-reference-pages {
  grid-column: 2;
  justify-self: center;
  gap: 8px;
}

.tt-reference-page:first-child > i {
	transform: rotate(-180deg);
	display: block;
}

.tt-reference-page {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: unset;
  border-radius: 6px;
  color: #000;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}

.tt-reference-page.is-active {
  color: #fff;
  background: #0087DC;
  border-color: #0087DC;
}

.tt-reference-per-page {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #000000;
  font-size: 16px;
  line-height: 16px;
}


.tt-reference-per-page .tt-reference-dropdown {
	width: unset;
}

.tt-reference-per-page .tt-reference-dropdown__button {
	min-width: 60px;
	padding: 4px 8px;
	gap: 2px;
}

.tt-reference-per-page .tt-reference-dropdown__list {
	top: 26px;
}

.tt-reference-per-page-select {
  height: 38px;
  padding: 0 32px 0 10px;

  border: 1px solid #d7dfe3;
  border-radius: 6px;

  background: #fff;
}

/* ==========================================================
   07. CARD / PAGINATION RESPONSIVE RULES
   ========================================================== */

/* Tablet */
@media (max-width: 1024px) {
  .tt-reference-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 767px) {
  .tt-reference-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  /* Mobile card sizing */
  .tt-reference-card {
    height: auto;
    min-height: 0;
  }

  .tt-reference-card__media {
    flex: 0 0 215px;
    height: 215px;
  }

  /* Mobile card badges */
  .tt-reference-card__sector {
    top: 12px;
    left: 12px;
    font-size: 12px;
  }

  .tt-reference-card__country {
    top: 12px;
    right: 12px;
    font-size: 12px;
  }

  .tt-reference-card__flag {
    width: 19px;
    height: 16px;
  }

  /* Mobile card content */
  .tt-reference-card__content {
    padding: 0 18px 18px;
  }

  /* Mobile card client */
  .tt-reference-card__client-logo {
    flex-basis: 74px;
    width: 74px;
    height: 74px;
  }

  .tt-reference-card__client-logo::before {
    width: 110px;
    height: 110px;
  }

  .tt-reference-card__client-logo::after {
    width: 74px;
    height: 74px;
  }

  .tt-reference-card__client-name {
    font-size: 17px;
  }

  .tt-reference-card__description {
    font-size: 15px;
    line-height: 1.5;
  }
  
    .tt-reference-pagination {
	display: flex;
    flex-direction: column;
    align-items: center;
	gap: 24px;
  }

  .tt-reference-pages {
    justify-content: center;
  }

  .tt-reference-per-page {
    justify-content: center;
  }
}

/* ==========================================================
   08. SHARED DROPDOWN / SEARCH / VIEW CONTROLS
   ========================================================== */

.tt-reference-dropdown {
	position: relative;
}

.tt-reference-dropdown__icon {
	font-size: 20px;
	color: #0087DC;
}

.tt-reference-dropdown__button,
.tt-reference-search-input {
	padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
	color: #485961;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid #0087DC;
	text-align: left;
	gap: 12px;
}

.tt-reference-search {
	flex-grow: 1;
	position: relative;
}

.tt-reference-search > i {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	left: 20px;
	font-size: 20px;
}

.tt-reference-search-input {
	padding-left: 52px;
	cursor: text;
}

.tt-reference-dropdown {
	width: 283px;
}

.tt-reference-dropdown__button > i {
	font-size: 20px;
}

.tt-reference-search-input:focus-visible {
	outline: unset;
}

.tt-reference-dropdown__list {
	display: none;
	flex-direction: column;
	gap: 12px;
	background: #ffffff;
    box-shadow: 0px 30px 30px -27px rgb(0 0 0 / 5%);
    border-radius: 0px 0px 8px 8px;
    position: absolute;
    top: 46px;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #0087DC;
    display: none;
    z-index: 99;
	
	
}

.tt-reference-dropdown.is-open .tt-reference-dropdown__list {
	display: flex;
}

.tt-reference-dropdown__option {
	display: block;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    color: #485961;
	background: none;
    border: unset;
	text-align: left;
}

.tt-reference-dropdown__option:hover {
	cursor: pointer;
	color: #23aaff;
}

.tt-reference-dropdown__option.is-active {
	color: #0087DC;
}

.tt-reference-dropdown__text {
	flex-grow: 1;
	white-space: nowrap;
}

.tt-reference-view-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4px;
	border: 1px solid #D8DDE0;
	border-radius: 8px;
	border-radius: 8px;
	gap: 2px;
}

.tt-reference-view-button {
	padding: 10px 16px;
	display: flex;
	justify-content: center;
	text-align: center;
	gap: 4px;
	color: #485961;
	font-size: 18px;
	line-height: 1.25rem;
	outline: none;
	border: unset;
	border-radius: 6px;
	cursor: pointer;
	background: #fff;
}

.tt-reference-view-button > i {
	font-size: 20px;
}

.tt-reference-view-button:not(.is-active):hover {
	background: #C7E2F3;
}

.tt-reference-view-button.is-active {
	background: #0087DC;
	color: #fff;
}

/* ==========================================================
   09. DESKTOP TABLE
   ========================================================== */

.tt-reference-table-wrap {
	border: 1px solid #E6E6E6;
	border-radius: 8px;
	overflow: visible;
}

.tt-reference-table {
	border-collapse: collapse;
	width: 100%;
}

.tt-reference-table thead {
	position: sticky;
	top: 102px;
	z-index: 3;
}

.admin-bar .tt-reference-table thead {
	top: 134px;
}

@media (max-width: 1126px) { 
	.tt-reference-table thead {
		position: sticky;
		top: 128px;
		z-index: 3;
	}


	.admin-bar .tt-reference-table thead {
		top: 160px;
	}
}

.tt-reference-table thead th {
	background: #0087DC;
	color: #fff;
	text-align: left;
	font-size: 16px;
	line-height: 16px;
	font-weight: 500;
	padding: 20px 15px;
	border-bottom: 1px solid #E6E6E6;
}

.tt-reference-table thead th:first-child {
	border-top-left-radius: 8px;
}

.tt-reference-table thead th:last-child {
	border-top-right-radius: 8px;
}

.tt-reference-table tbody td {
	color: #636363;
	text-align: left;
	font-size: 16px;
	line-height: 20px;
	font-weight: 400;
	padding: 11px 15px;
}

.tt-reference-table tbody tr:not(:last-child) {
	border-bottom: 1px solid #E6E6E6;
}

.tt-reference-table tbody tr:hover {
	background: #E7EFF4;
	cursor: pointer;
}

.tt-reference-table__client {
	display: flex;
	align-items: center;
	gap: 10px;
}

.tt-reference-table__client-logo-wrapper {
	position: relative;
    z-index: 2;
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 4px;
    background: #fff;
    border-radius: 50%;
	box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.1);
	overflow: hidden;
}

.tt-reference-table__client-logo {
	display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tt-reference-table__authority-cell span {
	width: 152px;
	display: inline-flex;
}

.tt-reference-table__country {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	padding: 4px 6px;
}

.tt-reference-table__project_name {
	display: block;
}

.tt-reference-table__funder-logos {
	display: flex;
	gap: 10px;
	min-width: 140px;
    flex-wrap: wrap;
}

.tt-reference-table__funder-logos img {
	border-radius: 20px !important;
}

/* ==========================================================
   10. TABLE ACCORDION
   Desktop defaults + responsive accordion
   ========================================================== */

.tt-reference-table__accordion-toggle {
  display: none;
}

.tt-reference-table__action-text {
  display: none;
}


/* ----------------------------------------------------------
   10.1 Responsive table accordion
   ---------------------------------------------------------- */

@media (max-width: 992px) {

  /* ----------------------------------------------
     Table container
     ---------------------------------------------- */

  .tt-reference-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .tt-reference-table {
    display: block;
    width: 100%;
    border-collapse: separate;
  }

  .tt-reference-table thead {
    display: none;
  }

  .tt-reference-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }


  /* ----------------------------------------------
     Each table row becomes one accordion card
     ---------------------------------------------- */

  .tt-reference-table__row {
    display: flex;
    flex-direction: column;
    width: 100%;

    border: 1px solid #d8dde0 !important;
    border-radius: 8px;

    background: #fff;

    overflow: hidden;

    cursor: default !important;
  }

  .tt-reference-table tbody tr:not(:last-child) {
    border-bottom: 1px solid #d8dde0;
  }

  .tt-reference-table tbody tr:hover {
    background: #fff;
  }


  /* ----------------------------------------------
     Project cell becomes accordion header
     ---------------------------------------------- */

  .tt-reference-table tbody td.tt-reference-table__project {
    display: block;
    width: 100%;

    padding: 0;

    border: 0;
  }

  .tt-reference-table__project_name {
    display: none;
  }


  /* ----------------------------------------------
     Accordion button
     ---------------------------------------------- */

  .tt-reference-table__accordion-toggle {
    display: grid;

    grid-template-columns: 40px minmax(0, 1fr) 24px;

    align-items: center;

    gap: 12px;

    width: 100%;

    min-height: 56px;

    padding: 10px 14px;

    color: #485961;

    background: #fff;

    border: 0;

    outline: 0;

    text-align: left;

    cursor: pointer;
  }


  /* ----------------------------------------------
     Accordion header logo
     ---------------------------------------------- */

  .tt-reference-table__accordion-logo {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    padding: 3px;

    background: #fff;

    border-radius: 50%;
  }

  .tt-reference-table__accordion-logo-image {
    display: block;

    width: auto;
    height: auto;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
  }


  /* ----------------------------------------------
     Accordion title
     ---------------------------------------------- */

  .tt-reference-table__accordion-title {
    min-width: 0;

    color: #636363;

    font-size: 15px;
    font-weight: 500;
    line-height: 1.1;
  }


  /* ----------------------------------------------
     Chevron
     ---------------------------------------------- */

  .tt-reference-table__accordion-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    color: #111;

    font-size: 18px;

    transition: transform 0.25s ease;
	transform: rotate(90deg);
  }

  .tt-reference-table__row.is-open
  .tt-reference-table__accordion-icon {
    transform: rotate(-90deg);
  }


  /* ----------------------------------------------
     Closed rows
     ---------------------------------------------- */

  .tt-reference-table__row
  > td:not(.tt-reference-table__project) {
    display: none;
  }


  /* ----------------------------------------------
     Expanded rows
     ---------------------------------------------- */

  .tt-reference-table__row.is-open
  > td:not(.tt-reference-table__project) {
    display: grid;

    grid-template-columns: 96px minmax(0, 1fr);

    align-items: center;

    gap: 10px;

    width: auto;

    margin: 0 23px;

    padding: 15px 0;

    color: #636363;

    font-size: 16px;
    line-height: 1.25;
  }
  
  .tt-reference-table__row.is-open > td:not(.tt-reference-table__client-cell) {
	  border-top: 1px solid #e6e6e6;
  }


  /* ----------------------------------------------
     Mobile labels
     ---------------------------------------------- */

  .tt-reference-table__row.is-open
  > td[data-label]::before {
    content: attr(data-label);

    display: block;

    color: #404040;

    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
  }


  /* ----------------------------------------------
     Desired accordion order

     Beneficiary
     Sector
     Country
     Contracting authority
     Funders
     Action
     ---------------------------------------------- */

  .tt-reference-table__client-cell {
    order: 1;
  }

  .tt-reference-table__sector-cell {
    order: 2;
  }

  .tt-reference-table__country-cell {
    order: 3;
  }

  .tt-reference-table__authority-cell {
    order: 4;
  }

  .tt-reference-table__funders-cell {
    order: 5;
  }

  .tt-reference-table__action-cell {
    order: 6;
  }


  /* ----------------------------------------------
     Client
     ---------------------------------------------- */

  .tt-reference-table__client {
    display: flex;

    align-items: center;

    gap: 8px;

    min-width: 0;
  }

  .tt-reference-table__client-logo-wrapper {
    display: none;
  }

  .tt-reference-table__client-logo-text {
    max-width: none;
  }


  /* ----------------------------------------------
     Country
     ---------------------------------------------- */

  .tt-reference-table__country {
    display: inline-flex;

    align-items: center;

    justify-content: flex-start;

    gap: 7px;

    padding: 0;
  }

  .tt-reference-table__flag {
    width: 20px;
    height: 16px !important;

    object-fit: cover;
  }


  /* ----------------------------------------------
     Funder logos
     ---------------------------------------------- */

  .tt-reference-table__funder-logos {
    display: flex;

    align-items: center;

    gap: 8px;

    min-width: 0;

    flex-wrap: wrap;
  }

  .tt-reference-table__funder-logo {
    display: block;

    width: auto;
    height: 26px;

    max-width: 70px;

    object-fit: contain;
  }


  /* ----------------------------------------------
     Action row
     ---------------------------------------------- */

  .tt-reference-table__row.is-open
  > td.tt-reference-table__action-cell {
    display: flex;

    align-items: center;
    justify-content: center;

    margin: 0 14px;

    padding: 14px 0;

    border-top: 1px solid #e6e6e6;
  }

  .tt-reference-table__action,
  .tt-reference-table__action:visited {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    color: #0087dc;

    font-size: 16px;
    font-weight: 500;

    text-decoration: none;
  }

  .tt-reference-table__action-text {
    display: inline;
  }


  /* ----------------------------------------------
     Open header
     ---------------------------------------------- */

  .tt-reference-table__row.is-open
  .tt-reference-table__accordion-toggle {
    background: #f3f8fc;
  }

}