/* J.B.O. Wind Farm Globe — scoped, container-relative styles.
   Everything lives under .jbo-globe-root so it never collides with the theme. */
.jbo-globe-root {
  --jbo-brand: #008F85;
  --jbo-brand-dark: #00706a;
  --jbo-bg: #ffffff;
  --jbo-panel: #ffffff;
  --jbo-text: #14211f;
  --jbo-muted: #5c6a68;
  --jbo-line: #e2e8e7;
  --jbo-shadow: 0 12px 40px rgba(0,0,0,.18);
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: var(--jbo-bg);
  color: var(--jbo-text);
  font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
  box-sizing: border-box;
}
.jbo-globe-root[data-theme="dark"] {
  --jbo-bg: #0d1211;
  --jbo-panel: #131b1a;
  --jbo-text: #eaf2f0;
  --jbo-muted: #9fb0ad;
  --jbo-line: #223230;
  --jbo-shadow: 0 12px 40px rgba(0,0,0,.55);
}
.jbo-globe-root *, .jbo-globe-root *::before, .jbo-globe-root *::after { box-sizing: border-box; }

.jbo-globe-root .jbo-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: none; cursor: grab;
}
.jbo-globe-root .jbo-canvas.dragging { cursor: grabbing; }

/* Sidebar list */
.jbo-globe-root .jbo-sidebar {
  position: absolute; top: 16px; left: 16px; bottom: 16px; width: 300px;
  background: linear-gradient(135deg, rgba(0,107,100,.58), rgba(0,64,60,.68));
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  backdrop-filter: blur(22px) saturate(1.35);
  border: 1px solid rgba(255,255,255,.30);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 30px 70px rgba(0,0,0,.28);
  color: #fff;
  display: flex; flex-direction: column; overflow: hidden; z-index: 5;
  transition: transform .35s ease;
}
.jbo-globe-root .jbo-sidebar.hidden { transform: translateX(-340px); }
.jbo-globe-root .jbo-sidebar header {
  /* 76px left padding keeps the title clear of the 48px ☰ toggle circle */
  padding: 18px 16px 14px 76px; min-height: 64px;
  border-bottom: 1px solid rgba(255,255,255,.25);
  background: transparent; color: #fff;
}
.jbo-globe-root .jbo-sidebar header h1 {
  margin: 0; font-size: 15px; font-weight: 700; letter-spacing: .3px; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.jbo-globe-root .jbo-sidebar header p {
  margin: 4px 0 0; font-size: 12px; color: rgba(255,255,255,.95);
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.jbo-globe-root .jbo-search {
  margin: 12px 12px 6px; display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  border-radius: 11px; padding: 8px 10px;
}
.jbo-globe-root .jbo-search input {
  border: 0; outline: 0; background: transparent; color: #fff;
  font-size: 14px; width: 100%;
}
.jbo-globe-root .jbo-search input::placeholder { color: rgba(255,255,255,.85); }
.jbo-globe-root .jbo-list { list-style: none; margin: 0; padding: 4px 8px 12px; overflow-y: auto; flex: 1; }
.jbo-globe-root .jbo-item {
  display: flex; align-items: center; gap: 10px; padding: 10px;
  border-radius: 10px; cursor: pointer; transition: background .15s;
}
.jbo-globe-root .jbo-item:hover { background: rgba(255,255,255,.14); }
.jbo-globe-root .jbo-dot { width: 12px; height: 12px; border-radius: 50%; background: #F2B91C; flex: none; box-shadow: 0 0 10px rgba(242,185,28,.6); }
.jbo-globe-root .jbo-dot.loading { background: #c9a227; }
.jbo-globe-root .jbo-name { font-size: 14px; font-weight: 600; line-height: 1.2; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.jbo-globe-root .jbo-region { font-size: 12px; color: rgba(255,255,255,.9); text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.jbo-globe-root .jbo-count { padding: 8px 16px; font-size: 12px; color: rgba(255,255,255,.92); border-top: 1px solid rgba(255,255,255,.22); }

/* Detail panel — frosted "glassmorphism" modal, centred, blurred globe behind */
/* Scrim: blurs + gently darkens the whole globe behind the card */
.jbo-globe-root .jbo-scrim {
  position: absolute; inset: 0; z-index: 8;
  background: rgba(8, 20, 19, 0.30);
  -webkit-backdrop-filter: blur(9px) saturate(1.05);
  backdrop-filter: blur(9px) saturate(1.05);
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.jbo-globe-root .jbo-scrim.visible { opacity: 1; pointer-events: auto; }

.jbo-globe-root .jbo-panel {
  position: absolute; top: 16px; bottom: 16px; right: 16px; width: 440px;
  color: #fff; z-index: 9;
  background: linear-gradient(135deg, rgba(0,107,100,.58), rgba(0,64,60,.68));
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  backdrop-filter: blur(22px) saturate(1.35);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 30px 70px rgba(0,0,0,.38);
  overflow: hidden; display: flex; flex-direction: column;
  transform: translateX(calc(100% + 24px));
  transition: transform .4s cubic-bezier(.2,.9,.3,1);
}
.jbo-globe-root .jbo-panel.visible { transform: translateX(0); }
.jbo-globe-root .jbo-banner { width: 100%; height: auto; background: transparent; position: relative; flex: none; padding: 22px 22px 0; }
.jbo-globe-root .jbo-banner img {
  width: 100%; height: auto; max-height: 300px; object-fit: cover; display: block;
  border-radius: 16px; border: 1px solid rgba(255,255,255,.30);
  box-shadow: 0 14px 40px rgba(242,185,28,.50), 0 6px 18px rgba(0,0,0,.30);
}
.jbo-globe-root .jbo-close {
  position: absolute; top: 16px; right: 16px; width: 42px; height: 42px;
  border-radius: 50%; background: #F2B91C; color: #fff;
  border: none; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; cursor: pointer; line-height: 1; z-index: 2;
  box-shadow: 0 6px 18px rgba(0,0,0,.28); transition: background .15s, transform .15s;
}
.jbo-globe-root .jbo-close:hover { background: #ffc93d; transform: scale(1.06); }
.jbo-globe-root .jbo-body { padding: 22px 32px 32px; overflow-y: auto; color: #fff; }
.jbo-globe-root .jbo-body h2 {
  margin: 0 0 10px; font-size: 26px; line-height: 1.15; color: #fff;
  font-family: "Moderat Extended", "Helvetica Neue", Arial, sans-serif;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.jbo-globe-root .jbo-badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; padding: 4px 12px; border-radius: 20px;
  background: rgba(242,185,28,.92); color: #3a2c00; margin-bottom: 14px;
}
.jbo-globe-root .jbo-banner .jbo-badge {
  position: absolute; left: 28px; bottom: 8px; z-index: 2; margin: 0;
  background: rgba(242,185,28,.72);
  border: 1px solid rgba(255,255,255,.35);
  -webkit-backdrop-filter: blur(8px) saturate(1.15);
  backdrop-filter: blur(8px) saturate(1.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 3px 10px rgba(0,0,0,.18);
}
.jbo-globe-root .jbo-body p { font-size: 15px; line-height: 1.65; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.jbo-globe-root .jbo-link {
  /* merged onto the banner thumbnail, bottom-right corner of the image */
  position: absolute; right: 36px; bottom: 14px; z-index: 2;
  display: inline-block; color: #fff; background: #F2B91C;
  font-weight: 800; letter-spacing: .2px; text-decoration: none; font-size: 14px;
  padding: 10px 20px; border-radius: 999px; transition: transform .15s, box-shadow .15s, background .15s;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
/* no thumbnail: fall back to a normal right-aligned button below the header area */
.jbo-globe-root .jbo-banner.no-image { text-align: right; padding-bottom: 6px; }
.jbo-globe-root .jbo-banner.no-image .jbo-link { position: static; margin-right: 56px; }
.jbo-globe-root .jbo-link:hover { background: #ffc93d; }
.jbo-globe-root .jbo-link:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.jbo-globe-root .jbo-skeleton { color: rgba(255,255,255,.7); font-style: italic; }

/* Gentle float for the cluster-picker thumbnails */
@keyframes jboFloatCard { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Floating controls */
.jbo-globe-root .jbo-controls { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; z-index: 4; }
.jbo-globe-root .jbo-controls.shift { right: 472px; }
.jbo-globe-root .jbo-btn {
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: #F2B91C; color: #fff; cursor: pointer; font-size: 21px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0;
  box-shadow: 0 8px 22px rgba(0,0,0,.26); transition: background .15s, transform .15s; line-height: 1;
}
.jbo-globe-root .jbo-btn:hover { background: #ffc93d; transform: scale(1.06); }
.jbo-globe-root .jbo-zoombar { position: absolute; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 6px; z-index: 4; }
.jbo-globe-root .jbo-zoombar .jbo-btn { font-size: 24px; }
.jbo-globe-root .jbo-toggle {
  position: absolute; top: 16px; left: 16px; z-index: 7; width: 48px; height: 48px;
  border-radius: 50%; border: none;
  background: #F2B91C; color: #fff; cursor: pointer; font-size: 20px; font-weight: 700; padding: 0;
  box-shadow: 0 8px 22px rgba(0,0,0,.26); display: flex; align-items: center; justify-content: center; line-height: 1;
  transition: background .15s, transform .15s;
}
.jbo-globe-root .jbo-toggle:hover { background: #ffc93d; transform: scale(1.06); }
.jbo-globe-root .jbo-attrib {
  position: absolute; left: 16px; bottom: 16px; z-index: 4; font-size: 11px; color: rgba(255,255,255,.9);
  background: rgba(0,143,133,.32); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 5px 10px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.25);
}

@media (max-width: 720px) {
  .jbo-globe-root .jbo-sidebar { width: calc(100% - 32px); }
  .jbo-globe-root .jbo-panel { width: calc(100% - 24px); }
  .jbo-globe-root .jbo-body { padding: 18px 22px 24px; }
  .jbo-globe-root .jbo-controls.shift { right: 16px; }
  .jbo-globe-root .jbo-attrib { display: none; }
}

/* v2: keep the reference action at the bottom-right of the full detail panel.
   The link is rendered inside .jbo-banner, but must not be positioned against
   the image/banner because the v2 panel is the right-hand sidebar. */
.jbo-globe-root[data-variant="v2"] .jbo-link-banner { display: none; }
.jbo-globe-root[data-variant="v2"] .jbo-link-flow {
  position: static;
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 18px 0 0 auto;
}
