/* SETT Globe — Styles
   Brand: Navy #071c42, Green #AAC737, Montserrat */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

/* ── Reset & Base ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #071c42;
  --navy-light: #0e2d5e;
  --green: #AAC737;
  --green-dark: #7a9a1a;
  --green-light: #c8e050;
  --grey: #686868;
  --white: #ffffff;
  --land: #163870;
  --land-hover: #1e5090;
  --land-selected: #AAC737;
  --font: 'Montserrat', sans-serif;
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--navy);
  color: var(--white);
  overflow-x: hidden;
}

/* ── Loading Screen ─────────────────────────────── */
.globe-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  z-index: 1000;
  transition: opacity 0.5s ease;
}
.globe-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.globe-loader .spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(170,199,55,0.15);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.globe-loader .loader-text {
  margin-top: 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--green);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Header ─────────────────────────────────────── */
.globe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(7,28,66,0.95);
  border-bottom: 1px solid rgba(170,199,55,0.15);
  position: relative;
  z-index: 10;
}
.globe-header .logo img {
  height: 32px;
  width: auto;
}
.globe-header nav a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  margin-left: 24px;
  transition: color 0.2s;
}
.globe-header nav a:hover { color: var(--green); }

/* ── Main Layout ────────────────────────────────── */
.globe-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.globe-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 24px 24px;
  position: relative;
}

/* ── Search Bar ─────────────────────────────────── */
.globe-search-wrap {
  width: 100%;
  max-width: 480px;
  position: relative;
  margin-bottom: 16px;
  z-index: 50;
}
.globe-search-wrap input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: rgba(14,45,94,0.8);
  border: 1px solid rgba(170,199,55,0.25);
  border-radius: 8px;
  color: var(--white);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.globe-search-wrap input::placeholder {
  color: rgba(255,255,255,0.4);
}
.globe-search-wrap input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(170,199,55,0.15);
}
.globe-search-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(170,199,55,0.5);
  font-size: 16px;
  pointer-events: none;
}
.globe-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(14,45,94,0.97);
  border: 1px solid rgba(170,199,55,0.25);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 51;
}
.globe-search-results.active { display: block; }
.globe-search-results .result-item {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
}
.globe-search-results .result-item:hover,
.globe-search-results .result-item.active {
  background: rgba(170,199,55,0.12);
}
.globe-search-results .result-item .result-type {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--green);
  min-width: 56px;
}
.globe-search-results .result-item .result-name {
  color: var(--white);
  font-weight: 500;
}
.globe-search-results .result-item .result-sub {
  color: rgba(255,255,255,0.4);
  font-weight: 400;
  margin-left: 4px;
}

/* ── Globe Container ────────────────────────────── */
.globe-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 1 / 0.85;
}
.globe-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Tooltip ────────────────────────────────────── */
.globe-tooltip {
  position: fixed;
  padding: 6px 12px;
  background: rgba(7,28,66,0.92);
  border: 1px solid rgba(170,199,55,0.3);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
  z-index: 100;
}
.globe-tooltip.visible { opacity: 1; }

/* ── Exploration Counter ────────────────────────── */
.explore-counter {
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.5px;
}
.explore-counter span {
  color: var(--green);
  font-weight: 700;
}

/* ── Spin Button ────────────────────────────────── */
.spin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 24px;
  background: transparent;
  border: 2px solid var(--green);
  border-radius: 999px;
  color: var(--green);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.spin-btn:hover {
  background: var(--green);
  color: var(--navy);
}
.spin-btn:active { transform: scale(0.97); }
.spin-btn .spin-icon {
  display: inline-block;
  transition: transform 0.3s;
}
.spin-btn:hover .spin-icon { transform: rotate(90deg); }

/* ── Zoom Controls ──────────────────────────────── */
.zoom-controls {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 20;
}
.zoom-controls button {
  width: 36px;
  height: 36px;
  background: rgba(14,45,94,0.85);
  border: 1px solid rgba(170,199,55,0.25);
  color: var(--white);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.zoom-controls button:hover {
  background: rgba(170,199,55,0.2);
  border-color: var(--green);
}
.zoom-controls button:first-child { border-radius: 6px 6px 0 0; }
.zoom-controls button:last-child { border-radius: 0 0 6px 6px; }
.zoom-controls .zoom-label {
  width: 36px;
  height: 24px;
  background: rgba(14,45,94,0.85);
  border-left: 1px solid rgba(170,199,55,0.25);
  border-right: 1px solid rgba(170,199,55,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  user-select: none;
}

/* ── Info Card ──────────────────────────────────── */
.info-card {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  width: 320px;
  background: rgba(7,28,66,0.96);
  border: 1px solid rgba(170,199,55,0.3);
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 30;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.info-card.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}
.info-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--green);
}
.info-card-header h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.info-card-close {
  width: 28px;
  height: 28px;
  background: rgba(7,28,66,0.2);
  border: none;
  border-radius: 50%;
  color: var(--navy);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.info-card-close:hover { background: rgba(7,28,66,0.35); }
.info-card-body {
  padding: 16px;
}
.info-card-desc {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255,255,255,0.75);
  margin-bottom: 16px;
}
.info-card-cities-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
}
.info-card-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.city-tag {
  padding: 6px 12px;
  background: rgba(170,199,55,0.12);
  border: 1px solid rgba(170,199,55,0.3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.city-tag:hover {
  background: var(--green);
  color: var(--navy);
}
.info-card-cta {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--green);
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--navy);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s;
}
.info-card-cta:hover { background: var(--green-light); }

/* ── Footer ─────────────────────────────────────── */
.globe-footer {
  text-align: center;
  padding: 16px 24px;
  border-top: 1px solid rgba(170,199,55,0.1);
  font-size: 11px;
  color: rgba(255,255,255,0.3);
}
.globe-footer a {
  color: var(--green);
  text-decoration: none;
}

/* ── Powered-by badge (widget only) ─────────────── */
.powered-badge {
  text-align: center;
  padding: 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}
.powered-badge a {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}

/* ── Pulsing Pin (search result) ────────────────── */
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  .info-card {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 480px;
    margin-top: 16px;
  }
  .info-card.visible {
    transform: none;
  }
  .globe-container {
    max-width: 600px;
  }
}
@media (max-width: 600px) {
  .globe-header { padding: 12px 16px; }
  .globe-header nav a { margin-left: 16px; font-size: 12px; }
  .globe-main { padding: 12px 16px 16px; }
  .globe-container {
    aspect-ratio: 1 / 1;
    max-width: 100%;
  }
  .info-card {
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
  }
  .zoom-controls button { width: 32px; height: 32px; font-size: 16px; }
  .zoom-controls .zoom-label { width: 32px; font-size: 8px; }
  .globe-search-wrap input { font-size: 16px; /* prevent iOS zoom */ }
  .spin-btn { font-size: 12px; padding: 8px 20px; }
}

/* ── Widget body (no chrome) ────────────────────── */
body.widget-mode {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.widget-mode .globe-main {
  flex: 1;
  padding-top: 8px;
}
