/* Voltera Global - world map (geomap.js). All classes prefixed gm-. */
.gm-root {
  --gm-bg: #030605;
  --gm-card: #0a110d;
  --gm-lime: #7ed957;
  --gm-lime2: #8ef25a;
  --gm-text: #f2f6f3;
  --gm-muted: #95a39b;
  --gm-btc: #f7931a;
  --gm-line: rgba(126, 217, 87, .18);
  position: relative;
  color: var(--gm-text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}
.gm-root *, .gm-root *::before, .gm-root *::after { box-sizing: border-box; }

/* ------------------------------------------------------------------ stage */
.gm-stage {
  position: relative;
  height: 520px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(126, 217, 87, .07), transparent 70%),
    radial-gradient(circle, rgba(126, 217, 87, .09) 1px, transparent 1.3px) 0 0 / 22px 22px,
    var(--gm-bg);
  border: 1px solid var(--gm-line);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, .7), 0 20px 60px -30px rgba(126, 217, 87, .25);
  isolation: isolate;
}
.gm-stage::after { /* vignette */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 450;
  background: radial-gradient(ellipse 85% 80% at 50% 50%, transparent 60%, rgba(3, 6, 5, .75) 100%);
}
.gm-map {
  position: absolute; inset: 0;
  background: transparent !important;
  font: inherit;
  outline: none;
}
.gm-map.leaflet-container { background: transparent; }
.gm-map path.gm-country.is-hot { filter: drop-shadow(0 0 4px rgba(142, 242, 90, .7)); }
.gm-map path.gm-country { cursor: pointer; transition: stroke-width .15s; }
.gm-map path.gm-country:focus { outline: none; }
.gm-map:focus-visible { box-shadow: inset 0 0 0 2px var(--gm-lime); }

/* --------------------------------------------------------------- header */
.gm-head {
  position: absolute; left: 16px; top: 14px; z-index: 500;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(10, 17, 13, .72); border: 1px solid var(--gm-line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 12px; color: var(--gm-muted); letter-spacing: .01em;
  pointer-events: none;
}
.gm-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gm-lime2); box-shadow: 0 0 8px var(--gm-lime2); animation: gm-blink 2s ease-in-out infinite; }
@keyframes gm-blink { 50% { opacity: .35; } }

