/**
 * Pannellum Info-Hotspot Styling
 * Verbesserte Darstellung für HTML-Inhalte in Info-Hotspots
 */

/* Info-Hotspot Icon im Panorama */
.info-hotspot-icon {
  position: relative;
  z-index: 1;
}

/* Info-Box Container */
.info-hotspot-box {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Info-Box Content Styling */
.info-hotspot-content {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.info-hotspot-content * {
  max-width: 100%;
}

/* HTML-Elemente in Info-Boxen */
.info-hotspot-content h1,
.info-hotspot-content h2,
.info-hotspot-content h3,
.info-hotspot-content h4,
.info-hotspot-content h5,
.info-hotspot-content h6 {
  margin: 12px 0 8px 0;
  color: #333;
  font-weight: 600;
  line-height: 1.3;
}

.info-hotspot-content h1 { font-size: 1.8em; }
.info-hotspot-content h2 { font-size: 1.5em; }
.info-hotspot-content h3 { font-size: 1.3em; }
.info-hotspot-content h4 { font-size: 1.1em; }
.info-hotspot-content h5,
.info-hotspot-content h6 { font-size: 1em; }

.info-hotspot-content p {
  margin: 8px 0;
  color: #333;
}

.info-hotspot-content strong,
.info-hotspot-content b {
  font-weight: 600;
  color: #000;
}

.info-hotspot-content em,
.info-hotspot-content i {
  font-style: italic;
}

.info-hotspot-content a {
  color: #2196F3;
  text-decoration: underline;
  transition: color 0.2s;
}

.info-hotspot-content a:hover {
  color: #1976D2;
}

.info-hotspot-content ul,
.info-hotspot-content ol {
  margin: 10px 0;
  padding-left: 24px;
}

.info-hotspot-content li {
  margin: 6px 0;
  color: #333;
}

.info-hotspot-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 12px 0;
  display: block;
}

.info-hotspot-content code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #d32f2f;
}

.info-hotspot-content pre {
  background: #f5f5f5;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid #e0e0e0;
}

.info-hotspot-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.info-hotspot-content blockquote {
  border-left: 4px solid #2196F3;
  padding-left: 16px;
  margin: 12px 0;
  font-style: italic;
  color: #666;
}

.info-hotspot-content hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 16px 0;
}

/* Tabellen in Info-Boxen */
.info-hotspot-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.95em;
}

.info-hotspot-content th,
.info-hotspot-content td {
  padding: 8px 10px;
  border: 1px solid #e0e0e0;
  text-align: left;
}

.info-hotspot-content th {
  background: #f5f5f5;
  font-weight: 600;
  color: #333;
}

.info-hotspot-content tr:nth-child(even) {
  background: #fafafa;
}

/* Buttons/Links als Buttons */
.info-hotspot-content .btn,
.info-hotspot-content .button {
  display: inline-block;
  padding: 8px 16px;
  background: #2196F3;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  margin: 6px 3px;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.info-hotspot-content .btn:hover,
.info-hotspot-content .button:hover {
  background: #1976D2;
  color: white;
}

/* Video & iFrame Support */
.info-hotspot-content iframe,
.info-hotspot-content video {
  max-width: 100%;
  border-radius: 6px;
  margin: 12px 0;
}

/* Mobile Optimierung */
@media (max-width: 768px) {
  .info-hotspot-box {
    width: 95% !important;
    height: 80% !important;
    max-width: none !important;
    max-height: none !important;
  }

  .info-hotspot-content {
    padding: 16px !important;
    font-size: 14px !important;
  }

  .info-hotspot-content h1 { font-size: 1.5em; }
  .info-hotspot-content h2 { font-size: 1.3em; }
  .info-hotspot-content h3 { font-size: 1.2em; }

  .info-hotspot-content table {
    font-size: 0.85em;
  }

  .info-hotspot-content th,
  .info-hotspot-content td {
    padding: 6px 8px;
  }
}

/* Extra kleine Displays */
@media (max-width: 480px) {
  .info-hotspot-box {
    width: 100% !important;
    height: 90% !important;
    border-radius: 0 !important;
  }

  .info-hotspot-content {
    padding: 12px !important;
  }
}

/* Print Styles */
@media print {
  .info-hotspot-backdrop {
    display: none !important;
  }

  .info-hotspot-box {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    box-shadow: none !important;
    transform: none !important;
  }
}

/* Accessibility */
.info-hotspot-icon:focus,
.info-hotspot-box button:focus {
  outline: 2px solid #2196F3;
  outline-offset: 2px;
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
  .info-hotspot-box {
    background: rgba(30, 30, 30, 0.98) !important;
  }

  .info-hotspot-content {
    color: #e0e0e0 !important;
  }

  .info-hotspot-content h1,
  .info-hotspot-content h2,
  .info-hotspot-content h3,
  .info-hotspot-content h4,
  .info-hotspot-content h5,
  .info-hotspot-content h6 {
    color: #fff !important;
  }

  .info-hotspot-content p,
  .info-hotspot-content li {
    color: #e0e0e0 !important;
  }

  .info-hotspot-content code {
    background: #424242;
    color: #ff6b6b;
  }

  .info-hotspot-content pre {
    background: #424242;
    border-color: #616161;
  }

  .info-hotspot-content th {
    background: #424242;
    color: #fff;
  }

  .info-hotspot-content td,
  .info-hotspot-content th {
    border-color: #616161;
  }

  .info-hotspot-content tr:nth-child(even) {
    background: #333;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Scrollbar Styling (Webkit) */
.info-hotspot-content::-webkit-scrollbar {
  width: 8px;
}

.info-hotspot-content::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 4px;
}

.info-hotspot-content::-webkit-scrollbar-thumb {
  background: #bdbdbd;
  border-radius: 4px;
}

.info-hotspot-content::-webkit-scrollbar-thumb:hover {
  background: #9e9e9e;
}
