/* ============================================================
   OE GCI Globe & Index — block styles
   Rebuilt from the Global Cities Index 2026 microsite
   (styles.css §12 "Results 03 — Global index").

   Everything is scoped under .oe-block-gci-globe and every class is
   prefixed oe-block-gci-globe__*. The microsite design tokens are
   inlined onto the block root (scoped custom properties), so the block
   is fully self-contained and never inherits or leaks site variables.
   Fonts are intentionally NOT set — they inherit from the site.
   ============================================================ */

.oe-block-gci-globe{
  /* --- brand --- */
  --oe-heritage-blue:#003466;
  --oe-sky-blue:#008AC8;
  --oe-sky-blue-60:#66BDE0;
  --oe-sky-blue-30:#B2DEF0;

  /* --- category colours (used by the pill dots + list/globe markers) --- */
  --oe-block-gci-globe-cat-overall:#003466;
  --oe-block-gci-globe-cat-economics:#008AC8;
  --oe-block-gci-globe-cat-human:#B3107A;
  --oe-block-gci-globe-cat-qol:#B38D2F;
  --oe-block-gci-globe-cat-environment:#8BA612;
  --oe-block-gci-globe-cat-governance:#30B5AE;

  /* --- surfaces / lines --- */
  --bg-subtle:#F5F8FA;
  --bg-tint:#EDF5FB;
  --line:rgba(0,52,102,0.10);
  --line-strong:rgba(0,52,102,0.18);

  /* --- text --- */
  --text-heading:#003466;
  --text-body:#455055;
  --text-muted:#7C8891;

  /* --- elevation --- */
  --shadow-xs:0 1px 2px rgba(9,25,57,0.05);
  --shadow-sm:0 2px 8px rgba(9,25,57,0.06);
  --shadow-md:0 10px 28px rgba(9,25,57,0.09);
  --shadow-focus:0 0 0 3px rgba(0,138,200,0.30);

  /* --- radii --- */
  --r-xs:6px;
  --r-md:14px;
  --r-lg:20px;
  --r-pill:999px;

  /* --- spacing --- */
  --sp-2:8px;
  --sp-3:12px;
  --sp-4:16px;
  --sp-5:20px;
  --sp-8:40px;

  /* --- type sizes --- */
  --fs-2xs:0.7rem;
  --fs-xs:0.775rem;
  --fs-sm:0.85rem;
  --fs-md:1rem;
  --fs-h4:clamp(1rem,0.96rem + 0.2vw,1.08rem);

  /* --- motion --- */
  --ease:cubic-bezier(.22,.61,.36,1);
  --ease-out:cubic-bezier(.16,.84,.44,1);
  --dur-fast:140ms;
  --dur:240ms;
}

.oe-block-gci-globe *,
.oe-block-gci-globe *::before,
.oe-block-gci-globe *::after{box-sizing:border-box;}

/* ---------- layout ---------- */

/* ---------- globe stage ---------- */

/* shared inline-icon sizing */
.oe-block-gci-globe__icon{width:16px;height:16px;flex-shrink:0;}

/* ---------- selected-city card, anchored over the globe ---------- */
@keyframes oe-block-gci-globe-panel-in{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:translateY(0);}}

/* ---------- companion index panel ---------- */
.oe-block-gci-globe__index{
  display:flex;flex-direction:column;background:#fff;
  border:1px solid var(--line);border-radius:var(--r-lg);
  box-shadow:var(--shadow-sm);overflow:hidden;
}
.oe-block-gci-globe__index-head{
  padding:var(--sp-5);border-bottom:1px solid var(--line);
  display:flex;flex-direction:column;gap:var(--sp-4);
}
.oe-block-gci-globe__index-title{display:flex;align-items:baseline;justify-content:space-between;gap:var(--sp-3);}
.oe-block-gci-globe__index-title h4{
  margin:0;font-size:var(--fs-h4);font-weight:600;color:var(--text-heading);line-height:1.2;
}
.oe-block-gci-globe__count{font-size:var(--fs-2xs);color:var(--text-muted);white-space:nowrap;font-variant-numeric:tabular-nums;}
.oe-block-gci-globe__controls{display:flex;flex-direction:column;gap:var(--sp-3);}
.oe-block-gci-globe__control-label{
  margin:0 0 var(--sp-2);
  font-size:var(--fs-2xs);font-weight:600;letter-spacing:0.08em;text-transform:uppercase;
  color:var(--text-muted);
}

/* pills */
.oe-block-gci-globe__cat-pills{display:flex;flex-wrap:wrap;gap:6px;}
.oe-block-gci-globe__pill{
  display:inline-flex;align-items:center;gap:var(--sp-2);
  padding:6px 11px;
  border:1px solid var(--line-strong);border-radius:var(--oe-border-radius-base,8px);
  background:#fff;color:var(--text-body);
  font-size:var(--fs-2xs);font-weight:500;cursor:pointer;
  transition:background var(--dur) var(--ease),color var(--dur) var(--ease),
             border-color var(--dur) var(--ease),box-shadow var(--dur) var(--ease);
}
.oe-block-gci-globe__dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;background:var(--oe-block-gci-globe-dot,currentColor);}
.oe-block-gci-globe__pill:hover{border-color:var(--oe-sky-blue);color:var(--oe-sky-blue);background:var(--bg-tint);}
.oe-block-gci-globe__pill[aria-pressed="true"]{
  background:var(--oe-heritage-blue);border-color:var(--oe-heritage-blue);color:#fff;
  box-shadow:var(--shadow-xs);
}
.oe-block-gci-globe__pill[aria-pressed="true"] .oe-block-gci-globe__dot{box-shadow:0 0 0 2px rgba(255,255,255,0.4);}