/* -------------------------------------------------------------- controls */
.gm-controls {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%); z-index: 600;
  display: flex; flex-direction: column; gap: 8px;
}
.gm-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(10, 17, 13, .82); border: 1px solid rgba(126, 217, 87, .28); color: var(--gm-lime2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  cursor: pointer; padding: 0; transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.gm-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gm-btn:hover { background: rgba(126, 217, 87, .14); border-color: var(--gm-lime); box-shadow: 0 0 14px rgba(142, 242, 90, .35); }
.gm-btn:active { transform: scale(.95); }
.gm-btn:focus-visible { outline: 2px solid var(--gm-lime2); outline-offset: 2px; }

/* ------------------------------------------------------------ attribution */
/* Licence credits behind a small "i" button (bottom-right), closed by default. */
.gm-credits { position: absolute; right: 10px; bottom: 10px; z-index: 650; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: calc(100% - 20px); }
.gm-credits-btn { position: relative;
  width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(10, 17, 13, .6); color: rgba(149, 163, 155, .75); transition: color .15s, background .15s;
}
.gm-credits-btn::before { content: ""; position: absolute; right: -8px; bottom: -8px; width: 36px; height: 36px; } /* comfortable tap area */
.gm-credits-btn svg { position: relative; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.gm-credits-btn:hover, .gm-credits-btn[aria-expanded="true"] { color: var(--gm-lime2); background: rgba(10, 17, 13, .9); }
.gm-credits-btn:focus-visible { outline: 2px solid var(--gm-lime2); outline-offset: 2px; }
.gm-credits-pop {
  padding: 8px 11px; border-radius: 10px; font-size: 10.5px; line-height: 1.5; color: rgba(190, 201, 194, .95); text-align: left;
  background: rgba(10, 17, 13, .94); border: 1px solid var(--gm-line); box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.gm-credits-pop[hidden] { display: none; }
.gm-credits-pop a { color: inherit; text-decoration: underline; text-decoration-color: rgba(149, 163, 155, .45); text-underline-offset: 2px; }
.gm-credits-pop a:hover { color: var(--gm-lime2); }

/* -------------------------------------------------------- status / toast */
.gm-status {
  position: absolute; inset: 0; z-index: 700; display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--gm-muted); font-size: 13px;
}
.gm-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(126, 217, 87, .2); border-top-color: var(--gm-lime2); animation: gm-rot .8s linear infinite; }
@keyframes gm-rot { to { transform: rotate(360deg); } }
.gm-toast {
  position: absolute; left: 50%; top: 50%; z-index: 800; transform: translate(-50%, -50%) scale(.96);
  padding: 10px 16px; border-radius: 12px; font-size: 13px; color: var(--gm-text);
  background: rgba(10, 17, 13, .9); border: 1px solid var(--gm-line); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; text-align: center; max-width: 80%;
}
.gm-toast.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.gm-link { background: none; border: 0; color: var(--gm-lime2); text-decoration: underline; cursor: pointer; font: inherit; }

/* ----------------------------------------------------------------- nodes */
.gm-node { background: none; border: 0; }
.gm-node-core {
  position: absolute; inset: 22%; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffd08a, var(--gm-btc) 60%);
  box-shadow: 0 0 8px 2px rgba(247, 147, 26, .75), 0 0 18px 4px rgba(247, 147, 26, .35);
}
.gm-node-ring {
  position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(247, 147, 26, .8);
  animation: gm-pulse 2.4s ease-out infinite;
}
.gm-node--sel .gm-node-core { background: radial-gradient(circle at 40% 35%, #eaffd9, var(--gm-lime2) 60%); box-shadow: 0 0 8px 2px rgba(142, 242, 90, .8), 0 0 20px 6px rgba(142, 242, 90, .35); }
.gm-node--sel .gm-node-ring { border-color: rgba(142, 242, 90, .9); }
@keyframes gm-pulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }

/* --------------------------------------------------------------- tooltip */
.leaflet-tooltip.gm-tip {
  background: rgba(10, 17, 13, .92); color: var(--gm-text); border: 1px solid rgba(126, 217, 87, .4);
  border-radius: 8px; padding: 4px 9px; font: 600 12px/1.3 Inter, system-ui, sans-serif; box-shadow: 0 0 14px rgba(126, 217, 87, .2);
}
.leaflet-tooltip.gm-tip::before { display: none; }

/* ------------------------------------------------------------------ card */
.gm-card {
  position: absolute; z-index: 650; width: 330px; max-height: calc(100% - 48px); overflow: auto;
  border-radius: 16px; padding: 0;
  background: linear-gradient(160deg, rgba(20, 34, 25, .86), rgba(8, 14, 10, .9));
  border: 1px solid rgba(126, 217, 87, .32);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 0 30px -8px rgba(126, 217, 87, .35);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  animation: gm-in .18s ease-out;
  scrollbar-width: thin; scrollbar-color: rgba(126, 217, 87, .3) transparent;
  overscroll-behavior: contain;
}
.gm-card[hidden] { display: none; }
.gm-card.is-expanded { width: 370px; }
@keyframes gm-in { from { opacity: 0; transform: translateY(6px); } }
.gm-card-h { display: flex; align-items: center; gap: 11px; padding: 14px 14px 10px 16px; position: sticky; top: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(16, 28, 20, .97), rgba(16, 28, 20, .88)); border-bottom: 1px solid rgba(126, 217, 87, .12); }
.gm-flag { font-size: 28px; line-height: 1; flex: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.gm-flag--code { font: 800 12px/1 Montserrat, Inter, sans-serif; letter-spacing: .06em; color: #06110a; background: linear-gradient(135deg, var(--gm-lime2), var(--gm-lime)); padding: 8px 7px; border-radius: 7px; filter: none; box-shadow: 0 0 12px rgba(142, 242, 90, .35); }
.gm-card-t { min-width: 0; flex: 1; }
.gm-card-t h4 { margin: 0; font: 700 16.5px/1.2 Montserrat, Inter, sans-serif; color: var(--gm-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-card-t span { font-size: 11.5px; color: var(--gm-muted); text-transform: uppercase; letter-spacing: .08em; }
.gm-x { flex: none; width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .04); color: var(--gm-muted); display: grid; place-items: center; cursor: pointer; padding: 0; }
.gm-x svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.gm-x:hover { color: var(--gm-text); border-color: rgba(126, 217, 87, .4); }
.gm-card-b { padding: 12px 16px 16px; }

.gm-sec { margin-top: 12px; }
.gm-sec h5 { display: flex; align-items: center; gap: 7px; margin: 0 0 7px; font: 700 11px/1 Inter, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--gm-lime); }
.gm-sec h5 svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gm-badge { margin-left: auto; font: 600 10.5px/1 Inter, sans-serif; letter-spacing: .04em; color: var(--gm-muted); padding: 3px 7px; border-radius: 6px; background: rgba(255, 255, 255, .05); text-transform: none; }
.gm-badge--warn { color: var(--gm-btc); background: rgba(247, 147, 26, .1); }
.gm-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gm-stats--live { margin-top: 8px; }
.gm-stat { position: relative; padding: 9px 10px 9px; border-radius: 11px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .06); min-width: 0; }
.gm-stat i { display: none; }
.gm-stat-l { display: block; font-size: 11px; color: var(--gm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-stat b { display: block; margin-top: 3px; font: 700 17px/1.15 Montserrat, Inter, sans-serif; color: var(--gm-text); white-space: nowrap; }
.gm-stat b small, .gm-region b small { font: 500 10.5px Inter, sans-serif; color: var(--gm-muted); margin-left: 3px; }
.gm-stat em { position: absolute; top: 8px; right: 8px; font: 600 9.5px/1 Inter, sans-serif; font-style: normal; color: var(--gm-btc); text-transform: uppercase; letter-spacing: .06em; }
.gm-stats--live .gm-stat { border-color: rgba(142, 242, 90, .25); }
.gm-stats--live .gm-stat em { color: var(--gm-lime2); }
.gm-na { color: var(--gm-muted); font-weight: 500; font-size: .85em; }
.gm-muted { margin: 0; font-size: 12.5px; color: var(--gm-muted); }
.gm-err { margin: 4px 0 12px; font-size: 13px; color: var(--gm-muted); }

.gm-calc { margin-top: 12px; padding: 10px 12px; border-radius: 11px; font-size: 12.5px; color: #d3dcd6; line-height: 1.5;
  background: linear-gradient(135deg, rgba(126, 217, 87, .12), rgba(126, 217, 87, .03)); border: 1px dashed rgba(126, 217, 87, .35); }
.gm-calc b { color: var(--gm-lime2); font-weight: 700; }
.gm-calc-t { display: block; font: 700 9.5px/1 Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--gm-muted); margin-bottom: 4px; }

.gm-src { margin: 12px 0 0; font-size: 10.5px; line-height: 1.45; color: var(--gm-muted); }
.gm-cta {
  margin-top: 12px; width: 100%; height: 40px; border-radius: 11px; border: 0; cursor: pointer;
  font: 700 13px Montserrat, Inter, sans-serif; letter-spacing: .02em; color: #07110a;
  background: linear-gradient(135deg, var(--gm-lime2), var(--gm-lime)); box-shadow: 0 6px 18px -6px rgba(142, 242, 90, .55);
  transition: filter .15s, transform .1s;
}
.gm-cta:hover { filter: brightness(1.08); }
.gm-cta:active { transform: translateY(1px); }
.gm-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gm-cta span { display: inline-block; transition: transform .2s; }
.gm-card.is-expanded .gm-cta span { transform: rotate(-90deg); }
.gm-cta--ghost { background: transparent; color: var(--gm-lime2); border: 1px solid rgba(126, 217, 87, .45); box-shadow: none; }

.gm-more { display: none; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .07); }
.gm-card.is-expanded .gm-more { display: block; animation: gm-in .18s ease-out; }
.gm-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 12.5px; }
.gm-dl dt { color: var(--gm-muted); }
.gm-dl dd { margin: 0; text-align: right; color: var(--gm-text); font-weight: 600; }
.gm-dl dd small { color: var(--gm-muted); font-weight: 400; }
.gm-dl dd small small, .gm-dl dd b small { margin: 0; }
.gm-fine { margin: 10px 0 0; font-size: 11px; line-height: 1.5; color: var(--gm-muted); }
.gm-srcs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; }
.gm-srcs li { font-size: 12px; padding: 8px 10px; border-radius: 9px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .05); }
.gm-srcs a { color: var(--gm-lime2); text-decoration: none; font-weight: 600; }
.gm-srcs a:hover { text-decoration: underline; }
.gm-srcs a svg { width: 11px; height: 11px; margin-left: 4px; vertical-align: -1px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.gm-srcs small { color: var(--gm-muted); margin-left: 4px; }
.gm-srcs span { display: block; margin-top: 2px; color: var(--gm-muted); font-size: 11px; }

/* skeleton */
.gm-sk { display: block; height: 12px; border-radius: 6px; margin: 8px 0; width: 60%;
  background: linear-gradient(90deg, rgba(255, 255, 255, .05) 25%, rgba(126, 217, 87, .14) 50%, rgba(255, 255, 255, .05) 75%) 0 0 / 300% 100%;
  animation: gm-shimmer 1.2s linear infinite; }
.gm-sk--w { width: 100%; height: 34px; border-radius: 10px; }
.gm-sk--b { width: auto; height: 54px; border-radius: 11px; margin: 0; }
.gm-sk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
@keyframes gm-shimmer { to { background-position: -150% 0; } }

/* ------------------------------------------------------- region card row */
.gm-regions {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-top: 14px;
}
.gm-region {
  display: block; text-align: left; cursor: pointer; min-width: 0;
  padding: 13px 13px 11px; border-radius: 14px; color: var(--gm-text);
  background: linear-gradient(165deg, rgba(20, 34, 25, .7), rgba(10, 17, 13, .9));
  border: 1px solid rgba(126, 217, 87, .16);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  font: inherit;
}
.gm-region:hover { border-color: rgba(126, 217, 87, .45); box-shadow: 0 0 22px -6px rgba(126, 217, 87, .4); transform: translateY(-2px); }
.gm-region:focus-visible { outline: 2px solid var(--gm-lime2); outline-offset: 2px; }
.gm-region.is-active { border-color: var(--gm-lime); box-shadow: 0 0 0 1px var(--gm-lime) inset, 0 0 24px -6px rgba(142, 242, 90, .55); }
.gm-region-h { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; min-height: 34px; }
.gm-region-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(126, 217, 87, .12); color: var(--gm-lime2); flex: none; }
.gm-region-ic svg, .gm-region-go svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gm-region-n { font: 700 13.5px/1.15 Montserrat, Inter, sans-serif; min-width: 0; }
.gm-region-go { margin-left: auto; color: var(--gm-muted); opacity: .6; transition: opacity .15s, color .15s; }
.gm-region:hover .gm-region-go, .gm-region.is-active .gm-region-go { opacity: 1; color: var(--gm-lime2); }
.gm-region ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gm-region li { display: grid; grid-template-columns: 15px 1fr; column-gap: 7px; align-items: start; }
.gm-region li i { grid-row: span 2; color: var(--gm-lime); margin-top: 1px; }
.gm-region li i svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: block; }
.gm-region li span { font-size: 10.5px; color: var(--gm-muted); line-height: 1.2; }
.gm-region li b { font: 700 14px/1.2 Montserrat, Inter, sans-serif; white-space: nowrap; }
.gm-region li b .gm-sk { width: 55%; height: 11px; margin: 3px 0 0; }
.gm-region-f { display: block; margin-top: 9px; padding-top: 7px; border-top: 1px solid rgba(255, 255, 255, .06); font-size: 10px; color: var(--gm-muted); }
.gm-note { margin: 10px 2px 0; font-size: 11px; line-height: 1.5; color: var(--gm-muted); }
.gm-note:empty { display: none; }
.gm-note b { color: #c5d0c9; font-weight: 600; }

@media (max-width: 1100px) {
  .gm-regions { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(172px, 1fr); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: rgba(126, 217, 87, .3) transparent; }
  .gm-region { scroll-snap-align: start; }
}

/* ---------------------------------------------------------------- mobile */
@media (max-width: 640px) {
  .gm-stage { height: 420px; border-radius: 14px; }
  .gm-head { left: 10px; top: 10px; font-size: 11px; padding: 6px 10px; }
  .gm-controls { right: 10px; top: 54px; transform: none; gap: 6px; }
  .gm-btn { width: 36px; height: 36px; border-radius: 10px; }
  .gm-credits { right: 8px; bottom: 8px; }
  .gm-regions { grid-auto-columns: 168px; gap: 10px; margin-left: -2px; margin-right: -2px; }
}
.gm-card.gm-card--sheet {
  position: relative; left: auto; top: auto; width: auto; max-height: none; overflow: visible;
  margin-top: 12px; border-radius: 16px;
}
.gm-card--sheet .gm-card-h { position: static; border-radius: 16px 16px 0 0; }
.gm-card--sheet .gm-card-b { padding: 10px 14px 14px; }
.gm-card--sheet .gm-stat b { font-size: 15.5px; }

@media (prefers-reduced-motion: reduce) {
  .gm-node-ring, .gm-live-dot, .gm-sk, .gm-spin { animation: none; }
  .gm-card, .gm-more { animation: none; }
}

/* compact card: one 2x2 grid, solar column left, grid column right */
.gm-sec h5 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
.gm-sec h5 > span { display: flex; align-items: center; gap: 6px; min-width: 0; }
.gm-sec h5 .gm-badge { margin-left: 2px; }
.gm-sec h5 > .gm-badge--warn { position: absolute; right: 16px; }
.gm-h-gap { display: none !important; }
.gm-stat { padding: 8px 10px; }
.gm-stat b { font-size: 16px; }
.gm-card-h { padding: 12px 12px 9px 14px; }
.gm-card-b { padding: 10px 14px 14px; }
.gm-sec { margin-top: 10px; position: relative; }
.gm-card-b > .gm-sec:first-child { margin-top: 0; }
.gm-muted { margin-top: 7px; font-size: 11.5px; }
.gm-calc { margin-top: 10px; padding: 8px 11px; font-size: 12px; }
.gm-src { margin-top: 9px; font-size: 10px; }
.gm-cta { margin-top: 10px; height: 38px; }
