/* cin_bugreport */
/* bugreport.css */
/* ===== Fehlermeldung (cin_bugreport) =====
   Schwebender Knopf, Markiermodus, Panel und Adminliste. Farben nur über die
   CRM-Variablen, damit beide Themes stimmen. Ebenen: Knopf 1035 (wie
   cin_user_report), Panel 1080 (unter den Toasts bei 1090, über Modals ab
   1055), Markiermodus 2000 (über allem, damit auch Menüs und Modals markierbar
   sind). */

:root {
  --bug-mark: var(--cin-danger);
  --bug-panel-width: 420px;
  --bug-hold-ms: 1000ms;
}

/* ----- Schwebender Knopf ----- */
.cin-bugreport-widget {
  position: fixed;
  z-index: 1035;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--bs-primary);
  background-color: var(--bs-primary);
  color: var(--bs-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--cin-shadow-lg);
  cursor: grab;
  transition: transform 120ms ease, box-shadow 120ms ease;
  touch-action: none;
  padding: 0;
}

.cin-bugreport-widget:hover {
  transform: scale(1.05);
}

.cin-bugreport-widget-dragging {
  cursor: grabbing;
  transform: scale(1.05);
  opacity: 0.9;
  transition: none;
}

/* Minimiertes Panel: der Knopf trägt eine Pille mit dem Stand. */
.cin-bugreport-widget-pill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.4rem 0.6rem;
  border-radius: 9999px;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
  box-shadow: var(--cin-shadow-sm);
  pointer-events: none;
}

.cin-bugreport-widget[data-edge="left"] .cin-bugreport-widget-pill {
  left: calc(100% + 8px);
}

.cin-bugreport-widget[data-edge="right"] .cin-bugreport-widget-pill {
  right: calc(100% + 8px);
}

.cin-bugreport-widget-active {
  border-color: var(--bug-mark);
  background-color: var(--bug-mark);
}

/* ----- Markiermodus ----- */
.cin-bugreport-frame {
  position: fixed;
  z-index: 2000;
  pointer-events: none;
  border: 2px solid var(--bug-mark);
  border-radius: 4px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.32), 0 0 0 3px rgba(239, 68, 68, 0.25);
  transition: top 60ms linear, left 60ms linear, width 60ms linear, height 60ms linear;
  display: none;
}

.cin-bugreport-frame-visible {
  display: block;
}

.cin-bugreport-frame-label {
  position: absolute;
  left: -2px;
  bottom: calc(100% + 6px);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  background-color: var(--bug-mark);
  color: #fff;
}

.cin-bugreport-frame-label-below {
  bottom: auto;
  top: calc(100% + 6px);
}

/* Füllanimation beim Halten: ein Balken läuft über die Kante. */
.cin-bugreport-frame-progress {
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -2px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.5);
  overflow: hidden;
  display: none;
}

.cin-bugreport-frame-holding .cin-bugreport-frame-progress {
  display: block;
}

.cin-bugreport-frame-progress::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 0;
  background-color: var(--bug-mark);
}

.cin-bugreport-frame-holding .cin-bugreport-frame-progress::after {
  animation: cin-bugreport-fill var(--bug-hold-ms) linear forwards;
}

@keyframes cin-bugreport-fill {
  from { width: 0; }
  to { width: 100%; }
}

.cin-bugreport-hint {
  position: fixed;
  z-index: 2001;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.9rem;
  border-radius: 9999px;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
  box-shadow: var(--cin-shadow-lg);
  font-size: 0.875rem;
  pointer-events: auto;
}

.cin-bugreport-hint kbd {
  font-size: 0.75rem;
}

body.cin-bugreport-picking {
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
}

body.cin-bugreport-picking * {
  cursor: crosshair !important;
}

/* ----- Panel ----- */
.cin-bugreport-panel {
  position: fixed;
  z-index: 1080;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: var(--bug-panel-width);
  max-width: calc(100vw - 24px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  box-shadow: var(--cin-shadow-xl);
  overflow: hidden;
  animation: cin-bugreport-slide 220ms ease-out;
}

@keyframes cin-bugreport-slide {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.cin-bugreport-panel-hidden {
  display: none;
}

.cin-bugreport-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--bs-border-color);
  background-color: var(--cin-surface-subtle);
}

