/* Debug Modal Dialog Styles */
/* TODO: Temporären Code entfernen, bevor Go-Live! */
#analytwertebox {
  position: relative;
}

.debug-trigger {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: transparent;
  border: none;
  cursor: default; /* Normal cursor, damit es nicht auffällt */
  opacity: 0;
  padding: 0;
  margin: 0;
  z-index: 5;
  transition: opacity 0.2s, background 0.2s;
}

/* Nur beim Hover leicht sichtbar */
.debug-trigger:hover {
  opacity: 0.15;
  background: var(--akzentfarbe);
  cursor: pointer;
  border-radius: 50%;
}

/* Bei Focus sichtbarer (für Tastatur-Navigation) */
.debug-trigger:focus {
  opacity: 0.4;
  background: var(--akzentfarbe);
  outline: 1px dashed var(--primaerfarbe);
  border-radius: 50%;
}

.debug-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.debug-modal-content {
  background: white;
  border-radius: 8px;
  width: 95vw;
  height: 97vh;
  overflow: hidden;
  border: 1px solid #dee2e6;
  display: flex;
  flex-direction: column;
}

.debug-modal-header {
  background: #f8f9fa;
  padding: 12px 24px;
  border-bottom: 2px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  top: 0;
}

.debug-header-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.debug-modal-header h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.1em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.debug-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  font-weight: bold;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.debug-modal-close:hover {
  background: #dc3545;
  color: white;
}

.debug-modal-body {
  padding: 0;
  overflow: visible;
  flex: 1;
  min-height: 0;
}

.debug-modal-body::-webkit-scrollbar {
  width: 8px;
}

.debug-modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.debug-modal-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.debug-modal-body::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.debug-modal-body h4 {
  color: #2c3e50;
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

/* Debug CODE-Chip in der Überschrift */
.debug-code-chip {
  display: inline-block;
  background: #e8f5e8;
  border: 1px solid #d4f4d4;
  padding: 2px 6px;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 0.85em;
  font-weight: 600;
  color: #2c3e50;
  cursor: pointer;
}

.debug-code-chip:hover {
  background: #e3f2fd;
}

/* Debug Legende - kompakt rechts im Header */
.debug-legende {
  display: flex;
  gap: 5px;
  padding-right: 5px;
  font-size: 11px;
  font-weight: 500;
}

.legende-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #495057;
}

.farbe-gemeinsam {
  width: 10px;
  height: 10px;
  background: #e8f5e8;
  border: 1px solid #d4f4d4;
  flex-shrink: 0;
}

.farbe-divergent {
  width: 10px;
  height: 10px;
  background: #ffe8e8;
  border: 1px solid #ffd4d4;
  flex-shrink: 0;
}

/* Debug Objekt Container Styles */
.debug-objekt-container {
  margin-bottom: 32px;
  border: 1px solid #e9ecef;
  padding: 20px;
  background: #ffffff;
}

/* Debug Vergleichstabelle (neue Struktur: Spalten = Felder, Zeilen = Objekte) */
.debug-vergleichstabelle-container {
  overflow: auto;
  border: 1px solid #e9ecef;
  background: white;
  height: calc(100vh - 90px);
}

.debug-vergleichstabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.debug-vergleichstabelle th {
  background: #f8f9fa;
  padding: 10px 8px;
  text-align: center;
  border-bottom: 2px solid #dee2e6;
  border-right: 1px solid #dee2e6;
  font-weight: 600;
  color: #2c3e50;
  font-size: 11px;
  letter-spacing: 0.3px;
  top: 0;
  writing-mode: vertical-lr;
  text-orientation: mixed;
  min-width: 80px;
  max-width: 120px;
}

.debug-vergleichstabelle th.objekt-spalte {
  background: #e9ecef;
  min-width: 40px;
  max-width: 60px;
}

.debug-vergleichstabelle th.feld-spalte.gemeinsames-feld {
  background: #d4f4d4;
}

.debug-vergleichstabelle th.feld-spalte.divergentes-feld {
  background: #ffd4d4;
}

.debug-vergleichstabelle th:last-child {
  border-right: none;
}

.debug-vergleichstabelle td {
  padding: 8px;
  border-bottom: 1px solid #f1f3f4;
  border-right: 1px solid #f1f3f4;
  vertical-align: middle;
  cursor: pointer;
  text-align: center;
}

.debug-vergleichstabelle td.objekt-info {
  background: #f8f9fa;
  border-right: 2px solid #ced4da;
  text-align: right;
}

.debug-vergleichstabelle td:last-child {
  border-right: none;
}

.debug-vergleichstabelle td:hover:not(.objekt-info) {
  background: #e3f2fd !important;
}

.debug-vergleichstabelle td.objekt-info:hover {
  background: #e3f2fd !important;
}

/* Gemeinsame und divergente Felder */
.debug-vergleichstabelle td.gemeinsames-feld {
  background: #e8f5e8;
}

.debug-vergleichstabelle td.divergentes-feld {
  background: #ffe8e8;
}

.debug-vergleichstabelle td.normen-spalte-zelle {
  text-align: center;
  vertical-align: middle;
  width: 80px;
  min-width: 80px;
  max-width: 80px;
  background: #f8f9fa;
  padding: 8px 4px;
}

.debug-vergleichstabelle td.normen-spalte-zelle.gemeinsames-feld {
  background: #e8f5e8;
}

.debug-vergleichstabelle td.normen-spalte-zelle.divergentes-feld {
  background: #ffe8e8;
}

.debug-vergleichstabelle code {
  background: transparent;
  padding: 4px 6px;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 11px;
  color: #495057;
  border: none;
  word-break: break-all;
  display: block;
  width: 100%;
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Normen Toggle Button */
.normen-toggle {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  padding: 2px 6px;
  font-size: 10px;
  cursor: pointer;
  margin-left: 8px;
  color: #1976d2;
  font-weight: 500;
}

.normen-toggle:hover {
  background: #bbdefb;
}

/* Normen Details Zeile */
.normen-details-zeile {
  background: #f8f9fa;
  border-top: 1px solid #dee2e6 !important;
  border-bottom: 1px solid #dee2e6 !important;
  position: relative;
}

.normen-container {
  padding: 16px !important;
  background: #f8f9fa;
  position: relative;
}

.normen-header {
  font-weight: 600;
  font-size: 14px;
  color: #2c3e50;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ced4da;
}

.normen-tabelle-container {
  overflow-x: auto;
  border: 1px solid #dee2e6;
  background: white;
  position: relative;
}

.normen-tabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: white;
}

.normen-tabelle th {
  writing-mode: horizontal-tb;
  background: #e9ecef;
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid #ced4da;
  border-right: 1px solid #ced4da;
  font-weight: 600;
  color: #2c3e50;
  font-size: 11px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  top: 0;
}

.normen-tabelle th:last-child {
  border-right: none;
}

.normen-tabelle td {
  padding: 6px 10px;
  border-bottom: 1px solid #f1f3f4;
  border-right: 1px solid #f1f3f4;
  vertical-align: middle;
  text-align: center;
}

.normen-tabelle td:last-child {
  border-right: none;
}

.normen-tabelle .norm-nummer {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
  width: 40px;
  min-width: 40px;
}

.normen-tabelle .norm-wert {
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  background: #f8f9fa;
  color: #495057;
  font-size: 11px;
  font-weight: 500;
  min-width: 60px;
}

/* Entferne nicht mehr benötigte Objekt-Container Styles */

.debug-button {
  background: #17a2b8;
  color: white;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.debug-button:hover {
  background: #138496;
}
