/* ============================================================================
   TLBG 3D Geo-Viewer – Styles
   ============================================================================ */

/* Reset & Full-bleed layout */
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #0b0f16;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: rgba(255, 255, 255, 0.92);
}

/* Viewer iframe: full viewport */
#iframe {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border: 0;
  display: block;
  background: transparent;
}

/* ============================================================================
   HUD: Building Details Panel
   TLBG Branding: Dunkelblau (#1e3a5f) + Grün (#2ecc71) + Gold (#f39c12)
   ============================================================================ */

.hud {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 480px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  z-index: 9999;

  background: rgba(14, 18, 26, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(46, 204, 113, 0.25);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(46, 204, 113, 0.1);
}

/* Responsive: Tablet */
@media (max-width: 768px) {
  .hud {
    width: 90vw;
    max-width: 420px;
    right: 5vw;
  }
}

/* Responsive: Mobile */
@media (max-width: 480px) {
  .hud {
    width: 95vw;
    max-width: none;
    right: 2.5vw;
    top: 80px;
    border-radius: 16px;
  }

  .hud__grid {
    grid-template-columns: 1fr;
  }

  .hud__kv {
    grid-template-columns: 80px 1fr;
    gap: 6px 10px;
    font-size: 11px;
  }

  .hud__headline-value {
    font-size: 18px;
  }

  .pill {
    font-size: 10px;
    padding: 5px 8px;
  }
}

/* Hide scrollbars but keep scroll functionality */
.hud {
  scrollbar-width: none;
}
.hud::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.hud.hidden {
  display: none;
}

/* Demo Banner */
.hud__demo {
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(230, 126, 34, 0.15), rgba(231, 76, 60, 0.1));
  border-bottom: 1px solid rgba(230, 126, 34, 0.3);
  font-size: 12px;
  font-weight: 700;
  color: rgba(230, 126, 34, 0.9);
  text-align: center;
  letter-spacing: 0.3px;
}

/* Headline: Flurstück + Bodenrichtwert */
.hud__headline {
  padding: 14px 14px 16px;
  margin-bottom: 12px;
  border-bottom: 2px solid rgba(46, 204, 113, 0.3);
}

.hud__headline-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(46, 204, 113, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.hud__headline-value {
  font-size: 22px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.1px;
}

/* Header: Close button */
.hud__header {
  display: flex;
  justify-content: flex-end;
  padding: 12px 14px 0;
  margin-bottom: 0;
  border-bottom: none;
}

.hud__close {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  flex: 0 0 auto;
  transition: background 150ms ease, color 150ms ease;
}
.hud__close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
}

/* Notice banner */
.hud__notice {
  margin: 10px 14px 0;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  font-size: 11px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 3px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

/* Pills: metadata tags */
.hud__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px 0;
}

.pill {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
}

/* Body content */
.hud__body {
  padding: 12px 14px 14px;
}

/* Row: label + value */
.hud__row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}

.hud__label {
  color: rgba(255, 255, 255, 0.70);
  font-size: 12px;
  padding-top: 2px;
}

.hud__value {
  font-size: 13px;
  font-weight: 700;
  word-break: break-word;
}

/* Grid: two-column card layout */
.hud__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

@media (max-width: 560px) {
  .hud__grid {
    grid-template-columns: 1fr;
  }
}

/* Card */
.hud__card {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 10px;
}

.hud__cardTitle {
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 8px;
}

/* Key-value pairs */
.hud__kv {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px 12px;
  font-size: 12px;
}

.hud__k {
  color: rgba(255, 255, 255, 0.66);
  font-weight: 500;
  white-space: nowrap;
}

.hud__v {
  color: rgba(255, 255, 255, 0.92);
  white-space: normal;
  word-break: break-word;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 600;
  line-height: 1.3;
}

/* Highlight: Gold color for important values (Bodenrichtwert) */
.hud__v--highlight {
  color: #f39c12;
  font-weight: 700;
}

/* Details: collapsible debug section */
.hud__details {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding-top: 10px;
}

.hud__details summary {
  cursor: pointer;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  list-style: none;
  user-select: none;
}

.hud__details summary::-webkit-details-marker {
  display: none;
}

.hud__json {
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.25);
  font-size: 11px;
  line-height: 1.35;
  max-height: 160px;
  overflow: auto;
  color: rgba(255, 255, 255, 0.92);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* ============================================================================
   Hint: Top-center instruction (prominent)
   ============================================================================ */

.hint {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;

  padding: 16px 28px;
  border-radius: 14px;
  border: 1px solid rgba(46, 204, 113, 0.3);
  background: rgba(14, 18, 26, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(46, 204, 113, 0.1);

  color: rgba(255, 255, 255, 0.95);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-align: center;
  white-space: nowrap;

  opacity: 1;
  transition: opacity 200ms ease;
}

.hint.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Responsive: Mobile */
@media (max-width: 480px) {
  .hint {
    top: 16px;
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 12px;
  }
}

