/* Dutch Roots Interactive Atlas Stylesheet - VisitHollandMI.com */

.atlas-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--space-6);
  min-height: calc(100vh - 180px);
  margin-top: var(--space-6);
  margin-bottom: var(--space-8);
  position: relative;
}

@media (max-width: 1024px) {
  .atlas-layout {
    grid-template-columns: 1fr;
  }
}

/* Globe Stage Container */
.globe-stage {
  position: sticky;
  top: 90px;
  align-self: start;
  height: 640px;
  max-height: calc(100vh - 120px);
  min-height: 500px;
  background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
}

@media (max-width: 1024px) {
  .globe-stage {
    position: relative;
    top: 0;
    height: 480px;
    max-height: 65vh;
    min-height: 380px;
  }
}

.globe-canvas {
  width: 100%;
  height: 100%;
  flex: 1;
  display: block;
  cursor: grab;
  touch-action: none;
}

.globe-canvas:active {
  cursor: grabbing;
}

/* HUD Overlay Badges on Globe */
.globe-hud {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.9rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 0.8125rem;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.globe-hud-title {
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.globe-hud-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.globe-hud-stat {
  font-variant-numeric: tabular-nums;
  color: #cbd5e1;
  font-size: 0.75rem;
}

/* Stage Bottom Controls Bar */
.globe-controls {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  pointer-events: none;
  z-index: 10;
}

.globe-controls-group {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.globe-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: inherit;
}

.globe-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #ffffff;
  color: #ffffff;
}

.globe-btn-active {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  font-weight: 700;
}

/* Legend */
.globe-legend {
  font-size: 0.75rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.35rem 0.65rem;
}

.legend-line {
  display: inline-block;
  width: 16px;
  height: 2px;
  background: #f59e0b;
  border-radius: 1px;
}

.legend-dot-us {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px #ffffff;
}

.legend-dot-nl {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 6px #ea580c;
}

/* Narrative Story Card & Settlement Selector */
.atlas-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.settlement-selector {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.settlement-selector-title {
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary-dark);
  margin-top: 0;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settlement-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.settlement-tab {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: inherit;
  width: 100%;
}

.settlement-tab:hover {
  background: #eff6ff;
  border-color: var(--color-primary-light);
  transform: translateY(-1px);
}

.settlement-tab-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(11, 44, 77, 0.25);
}

.settlement-tab-active .settlement-tab-name,
.settlement-tab-active .settlement-tab-meta {
  color: #ffffff;
}

.settlement-tab-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text);
}

.settlement-tab-meta {
  font-size: 0.6875rem;
  color: var(--color-text-subtle);
}

/* Detail Story Card */
.settlement-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
}

.settlement-card-header {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-3);
}

.settlement-badge {
  display: inline-block;
  background-color: var(--color-notice-bg);
  color: var(--color-primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
  border: 1px solid var(--color-border-dark);
}

.settlement-card-title {
  margin: 0;
  font-size: 1.35rem;
  color: var(--color-primary);
  line-height: 1.25;
}

.settlement-origin-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text);
  margin-top: var(--space-2);
}

.settlement-origin-link {
  font-weight: 700;
  color: #ea580c;
}

.settlement-card-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2);
  font-size: 0.8125rem;
}

.settlement-card-meta li {
  display: grid;
  grid-template-columns: 9.25rem 1fr;
  align-items: baseline;
  gap: var(--space-3);
  border-bottom: 1px dashed var(--color-border-light);
  padding-bottom: 6px;
}

.meta-lbl {
  font-weight: 700;
  color: var(--color-text-subtle);
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.settlement-card .card-footer-cta .btn {
  display: flex;
  width: 100%;
  justify-content: center;
  text-align: center;
  white-space: normal;
  text-wrap: balance;
}

.meta-val {
  color: var(--color-text);
  font-weight: 600;
}

.settlement-card-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0;
}

.settlement-card-legacy {
  background-color: #f8fafc;
  border-left: 3px solid var(--color-accent);
  padding: var(--space-3) var(--space-4);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-text);
}

.settlement-card-legacy strong {
  color: var(--color-primary-dark);
}

.holland-3d-section {
  scroll-margin-top: 96px;
}

.holland-3d-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.holland-3d-heading h2 {
  margin: 0.25rem 0 0;
  color: var(--color-primary);
  font-size: 1.75rem;
  line-height: 1.2;
}

.holland-3d-kicker {
  color: #a34d17;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.3;
}

.holland-3d-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.holland-3d-action {
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  border: 1px solid #c5d0d8;
  border-radius: 4px;
  background: #fff;
  color: #193b52;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.holland-3d-action:hover,
.holland-3d-action[aria-pressed="true"] {
  border-color: #a34d17;
  background: #fff4e9;
  color: #71310d;
}

.holland-3d-action:focus-visible {
  outline: 3px solid #146a80;
  outline-offset: 2px;
}

.holland-3d-poi-select {
  min-width: 210px;
  min-height: 42px;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid #c5d0d8;
  border-radius: 4px;
  background: #fff;
  color: #193b52;
  font: inherit;
  font-size: 0.875rem;
}

.holland-3d-poi-select:focus-visible {
  outline: 3px solid #146a80;
  outline-offset: 2px;
}

.three-d-mapper-canvas-wrapper {
  position: relative;
  width: 100%;
  isolation: isolate;
}

.holland-3d-map-wrapper {
  height: 660px;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid #bdcbd2;
  border-radius: 6px;
  background: #dce6e8;
  box-shadow: 0 10px 28px rgb(18 44 57 / 14%);
}

#holland3dMap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #dce6e8;
}

.holland-3d-map-status {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 2rem);
  margin: 0;
  padding: 0.7rem 0.9rem;
  transform: translate(-50%, -50%);
  border: 1px solid #c5d0d8;
  border-radius: 4px;
  background: #fff;
  color: #193b52;
  font-size: 0.875rem;
}

.holland-3d-map-status[hidden] {
  display: none;
}

.holland-3d-attribution-note {
  margin: 0.5rem 0 0;
  color: #475764;
  font-size: 0.75rem;
  line-height: 1.5;
}

.maplibregl-popup-content {
  max-width: min(290px, calc(100vw - 48px));
  padding: 0.9rem 1rem;
  border-radius: 4px;
  color: #1d2e38;
  font-family: inherit;
}

.maplibregl-popup-content h3 {
  margin: 0 1.1rem 0.45rem 0;
  color: #193b52;
  font-size: 1rem;
  line-height: 1.3;
}

.maplibregl-popup-content p {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.maplibregl-ctrl-group {
  overflow: hidden;
  border-radius: 4px !important;
}

.maplibregl-ctrl button:focus-visible {
  outline: 3px solid #146a80;
  outline-offset: -3px;
}

@media (max-width: 640px) {
  .holland-3d-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .holland-3d-actions {
    width: 100%;
  }

  .holland-3d-action {
    flex: 1 1 auto;
  }

  .holland-3d-poi-select {
    flex: 1 1 100%;
    min-width: 0;
  }

  .holland-3d-map-wrapper {
    height: 580px;
    min-height: 480px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .holland-3d-action {
    scroll-behavior: auto;
  }
}


.globe-loader {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #e2e8f0;
  font-size: 0.95rem;
  background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
}
.globe-loader[hidden] { display: none; }
.globe-loader-ring {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(226, 232, 240, 0.25);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: globe-spin 0.9s linear infinite;
}
.globe-loader-error .globe-loader-ring { display: none; }
@keyframes globe-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .globe-loader-ring { animation: none; }
}
