/* World Partner Map — gaodimic_biz_partner. Uses site standard color vars. */

.wpm-root {
  --wpm-blue: var(--std-blue, #008fd7);
  --wpm-navy: var(--primary, #0b3a5d);
  --wpm-land: #dbe3ea;
  --wpm-land-hover: #c3d2de;
  --wpm-border: #ffffff;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 40px;
  font-family: inherit;
}

/* ---------- map ---------- */
.wpm-map-wrap { margin-bottom: 24px; }

.wpm-map svg {
  width: 100%;
  height: auto;
  display: block;
}

.wpm-map path {
  fill: var(--wpm-land);
  stroke: var(--wpm-border);
  stroke-width: 0.4;
  transition: fill 0.15s ease;
  cursor: default;
}

.wpm-map path.has-partner {
  fill: var(--wpm-blue);
  cursor: pointer;
}

.wpm-map path.has-partner:hover { fill: var(--wpm-navy); }

.wpm-map path.is-selected {
  fill: var(--wpm-navy);
  stroke: var(--wpm-blue);
  stroke-width: 0.8;
}

.wpm-map__loading {
  padding: 60px 0;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}

.wpm-map__hint {
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  margin-top: 8px;
}

/* ---------- panel (selected country) ---------- */
.wpm-panel {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  margin-bottom: 28px;
  overflow: hidden;
}

.wpm-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--wpm-blue);
  color: #fff;
}

.wpm-panel__title { margin: 0; font-size: 18px; }

.wpm-panel__close {
  background: none;
  border: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.wpm-panel__body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  padding: 16px;
}