.oe-block-gci-globe__active-label{
  margin:var(--sp-3) 0 0;
  font-size:var(--fs-2xs);color:var(--text-muted);
}

/* search + region */
.oe-block-gci-globe__field-row{display:flex;gap:var(--sp-2);flex-wrap:wrap;}
.oe-block-gci-globe__field{position:relative;display:flex;align-items:center;flex:1 1 150px;}
.oe-block-gci-globe__field .oe-block-gci-globe__icon{position:absolute;left:14px;width:16px;height:16px;color:var(--text-muted);pointer-events:none;}
.oe-block-gci-globe .oe-block-gci-globe__search{
  width:100%;padding:11px var(--sp-4) 11px 40px;
  border:1px solid var(--line-strong);border-radius:var(--oe-border-radius-base,8px);
  background:#fff;color:var(--text-body);font-size:var(--fs-sm);font-family:inherit;
  transition:border-color var(--dur) var(--ease),box-shadow var(--dur) var(--ease);
}
.oe-block-gci-globe__search::placeholder{color:var(--text-muted);}
.oe-block-gci-globe__search:hover{border-color:var(--oe-sky-blue-60);}
.oe-block-gci-globe__search:focus{outline:none;border-color:var(--oe-sky-blue);box-shadow:var(--shadow-focus);}

.oe-block-gci-globe__select-field{position:relative;flex:0 0 auto;display:flex;align-items:center;}
.oe-block-gci-globe .oe-block-gci-globe__region{
  appearance:none;-webkit-appearance:none;
  padding:11px 34px 11px var(--sp-4);
  border:1px solid var(--line-strong);border-radius:var(--oe-border-radius-base,8px);
  background:#fff;font-size:var(--fs-xs);color:var(--text-body);cursor:pointer;font-family:inherit;
  transition:border-color var(--dur) var(--ease),box-shadow var(--dur) var(--ease);
}
.oe-block-gci-globe__region:hover{border-color:var(--oe-sky-blue-60);}
.oe-block-gci-globe__region:focus{outline:none;border-color:var(--oe-sky-blue);box-shadow:var(--shadow-focus);}
.oe-block-gci-globe__select-field .oe-block-gci-globe__icon{position:absolute;right:14px;width:12px;height:12px;color:var(--text-muted);pointer-events:none;}

/* colour scale legend */
.oe-block-gci-globe__scale{display:flex;flex-direction:column;gap:5px;}
.oe-block-gci-globe__scale-bar{
  height:7px;border-radius:4px;
  background:linear-gradient(90deg,#1A9641 0%,#80D78D 22%,#D4F9A6 38%,#FFFFC0 50%,#FED385 62%,#F46D43 78%,#D7191C 92%,#670A0C 100%);
}
.oe-block-gci-globe__scale-labels{display:flex;justify-content:space-between;font-size:var(--fs-2xs);color:var(--text-muted);}

/* ranked list */
.oe-block-gci-globe__list{flex:1;overflow-y:auto;max-height:min(52vh,430px);overscroll-behavior:contain;}
.oe-block-gci-globe__list-row{
  display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:var(--sp-3);
  width:100%;padding:10px var(--sp-5);text-align:left;
  border:none;border-bottom:1px solid var(--line);background:none;cursor:pointer;
  transition:background var(--dur-fast) var(--ease);
}
.oe-block-gci-globe__list-row:last-child{border-bottom:none;}
.oe-block-gci-globe__list-row:hover{background:var(--bg-tint);}
.oe-block-gci-globe__list-row.is-active{background:var(--oe-sky-blue-30);}
.oe-block-gci-globe__list-rank{
  font-size:var(--fs-2xs);font-weight:700;color:var(--oe-heritage-blue);
  font-variant-numeric:tabular-nums;
}
.oe-block-gci-globe__list-name{min-width:0;}
.oe-block-gci-globe__list-name b{display:block;font-size:var(--fs-xs);font-weight:600;color:var(--oe-heritage-blue);line-height:1.3;}
.oe-block-gci-globe__list-name span{display:block;font-size:var(--fs-2xs);color:var(--text-muted);}
.oe-block-gci-globe__list-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0;box-shadow:0 0 0 3px rgba(0,52,102,0.05);}
.oe-block-gci-globe__list-empty{padding:var(--sp-8) var(--sp-5);text-align:center;font-size:var(--fs-sm);color:var(--text-muted);}
.oe-block-gci-globe__index-foot{
  padding:var(--sp-3) var(--sp-5);border-top:1px solid var(--line);
  background:var(--bg-subtle);font-size:var(--fs-2xs);color:var(--text-muted);margin:0;
}

/* ---------- responsive (mirrors microsite @1180px) ---------- */
@media (max-width:1180px){
  .oe-block-gci-globe__list{max-height:340px;}
}
