﻿/* Listing page for Country Factsheets */

/* Banner */
.page-node-type-listing-page-country .page-cover-banner {
  min-height: 465px;
}

.page-node-type-listing-page-country .list-search-spacer {
  margin-top: 54px;
}

/* display:flex overrides [hidden]; this restores correct hide behaviour */
.page-node-type-listing-page-country .list-search__clear {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  transition: color var(--transition-fast);
}

.page-node-type-listing-page-country .list-search__clear[hidden] {
  display: none !important;
}

.page-node-type-listing-page-country .list-search__clear:hover {
  color: #ffffff;
}

/* Country card grid */
.cf-country-card {
  min-height: 263px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cf-country-card:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 3px;
}

.cf-country-card__overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0) 2.6%, rgba(0,0,0,0.56) 97.1%);
  transition: background 0.35s ease;
}

.cf-country-card:hover .cf-country-card__overlay {
  background: rgba(255, 255, 255, 0.78);
}

.cf-country-card__img {
  transform: scale(1);
  transition: transform 1s ease;
  transform-origin: center center;
}

.cf-country-card:hover .cf-country-card__img {
  transform: scale(1.08);
}

.cf-country-card__flag {
  font-family: "NotoColorEmoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.cf-country-card__name {
  font-family: Montserrat, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--contrast-text-color);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.cf-country-card__type,
.cf-country-card__since {
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: #d1d1d1;
  transition: color 0.3s ease;
}

.cf-country-card__type {
  font-weight: 700;
  text-transform: uppercase;
}

.cf-country-card__since {
  font-weight: 500;
}

.cf-country-card:hover .cf-country-card__name {
  color: var(--text-color);
}

.cf-country-card:hover .cf-country-card__type,
.cf-country-card:hover .cf-country-card__since {
  color: var(--secondary-text-color);
}

/* Pagination */
.page-node-type-listing-page-country .tp-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.page-node-type-listing-page-country .tp-pagination .tp-pg-arrow {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--secondary-text-color);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.page-node-type-listing-page-country .tp-pagination .tp-pg-arrow[disabled],
.page-node-type-listing-page-country .tp-pagination .tp-pg-arrow.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.path-node.page-node-type-listing-page-country .page-cover-banner .page-title {
  padding: 10px;
  padding-left: 0;
}

.page-node-type-listing-page-country .tp-pagination .tp-pg-arrow[disabled]:hover {
  background: none;
}

.page-node-type-listing-page-country .tp-pagination .tp-pg-num {
  width: auto;
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  text-decoration: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--tertiary-text-color);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
  padding: 0 8px;
}

.page-node-type-listing-page-country .tp-pagination .tp-pg-num:hover {
  color: var(--section-title-color);
}

.page-node-type-listing-page-country .tp-pagination .pager {
  margin: 0;
}

.page-node-type-listing-page-country .tp-pagination .pager__items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.page-node-type-listing-page-country .tp-pagination .pager__item a,
.page-node-type-listing-page-country .tp-pagination .pager__item.is-active {
  min-width: 32px;
  height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--secondary-text-color);
  font-size: 14px;
  font-weight: 400;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.page-node-type-listing-page-country .tp-pagination .pager__item a:hover,
.page-node-type-listing-page-country .tp-pagination .pager__item a:focus {
  background: var(--background-color);
  color: var(--scroll-dot-color);
}

.page-node-type-listing-page-country .tp-pagination .pager__item.is-active {
  border-color: var(--scroll-dot-color);
  color: var(--primary-text-color);
  font-weight: 600;
}

/* No results */
.page-node-type-listing-page-country .tp-no-results-listing {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--secondary-text-color);
}

/* Responsive */
@media (max-width: 576px) {
  .cf-country-card__name {
    font-size: 18px;
  }

  .cf-country-card__flag {
    font-size: 20px;
  }
}