.cin-bugreport-head .cin-bugreport-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.cin-bugreport-head .btn {
  flex: 0 0 auto;
}

.cin-bugreport-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cin-bugreport-foot {
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--bs-border-color);
  background-color: var(--cin-surface-subtle);
}

.cin-bugreport-foot .btn-primary {
  margin-left: auto;
}

/* Was markiert wurde: Bild links, Fakten rechts. */
.cin-bugreport-mark {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 0.75rem;
  align-items: start;
}

.cin-bugreport-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--cin-surface-raised);
  padding: 0;
  cursor: zoom-in;
}

.cin-bugreport-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Die große Vorschau im Panel und im Bericht zeigt das ganze Bild (nicht nur
   einen Ausschnitt), damit die markierte Stelle sicher zu sehen ist. */
.cin-bugreport-mark .cin-bugreport-thumb img,
.cin-bugreport-detail .cin-bugreport-thumb img {
  object-fit: contain;
  background-color: var(--cin-surface-raised);
}

.cin-bugreport-facts {
  font-size: 0.8125rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.6rem;
  min-width: 0;
}

.cin-bugreport-facts dt {
  color: var(--cin-text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.cin-bugreport-facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cin-bugreport-code {
  font-family: var(--bs-font-monospace);
  font-size: 0.75rem;
}

.cin-bugreport-code pre {
  margin: 0.25rem 0 0;
  padding: 0.4rem 0.5rem;
  max-height: 160px;
  overflow: auto;
  border-radius: 6px;
  background-color: var(--cin-surface-raised);
  color: var(--bs-body-color);
  font-size: 0.6875rem;
  line-height: 1.35;
}

.cin-bugreport-code summary {
  cursor: pointer;
  color: var(--bs-link-color);
}

/* Befund-Karte: was der Code selbst gemessen hat. */
.cin-bugreport-findings {
  border: 1px solid var(--cin-warning);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  background-color: var(--cin-warning-light);
  color: var(--cin-foreground);
  font-size: 0.8125rem;
}

[data-bs-theme="dark"] .cin-bugreport-findings {
  background-color: rgba(245, 158, 11, 0.12);
  color: var(--bs-body-color);
}

.cin-bugreport-findings-title {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.cin-bugreport-findings ul {
  margin: 0;
  padding-left: 1.1rem;
}

.cin-bugreport-findings li + li {
  margin-top: 0.15rem;
}

.cin-bugreport-panel .form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.cin-bugreport-panel .form-label .req {
  color: var(--bug-mark);
}

.cin-bugreport-panel textarea.form-control {
  min-height: 64px;
  resize: vertical;
}

.cin-bugreport-freq .btn {
  font-size: 0.8125rem;
}

.cin-bugreport-shots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cin-bugreport-shots .cin-bugreport-thumb {
  width: 96px;
  aspect-ratio: 4 / 3;
}

.cin-bugreport-shots .cin-bugreport-shot-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 0;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.7rem;
  line-height: 20px;
  padding: 0;
}

.cin-bugreport-shot-add {
  width: 96px;
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--bs-border-color);
  border-radius: 6px;
  background: transparent;
  color: var(--cin-text-secondary);
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
}

.cin-bugreport-shot-add:hover {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.cin-bugreport-shot-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.15rem 0.3rem;
  font-size: 0.65rem;
  line-height: 1.2;
  background-color: rgba(0, 0, 0, 0.55);
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cin-bugreport-done {
  text-align: center;
  padding: 2rem 1rem;
}

.cin-bugreport-done .bi {
  font-size: 2.5rem;
  color: var(--cin-success);
}

.cin-bugreport-busy {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--cin-text-secondary);
  font-size: 0.8125rem;
}

/* Bild in voller Größe: eigene Overlay-Schicht über allem (auch über einem
   offenen Bericht-Detail-Modal der Adminkonsole). Klick schließt. */
.cin-bugreport-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: rgba(0, 0, 0, 0.7);
  cursor: zoom-out;
  animation: cin-bugreport-fade 150ms ease-out;
}

@keyframes cin-bugreport-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cin-bugreport-lightbox figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.cin-bugreport-lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 96px);
  height: auto;
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
  background-color: #fff;
}

