/* FEEDBACK-TICKETS: "Meine Tickets" — Liste der eingereichten Fehlerberichte. */
.tickets-page {
  max-width: 720px;
}

.tickets-breadcrumb {
  font-size: 0.88rem;
  color: var(--color-muted, #666);
  margin-bottom: 0.5rem;
}

.tickets-breadcrumb a {
  color: var(--color-accent, #2563eb);
  text-decoration: none;
}

.tickets-breadcrumb a:hover {
  text-decoration: underline;
}

.tickets-subtitle {
  color: var(--color-muted, #666);
  margin-bottom: 1.5rem;
}

.tickets-empty {
  color: var(--color-muted, #666);
  padding: 1.5rem;
  text-align: center;
  border: 1px dashed var(--color-border, #ddd);
  border-radius: 8px;
}

.tickets-error {
  color: var(--color-danger-text, #991b1b);
  background: var(--color-danger-bg, #fef2f2);
  border-left: 3px solid var(--color-danger, #ef4444);
  padding: 0.6rem 0.85rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 1rem;
}

/* GEFILTERTE VERLINKUNGEN: Filter-Chips (wie die Rennmaus-Liste). */
.tickets-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tickets-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 999px;
  background: var(--color-surface, #fff);
  color: var(--color-text, #333);
  cursor: pointer;
}

.tickets-filter:hover {
  border-color: var(--color-accent, #2563eb);
}

.tickets-filter--active {
  background: var(--color-accent, #2563eb);
  border-color: var(--color-accent, #2563eb);
  color: #fff;
}

.tickets-filter__count {
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 1.25rem;
  text-align: center;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--color-surface-2, #eef2f7);
  color: var(--color-muted, #555);
}

.tickets-filter--active .tickets-filter__count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.tickets-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ticket-card {
  border: 1px solid var(--color-border, #ddd);
  border-radius: 10px;
  background: var(--color-surface, #fff);
  padding: 1rem;
}

.ticket-card--resolved {
  background: var(--color-surface-2, #f8faf8);
  border-color: var(--color-border, #e2e8e2);
}

.ticket-card__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.ticket-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.ticket-badge--open {
  background: var(--color-info-bg, #eff6ff);
  color: var(--color-info-text, #1e40af);
}

.ticket-badge--resolved {
  background: var(--color-success-bg, #dcfce7);
  color: var(--color-success-text, #166534);
}

/* NeedsInfo: Rückfrage offen — Aufmerksamkeit (Bernstein). */
.ticket-badge--needsinfo {
  background: var(--color-warning-bg, #fef3c7);
  color: var(--color-warning-text, #92400e);
}

/* Answered: Züchterin hat geantwortet — blau. */
.ticket-badge--answered {
  background: var(--color-info-bg, #dbeafe);
  color: var(--color-info-text, #1e40af);
}

.ticket-card__context {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text, #333);
}

.ticket-card__entity {
  font-size: 0.85rem;
  color: var(--color-muted, #666);
}

.ticket-card__entity::before {
  content: '· ';
}

.ticket-card__message {
  margin: 0 0 0.75rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.ticket-card--resolved .ticket-card__message {
  color: var(--color-muted, #555);
}

/* RÜCKFRAGE (Question): prominent hervorgehoben mit Bernstein-Akzent. */
.ticket-card__question {
  border-left: 3px solid var(--color-warning, #f59e0b);
  background: var(--color-warning-bg, #fffbeb);
  padding: 0.55rem 0.75rem;
  border-radius: 0 8px 8px 0;
  margin: 0 0 0.75rem;
}

.ticket-card__question-label,
.ticket-card__answer-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-muted, #777);
  margin-bottom: 0.25rem;
}

.ticket-card__question-text,
.ticket-card__answer-text {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ANTWORT der Züchterin: blauer Akzent. */
.ticket-card__answer {
  border-left: 3px solid var(--color-accent, #2563eb);
  background: var(--color-info-bg, #eff6ff);
  padding: 0.55rem 0.75rem;
  border-radius: 0 8px 8px 0;
  margin: 0 0 0.75rem;
}

.ticket-card__answer-date {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--color-muted, #777);
}

.ticket-card__answer-form {
  margin: 0 0 0.75rem;
}

/* VERLAUF (Thread): frühere Frage/Antwort-Runden, dezent. */
.ticket-card__thread {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--color-border, #d4d4d4);
  background: var(--color-surface-2, #f7f8fa);
  border-radius: 0 8px 8px 0;
}

.ticket-card__thread-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-muted, #777);
  margin-bottom: 0.4rem;
}

.ticket-card__thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ticket-card__thread-entry {
  padding-left: 0.6rem;
  border-left: 2px solid var(--color-border, #ccc);
}

.ticket-card__thread-entry--maintainer {
  border-left-color: var(--color-warning, #f59e0b);
}

.ticket-card__thread-entry--breeder {
  border-left-color: var(--color-accent, #2563eb);
}

.ticket-card__thread-role {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-muted, #777);
}

.ticket-card__thread-text {
  margin: 0.1rem 0 0;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
}

.ticket-card__thread-date {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.74rem;
  color: var(--color-muted, #999);
}

/* CHANGELOG (fixNote): laienverständlich, grüner Akzent auf geschlossenen Tickets. */
.ticket-card__changelog {
  border-left: 3px solid var(--color-success, #22c55e);
  background: var(--color-success-bg, #f0fdf4);
  padding: 0.55rem 0.75rem;
  border-radius: 0 8px 8px 0;
  margin: 0 0 0.85rem;
}

.ticket-card__changelog-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-success-text, #166534);
  margin-bottom: 0.25rem;
}

.ticket-card__changelog-text {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Suche + Kategorie-Filter über der Ticket-Liste. */
.tickets-search {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1rem;
  flex-wrap: wrap;
}
.tickets-search__input {
  flex: 1 1 16rem;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border, #d1d5db);
  border-radius: 8px;
  font-size: 0.95rem;
}
.tickets-search__category {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border, #d1d5db);
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--color-surface, #fff);
}

/* Kategorie-Chip im Ticket-Kopf. */
.ticket-card__category {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--color-accent-bg, #eef2ff);
  color: var(--color-accent-text, #3730a3);
}

/* „Hat das geholfen?"-Leiste auf gelösten Tickets. */
.ticket-card__helpful {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
}
.ticket-card__helpful-q {
  font-weight: 600;
}
.ticket-card__helpful-thanks {
  color: var(--color-success-text, #166534);
  font-weight: 600;
}
.btn--small {
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
}

/* Anhänge (Fotos/Dateien) auf einem Ticket. */
.ticket-card__attachments {
  margin: 0 0 0.85rem;
}
.ticket-card__attachments-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-muted, #6b7280);
  margin-bottom: 0.35rem;
}
.ticket-card__attachments-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.ticket-card__attachment {
  position: relative;
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
}
.ticket-card__attachment img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--color-border, #d1d5db);
  border-radius: 8px;
}
.ticket-card__attachment--file {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--color-border, #d1d5db);
  border-radius: 8px;
  font-size: 0.85rem;
  gap: 0.4rem;
  align-items: center;
}
.ticket-card__attachment-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  line-height: 1;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0;
}
.ticket-card__attachment--file .ticket-card__attachment-remove {
  position: static;
  background: transparent;
  color: var(--color-danger, #ef4444);
}
.ticket-card__attachment-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border: 1px dashed var(--color-border, #9ca3af);
  border-radius: 8px;
  font-size: 0.75rem;
  text-align: center;
  cursor: pointer;
  color: var(--color-muted, #6b7280);
  padding: 0.25rem;
}

/* Papierkorb-Countdown: Hinweis, wann das Ticket endgültig gelöscht wird. */
.ticket-card__trash-notice {
  border-left: 3px solid var(--color-danger, #ef4444);
  background: var(--color-danger-bg, #fef2f2);
  color: var(--color-danger-text, #991b1b);
  padding: 0.55rem 0.75rem;
  border-radius: 0 8px 8px 0;
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.ticket-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
}

.ticket-card__meta div {
  display: flex;
  gap: 0.35rem;
}

.ticket-card__meta dt {
  font-weight: 600;
  color: var(--color-muted, #777);
}

.ticket-card__meta dd {
  margin: 0;
}

.ticket-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ticket-card__edit-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.ticket-card__textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--color-border, #ccc);
  border-radius: 8px;
  resize: vertical;
  min-height: 4.5rem;
  margin-bottom: 0.75rem;
  background: var(--color-bg, #fff);
  color: var(--color-text);
}

.ticket-card__textarea:focus {
  outline: 2px solid var(--color-accent, #2563eb);
  outline-offset: 1px;
}

/* Klickbare Tier-/Ticket-Links im Ticket-Text. */
.ticket-link {
  color: var(--color-accent, #2563eb);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.ticket-link:hover {
  text-decoration: none;
}

/* Verlinkter Datensatz-Name (Tier/Wurf/Kontakt) in der Kopfzeile. */
.ticket-card__entity--link {
  color: var(--color-accent, #2563eb);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ticket-card__entity--link:hover {
  text-decoration: none;
}

/* Kurzes Hervorheben des per ?focus= angesprungenen Tickets. */
.ticket-card--focus {
  animation: ticket-focus-pulse 2.5s ease-out;
}

@keyframes ticket-focus-pulse {
  0%, 30% {
    box-shadow: 0 0 0 3px var(--color-accent, #2563eb);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

/* Markdown im Ticket-Text: Aufzählungen + Inline-Code. */
.ticket-md-list {
  margin: 0.35rem 0;
  padding-left: 1.25rem;
}

.ticket-md-list li {
  margin: 0.15rem 0;
}

.ticket-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.05em 0.35em;
  border-radius: 4px;
}
