﻿/* Global Network - aligned with Vue UiGlobalNetworkMap */
/* Vue spacing unit: --spacing = 0.04rem */

@font-face {
  font-family: "Goldman";
  src: url("../font/Goldman-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "HarmonyOS Sans";
  src: url("../font/HarmonyOS_Sans_Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "HarmonyOS Sans";
  src: url("../font/HarmonyOS_Sans_Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

body.gn-body {
  font-family: var(--font-sans);
  overflow: hidden;
}

body.gn-body .site-footer {
  display: none;
}

#site-header.site-header.is-dark{
  background: #fff;
  color: #000;
}
.site-header.is-dark .site-header__logo-light{
  display: none;
}
.site-header.is-dark .site-header__logo-dark{
  display: block;
}

.gn-page {
  width: 100%;
  height: 100svh;
  padding-top: 0.8rem;
  position: relative;
  box-sizing: border-box;
}

.gn-layout {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Map section */
.gn-map {
  position: sticky;
  top: 0;
  z-index: 2;
  width: 100%;
  height: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #a1d1ff;
}

.gn-map-inner {
  position: relative;
  width: 100%;
  max-width: 1377px;
  aspect-ratio: 1377 / 746;
}

.gn-map-inner > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.gn-map-overlay {
  transition: opacity 0.3s;
  opacity: 0;
}

.gn-map-overlay.is-visible {
  opacity: 1;
}

.gn-map-zones {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gn-map-zone {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gn-map-zone.is-interactive {
  pointer-events: auto;
  cursor: pointer;
}

/* Panel section */
.gn-panel {
  width: 100%;
  flex: 1;
  min-height: 0;
  padding: 0 0.48rem;
  box-sizing: content-box;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.gn-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  padding: 0.16rem 0;
  min-height: 100%;
}

.gn-titles {
  display: flex;
  gap: 0.16rem;
  padding: 0.18rem 0;
}

.gn-title {
  display: inline-flex;
  font-family: var(--font-goldman);
  font-size: 0.45rem;
  line-height: 1;
  /* font-weight: 700; */
  /* letter-spacing: 0.02em; */
  color: var(--identify);
}

.gn-title.is-black {
  /* color: #000; */
}

.gn-title.is-es {
  font-size: 0.4rem;
}

/* Search */
.gn-search-wrap {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  width: 100%;
  padding-bottom: 0.04rem;
}

.gn-search-field {
  position: relative;
  width: 100%;
}

.gn-search-input {
  width: 100%;
  height: 0.8rem;
  padding: 0 1.2rem 0 0.2rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.04rem;
  font-size: 0.16rem;
  font-family: var(--font-sans);
  box-sizing: border-box;
  outline: none;
  color: #000;
  background: #fff;
}

.gn-search-input::placeholder {
  color: #9ca3af;
}

.gn-search-input:focus {
  border-color: var(--identify);
  box-shadow: 0 0 0 1px var(--identify);
}

.gn-search-btn {
  position: absolute;
  top: 0.1rem;
  right: 0.1rem;
  width: 0.8rem;
  height: 0.6rem;
  border: none;
  border-radius: 0.04rem;
  background: var(--identify);
  color: #fff;
  font-size: 0.2rem;
  font-family: var(--font-sans-medium);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.gn-search-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--identify) 75%, transparent);
}

.gn-search-btn:disabled {
  cursor: not-allowed;
  opacity: 1;
}

/* Loading skeleton */
.gn-loading {
  display: none;
  flex-direction: column;
  gap: 0.16rem;
}

.gn-loading.is-active {
  display: flex;
}

.gn-skeleton {
  width: 100%;
  height: 0.8rem;
  border-radius: 0.04rem;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: gn-skeleton 1.2s ease-in-out infinite;
}

@keyframes gn-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Country list */
.map-list-container {
  display: flex;
  flex-direction: column;
  margin-top: 0.24rem;
  gap: 0.32rem;
  flex: 1;
  min-height: 0;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  padding-right: 0.08rem;
}

.gn-group {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

.gn-group-title {
  font-size: 0.2rem;
  color: #6b7280;
  margin-bottom: 0.08rem;
  font-family: var(--font-sans);
}

.gn-country-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.16rem;
}

.gn-country-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8f8f8;
  border-radius: 0.08rem;
  padding: 0.16rem 0.2rem;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.gn-country-item:hover {
  background: #f0f0f0;
}

.gn-country-item:hover .gn-country-name,
.gn-country-item:hover .gn-country-arrow {
  color: var(--identify);
}

.gn-country-main {
  display: flex;
  align-items: center;
  gap: 0.16rem;
  min-width: 0;
  flex: 1;
}

.gn-country-flag {
  width: auto;
  height: 0.24rem;
  max-width: 0.48rem;
  object-fit: contain;
  flex-shrink: 0;
}

.gn-country-name {
  font-size: 0.2rem;
  font-weight: 700;
  font-family: var(--font-sans-medium);
  transition: color 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #000;
}

.gn-country-arrow {
  flex-shrink: 0;
  width: 0.26rem;
  height: 0.26rem;
  color: #000;
  transition: color 0.3s;
}

.gn-no-results {
  padding: 0.4rem 0;
  text-align: center;
  color: #6b7280;
  font-size: 0.2rem;
}

/* RTL */
html[dir="rtl"] .gn-search-input {
  padding: 0 0.2rem 0 1.2rem;
}

html[dir="rtl"] .gn-search-btn {
  right: auto;
  left: 0.1rem;
}

html[dir="rtl"] .gn-country-arrow {
  transform: scaleX(-1);
}

/* Desktop */
@media (min-width: 768px) {
  .gn-page {
    padding-top: 0.75rem;
  }

  .gn-layout {
    flex-direction: row;
  }

  .gn-map {
    position: relative;
    top: auto;
    flex: 1;
    height: 100%;
  }

  .gn-panel {
    width: 6rem;
    flex: none;
    height: 100%;
    padding: 0 0.48rem;
  }

  .gn-title {
    font-size: 0.45rem;
  }

  .gn-group-title {
    font-size: 0.2rem;
  }

  .gn-country-name {
    font-size: 0.22rem;
  }

  .gn-country-flag {
    height: 0.32rem;
    max-width: 0.64rem;
  }

  .gn-country-arrow {
    width: 0.24rem;
    height: 0.24rem;
  }

  .map-list-container {
    max-height: none;
  }
}
@media (max-width: 768px){
   .gn-panel {
    width: auto;
    flex: none;
    height: 100%;
    padding: 0 0.48rem;
  }
  .map-list-container{
    padding-right:0;
  }
}