.cin-bugreport-lightbox figcaption {
  color: #fff;
  font-size: 0.8125rem;
}

/* ----- Gespraech (Etappe 2) ----- */
.cin-bugreport-chat-log {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 46vh;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.cin-bugreport-msg {
  max-width: 92%;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.cin-bugreport-msg-ai {
  align-self: flex-start;
  background-color: var(--cin-surface-subtle, #f9fafb);
  border: 1px solid var(--bs-border-color);
}

.cin-bugreport-msg-me {
  align-self: flex-end;
  background-color: rgba(var(--bs-primary-rgb), 0.1);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.25);
}

.cin-bugreport-msg-waiting {
  opacity: 0.6;
  font-style: italic;
}

.cin-bugreport-msg-text {
  white-space: pre-wrap;
}

.cin-bugreport-corrected {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.cin-bugreport-corrected li {
  margin-bottom: 0.25rem;
}

.cin-bugreport-chat-actions {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
}

.cin-bugreport-chat-input {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

/* Das Eingabefeld traegt die Breite, der Knopf bleibt daneben. Ohne die
   beiden Angaben drueckt die Standardbreite von .form-control den Knopf in
   die naechste Zeile. */
.cin-bugreport-chat-input textarea {
  flex: 1 1 auto;
  min-width: 0;
  resize: none;
}

.cin-bugreport-chat-input .btn {
  flex: 0 0 auto;
}

[data-bs-theme="dark"] .cin-bugreport-msg-ai {
  background-color: rgba(255, 255, 255, 0.04);
}

/* ----- Adminkonsole ----- */
.cin-bugreport-admin-toolbar {
  border-radius: 8px;
  background-color: var(--cin-surface-subtle);
}

/* Drei Zonen: Suche links, Filter in der Mitte, Aktionen rechts. Die beiden
   aeusseren Zonen wachsen gleich, dadurch sitzt der Filter mittig, unabhaengig
   von der Breite der Suche. */
.cin-bugreport-admin-zone {
  flex: 1 1 0;
  display: flex;
  min-width: 0;
}

.cin-bugreport-admin-search {
  width: 100%;
  min-width: 180px;
  max-width: 320px;
}

.cin-bugreport-admin-filter {
  flex: 0 0 auto;
}

/* Zaehler im Filterknopf: gedeckt, im aktiven Knopf hell auf der Fuellfarbe. */
.cin-bugreport-admin-filter .btn .badge {
  background-color: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--bs-primary);
  font-weight: 600;
}

.cin-bugreport-admin-filter .btn.active .badge,
.cin-bugreport-admin-filter .btn:hover .badge {
  background-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Mit 20 Zeilen je Seite soll moeglichst wenig zusaetzlich gescrollt werden:
   die Tabelle nimmt die Fensterhoehe abzueglich Kopf, Werkzeugleiste und
   Seitennavigation. */
.cin-bugreport-admin-table {
  max-height: calc(100vh - 340px);
  min-height: 240px;
}

.cin-bugreport-admin table td,
.cin-bugreport-admin table th {
  vertical-align: middle;
}

/* Zebra wie im Reiter CINNext-Tags (src/templates/adminconsole/crm_tags.tpl). */
.cin-bugreport-admin .table thead th {
  background-color: var(--cin-surface) !important;
  --bs-table-bg: var(--cin-surface) !important;
}

.cin-bugreport-admin .table tbody tr:nth-child(odd) td {
  background-color: var(--cin-surface) !important;
  --bs-table-bg: var(--cin-surface) !important;
}

.cin-bugreport-admin .table tbody tr:nth-child(even) td {
  background-color: var(--cin-surface-subtle) !important;
  --bs-table-bg: var(--cin-surface-subtle) !important;
}

.cin-bugreport-admin .table.table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: rgba(var(--bs-primary-rgb), 0.05) !important;
  --bs-table-color-state: inherit !important;
}

[data-bs-theme="dark"] .cin-bugreport-admin .table.table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: rgba(var(--bs-primary-rgb), 0.15) !important;
}

/* Token-Kasten: zugeklappt nur die Zeile mit Zustand, aufgeklappt das Formular. */
.cin-bugreport-token-form > summary {
  cursor: pointer;
  list-style: none;
}

.cin-bugreport-token-form > summary::-webkit-details-marker {
  display: none;
}

.cin-bugreport-token-form > summary::after {
  content: "\f282";
  font-family: bootstrap-icons, sans-serif;
  font-size: 0.75rem;
  color: var(--cin-text-secondary, #6b7280);
  transition: transform 0.15s ease;
}

.cin-bugreport-token-form[open] > summary::after {
  transform: rotate(180deg);
}

.cin-bugreport-token-form > summary:hover {
  background-color: var(--cin-surface-subtle);
}

.cin-bugreport-admin .cin-bugreport-row {
  cursor: pointer;
}

.cin-bugreport-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.cin-bugreport-status-open { background-color: var(--cin-warning-light); color: #92400e; }
.cin-bugreport-status-issue { background-color: var(--cin-info-light); color: #1e40af; }
.cin-bugreport-status-closed { background-color: var(--cin-success-light); color: #065f46; }
.cin-bugreport-status-draft { background-color: var(--cin-surface-raised); color: var(--cin-text-secondary); }
.cin-bugreport-status-archive { background-color: var(--cin-surface-raised); color: var(--cin-text-secondary); border: 1px solid var(--bs-border-color); }

[data-bs-theme="dark"] .cin-bugreport-status-open { background-color: rgba(245, 158, 11, 0.2); color: #fcd34d; }
[data-bs-theme="dark"] .cin-bugreport-status-issue { background-color: rgba(59, 130, 246, 0.2); color: #93c5fd; }
[data-bs-theme="dark"] .cin-bugreport-status-closed { background-color: rgba(16, 185, 129, 0.2); color: #6ee7b7; }


/* Verlauf: was mit dem Bericht geschah, neueste Zeile oben. Die Liste belegt
   die Nachvollziehbarkeit und bleibt deshalb sichtbar statt zugeklappt. */
.cin-bugreport-history {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow: auto;
  border-left: 2px solid var(--bs-border-color);
}

.cin-bugreport-history-item {
  position: relative;
  padding: 0.35rem 0 0.35rem 0.75rem;
  font-size: 0.8125rem;
}

.cin-bugreport-history-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 0.75rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--bs-border-color);
}

.cin-bugreport-history-item:first-child::before {
  background-color: var(--bs-primary);
}

.cin-bugreport-history-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  justify-content: space-between;
}

.cin-bugreport-history-what {
  font-weight: 600;
}

.cin-bugreport-history-when,
.cin-bugreport-history-who {
  color: var(--cin-text-secondary);
  font-size: 0.75rem;
}

.cin-bugreport-history-note {
  color: var(--bs-success);
}

.cin-bugreport-history-text {
  color: var(--bs-body-color);
  overflow-wrap: anywhere;
}

/* Fusszeile des Berichts: das Häkchen steht dort, wo gleich die Knöpfe folgen. */
.cin-bugreport-detail-foot {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bs-border-color);
  font-size: 0.875rem;
}

/* Beschriftung und Erklaerung in einer Zeile, umbrechend erst bei Bedarf. */
.cin-bugreport-detail-foot .form-check-label {
  display: inline;
}

/* Notiz ans Issue: der Ticket-Text bleibt unberuehrt, der Zusatz geht als
   eigene Aktivitaet mit. */
.cin-bugreport-note {
  margin-top: 0.6rem;
}

.cin-bugreport-note textarea {
  font-size: 0.8125rem;
}

/* ── Bericht im Popup der Adminkonsole ──────────────────────────────────────
   Der Kern faerbt jeden Popup-Inhalt grau (.window-modal .modal-body). Hier
   bleibt er weiss, damit die grauen Codeblöcke sich abheben. Muster:
   .mail-detail-modal in public/css/crm.css. */
.modal.cin-bugreport-modal .modal-body {
  background-color: var(--cin-surface);
}

/* Der Bericht fuellt die Hoehe des Fensters, damit die Fusszeile mit dem
   Haekchen direkt ueber der Knopfleiste sitzt und nicht mitten im Leerraum. */
.cin-bugreport-detail {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Kopf: wer, wann, wo, Zustand. Darunter eine Linie zum Inhalt. */
.cin-bugreport-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.15rem 0.75rem;
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--bs-border-color);
  font-size: 0.8125rem;
  color: var(--cin-text-secondary);
}

.cin-bugreport-detail-head .cin-bugreport-env {
  flex: 1 0 100%;
}

.cin-bugreport-detail-freq {
  margin-left: 0.35rem;
}

/* Inhalt: links die Meldung in Worten, rechts die Belege. Unter 992 px
   untereinander. */
.cin-bugreport-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 2rem;
}

@media (min-width: 992px) {
  .cin-bugreport-detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.cin-bugreport-sec {
  margin-bottom: 1.1rem;
}

.cin-bugreport-sec-body {
  color: var(--bs-body-color);
  font-size: 0.875rem;
}

.cin-bugreport-findings-list {
  margin: 0;
  padding-left: 1.1rem;
}

/* Codeblock: graue Flaeche mit Kopfzeile, eigener Rahmen, Schrift monospace.
   Gilt fuer Auszuege aus dem Quelltext und fuer die aufklappbaren Messwerte. */
.cin-bugreport-snippet {
  margin: 0 0 0.5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--cin-surface-raised);
}

.cin-bugreport-snippet > figcaption,
.cin-bugreport-snippet > summary {
  padding: 0.3rem 0.6rem;
  font-family: var(--bs-font-monospace);
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--cin-text-secondary);
  /* Leichte Abtoenung statt einer eigenen Farbe: der Balken mit Datei und Zeile
     soll sich vom Code darunter absetzen. Kein color-mix, das html2canvas beim
     Screenshot nicht lesen kann. */
  background-color: rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid var(--bs-border-color);
  overflow-wrap: anywhere;
}

[data-bs-theme="dark"] .cin-bugreport-snippet > figcaption,
[data-bs-theme="dark"] .cin-bugreport-snippet > summary {
  background-color: rgba(255, 255, 255, 0.05);
}

.cin-bugreport-snippet > summary {
  cursor: pointer;
  color: var(--bs-link-color);
  list-style: none;
}

.cin-bugreport-snippet:not([open]) > summary {
  border-bottom: 0;
}

.cin-bugreport-snippet > summary::-webkit-details-marker {
  display: none;
}

.cin-bugreport-snippet > summary::before {
  content: '\25B8';
  margin-right: 0.35rem;
}

.cin-bugreport-snippet[open] > summary::before {
  content: '\25BE';
}

.cin-bugreport-snippet-term {
  color: var(--bs-body-color);
}

.cin-bugreport-snippet pre {
  margin: 0;
  padding: 0.5rem 0.6rem;
  max-height: 260px;
  overflow: auto;
  background-color: var(--cin-surface-raised);
  color: var(--bs-body-color);
  font-family: var(--bs-font-monospace);
  font-size: 0.6875rem;
  line-height: 1.45;
  tab-size: 2;
}

.cin-bugreport-snippet pre code {
  color: inherit;
  white-space: pre;
}

.cin-bugreport-detail h6 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cin-text-secondary);
  margin: 0 0 0.25rem;
}

