/* Country explorer: a single authoritative responsive layer.
   Flags always preserve their natural aspect ratio. Overview cards crop
   vertically; expanded panels show the full height and crop horizontally. */
.country-card .explorer-summary {
  isolation: isolate;
}

.country-card .country-snapshot.airport-snapshot {
  grid-template-columns: .8fr 1.15fr 1.15fr !important;
}

.country-card .country-snapshot > i,
.country-card .country-snapshot .carrier-box,
.country-card .country-snapshot .aircraft-box {
  min-width: 0 !important;
}

.country-card .country-snapshot .carrier-box,
.country-card .country-snapshot .aircraft-box {
  overflow: hidden;
}

.country-card .country-snapshot .aircraft-box > span:last-child,
.country-card .country-snapshot .carrier-box > span:last-child {
  min-width: 0;
}

.country-card .country-snapshot .aircraft-box b,
.country-card .country-snapshot .carrier-box b {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 761px) and (max-width: 1150px) {
  .country-card .country-snapshot.airport-snapshot {
    grid-template-columns: 1.22fr .82fr 1fr !important;
  }

  .country-card .country-movement b {
    font-size: clamp(12px, 1.15vw, 17px);
  }

  .country-card .country-snapshot .aircraft-crop {
    width: 82px;
    flex-basis: 82px;
  }
}

@media (min-width: 1151px) {
  .country-card .country-snapshot.airport-snapshot {
    grid-template-columns:
      minmax(280px, 1.35fr)
      var(--country-carrier-width, 205px)
      minmax(235px, 1fr) !important;
  }

  .country-card .country-snapshot .carrier-box b {
    white-space: nowrap;
  }
}

.country-card .country-flag-layer {
  position: absolute !important;
  z-index: 0 !important;
  inset: 0 auto 0 0 !important;
  display: block !important;
  width: 60% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  opacity: .20 !important;
  transform: none !important;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 22%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 22%, transparent 100%);
  pointer-events: none;
}

.country-card .explorer-summary > *:not(.country-flag-layer) {
  position: relative;
  z-index: 1;
}

.country-card .country-detail {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.country-card .country-detail-flag-layer {
  position: absolute !important;
  z-index: 0 !important;
  inset: 0 auto 0 0 !important;
  display: block !important;
  width: 30% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: left center !important;
  opacity: .25 !important;
  transform: none !important;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 20%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 20%, transparent 100%);
  pointer-events: none;
}

.country-card .country-detail > *:not(.country-detail-flag-layer) {
  position: relative;
  z-index: 1;
}

@media (max-width: 760px) {
  .country-card .country-snapshot.airport-snapshot {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .country-card .country-flag-layer {
    width: 62% !important;
  }

  .country-card .country-detail-flag-layer {
    width: 34% !important;
  }
}