/* ---------- partner cards ---------- */
.wpm-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.wpm-card__logo {
  height: 44px;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.wpm-card__logo img {
  max-height: 44px;
  max-width: 140px;
  object-fit: contain;
}

.wpm-card__name { margin: 0 0 8px; font-size: 16px; }

.wpm-card__contacts { margin: 0; font-size: 13.5px; }
.wpm-card__contacts dt { font-weight: 600; margin-right: 6px; }

.wpm-card__row { display: flex; margin-bottom: 2px; word-break: break-all; }

.wpm-card__contacts a { color: var(--wpm-blue); text-decoration: none; }
.wpm-card__contacts a:hover { text-decoration: underline; }

.wpm-card__desc {
  margin: 10px 0 0;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
}

/* ---------- static list ---------- */
.wpm-list__title { font-size: 22px; margin: 32px 0 16px; }
.wpm-list__country-name {
  font-size: 16px;
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--wpm-blue);
  display: inline-block;
}
.wpm-list__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.wpm-list__empty { color: #6b7280; }

.wpm-attribution {
  margin-top: 32px;
  font-size: 11.5px;
  color: #9ca3af;
}
.wpm-attribution a { color: #9ca3af; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .wpm-panel__body, .wpm-list__cards { grid-template-columns: 1fr; }
  .wpm-map { touch-action: pan-y; }
}

/* ---------- zoom & pan (2026-09-11) ---------- */
.wpm-map-wrap { position: relative; }

.wpm-zoom-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 620;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wpm-zoom-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.wpm-zoom-btn:hover { background: var(--std-blue, #008fd7); color: #fff; border-color: var(--std-blue, #008fd7); }
.wpm-zoom-btn:active { transform: scale(0.94); }

.wpm-map svg { cursor: grab; touch-action: none; }
.wpm-map svg.is-panning { cursor: grabbing; }
.wpm-map svg.is-panning path { pointer-events: none; }

/* ---------- compact continent-grouped list (2026-09-11) ---------- */
.wpm-list__cards { grid-template-columns: repeat(3, 1fr); }

.wpm-card--compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.wpm-card--compact .wpm-card__logo {
  height: auto;
  margin-bottom: 0;
  justify-content: center;
}

.wpm-card--compact .wpm-card__logo img {
  max-height: 66px;   /* was 44px — +50% */
  max-width: 80%;
  object-fit: contain;
}

.wpm-card--compact .wpm-card__name {
  margin: 0;
  font-size: 14.5px;
  color: #1f2937;
}

/* keep single column on small screens (must come after the 3-col rule) */
@media (max-width: 640px) {
  .wpm-list__cards { grid-template-columns: 1fr; }
}

/* ---------- continent > country > partners list v2 (2026-09-11 pm) ---------- */
/* Title row: double line-height, thin blue rule underneath */
.wpm-list__title {
  font-size: 28px;
  line-height: 2;
  margin: 0 0 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--std-blue, #008fd7);
}

/* Continent name: 1.6 line-height */
.wpm-list__continent { margin-top: 0; }
.wpm-list__continent + .wpm-list__continent { margin-top: 4rem; } /* double spacing between continents */
.wpm-list__continent-name {
  font-size: 22px;
  line-height: 1.6;
  margin: 0 0 14px;
}

/* Country blocks: 4 per row */
.wpm-list__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Country name: blue thick short underline (restored) */
.wpm-list__country-name {
  font-size: 16px;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--std-blue, #008fd7);
  display: inline-block;
}

/* Partner cards stacked inside a country block */
.wpm-list__country-block .wpm-card { margin-bottom: 12px; }
.wpm-list__country-block .wpm-card--compact .wpm-card__logo img { max-height: 99px; /* 66 * 1.5 */ }

@media (max-width: 1024px) {
  .wpm-list__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .wpm-list__grid { grid-template-columns: 1fr; }
}

/* Partner names: render stored newlines as line breaks (multi-line titles) */
.wpm-panel__title,
.wpm-card__name { white-space: pre-line; }

/* Biz Partners page: align map + list width with the navbar pill (was 1100px cap) */
body.canvas-page-13 .wpm-root {
  max-width: none;
  width: calc(100% - 48px);
  margin-left: auto;
  margin-right: auto;
}

/* Continent name carries the thin blue line (title removed 20260912) */
.wpm-list__continent-name {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--wpm-blue, #008fd7);
}

/* Uniform card height = Japan (ArtBox) card, 162px, content centered */
.wpm-card--compact {
  height: 162px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.wpm-card--compact .wpm-card__logo { margin-bottom: 12px; }
.wpm-card--compact .wpm-card__name { margin: 0; }
/* Multi-partner countries take one full 4-column row; cards keep the
   standard cell size and wrap within the row. */
@media (min-width: 641px) {
  .wpm-list__country-block--multi { grid-column: span 4; }
  .wpm-list__country-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-content: start; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .wpm-list__country-block--multi { grid-column: span 2; }
  .wpm-list__country-cards { grid-template-columns: repeat(2, 1fr); }
}

/* Panel: partner info boxes 2 per row, wider */
.wpm-panel__body { grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px) { .wpm-panel__body { grid-template-columns: 1fr; } }

/* Panel partner card: two columns — left logo+name, right details */
.wpm-panel__body .wpm-card {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  column-gap: 24px;
  row-gap: 10px;
  align-items: start;
}
.wpm-panel__body .wpm-card__logo { grid-column: 1; margin-bottom: 0; }
.wpm-panel__body .wpm-card__name { grid-column: 1; margin: 0; }
.wpm-panel__body .wpm-card__contacts { grid-column: 2; grid-row: 1; }
.wpm-panel__body .wpm-card__desc { grid-column: 2; }

/* Selected country: orange (std palette) instead of navy */
.wpm-root .wpm-map path.is-selected {
  fill: var(--std-orange, #f9570e);
  stroke: #ffffff;
}

/* Keep contact labels on one line */
.wpm-panel__body .wpm-card__contacts dt { white-space: nowrap; }

/* Panel cards: logo cap matches list cards; single-partner country = full-width card with big logo */
.wpm-panel__body .wpm-card__logo { height: auto; }
.wpm-panel__body .wpm-card__logo img { max-height: 66px; max-width: 180px; }
.wpm-panel__body--single { grid-template-columns: 1fr; }
.wpm-panel__body--single .wpm-card { grid-template-columns: 280px 1fr; }
.wpm-panel__body--single .wpm-card__logo { align-items: flex-start; }
.wpm-panel__body--single .wpm-card__logo img { max-height: 110px; max-width: 240px; }

/* Single full-width card: spread contact rows across the whole details zone */
.wpm-panel__body--single .wpm-card__contacts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  column-gap: 48px;
  row-gap: 10px;
  align-content: start;
  align-items: start;
}

/* Single full-width card: content in two even columns — logo+name | details */
.wpm-panel__body--single .wpm-card { grid-template-columns: 1fr 1fr; column-gap: 48px; }
.wpm-panel__body--single .wpm-card__contacts { display: block; }

/* Map: panning locked until + is clicked; wheel zoom removed */
.wpm-map svg { cursor: default; }
.wpm-map svg.is-pannable { cursor: grab; }
.wpm-map svg.is-panning { cursor: grabbing; }

/* List cards open the partner panel at the bottom of their continent */
.wpm-list__country-block .wpm-card { cursor: pointer; transition: box-shadow .15s ease, border-color .15s ease; }
.wpm-list__country-block .wpm-card:hover { border-color: var(--wpm-blue); box-shadow: 0 3px 10px rgba(0,0,0,.12); }