.cin-bugreport-detail .cin-bugreport-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cin-bugreport-detail .cin-bugreport-shots .cin-bugreport-thumb {
  width: 160px;
}

.cin-bugreport-detail .cin-bugreport-code pre {
  max-height: 220px;
}

.cin-bugreport-meta {
  font-size: 0.8125rem;
  color: var(--cin-text-secondary);
}

/* Der Kasten teilt sich die Kopfzeile mit dem Einleitungstext, je zur Haelfte. */
.cin-bugreport-token-form {
  width: 100%;
  background-color: var(--cin-surface);
}

/* Seitennavigation: Markup wie src/templates/pagination.tpl, die aktive Seite
   bekommt hier ihre Kennzeichnung, weil der Kern sie ueber ListJS setzt. */
.cin-bugreport-admin [data-role="pager"] {
  padding-bottom: 0.25rem;
}

.cin-bugreport-admin .outer-pagination .btn {
  --bs-btn-color: var(--cin-text-secondary, #6b7280);
  padding: 0.25rem 0.5rem;
}

.cin-bugreport-admin .outer-pagination .btn:disabled {
  opacity: 0.35;
}

.cin-bugreport-admin .pagination li.active .btn.page {
  background-color: var(--bs-primary);
  color: #fff;
  border-radius: 6px;
}

