/* ═══════════════════════════════════════════════════════════════════════
   Main Tab Navigation — Neuer Fall / History
   Task 8: Frontend Tab Skeleton + Navigation
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Keyframe: spinner animation (mirrors app.html inline style for self-containment) */
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Tab bar ─────────────────────────────────────────────────────────── */
.main-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border-bottom: 2px solid #e5e7eb;
  padding: 0 1.5rem;
  position: sticky;
  top: 57px; /* sits directly below the sticky header */
  z-index: 9;
}

/* ── Brand-Mark + Title (Header) ──────────────────────────────────────── */
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.2s;
}
.brand-mark:hover { transform: scale(1.05); }
.brand-mark svg { width: 100%; height: 100%; display: block; }

.brand-title {
  font-size: 1.25rem;           /* 20px — dezent größer als Tabs (17px), klare Brand-Hierarchie */
  font-weight: 700;
  color: #0a2540;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}
.brand-subtitle {
  font-size: 0.78rem;
  color: #6b7280;
  margin-top: 1px;
  letter-spacing: 0.005em;
}

.main-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 1.0625rem;          /* 17px - deutlich größer */
  font-weight: 600;              /* alle Tabs fett (vorher 500) */
  color: #111827;                /* schwarz statt grau */
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.main-tab-btn:hover {
  color: #000000;
  border-bottom-color: #d1d5db;  /* subtiler Hover-Indikator */
}

.main-tab-btn[aria-selected="true"] {
  color: #2563eb;                /* aktiver Tab bleibt blau zur Abgrenzung */
  border-bottom-color: #2563eb;
  font-weight: 700;              /* aktiver Tab noch fetter */
}

/* ── Count badge on History tab ──────────────────────────────────────── */
.history-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  background: #e5e7eb;
  color: #111827;
  border-radius: 9999px;
  transition: background 0.15s, color 0.15s;
}

.main-tab-btn[aria-selected="true"] .history-count-badge {
  background: #dbeafe;
  color: #1d4ed8;
}

/* ── Tab panels ──────────────────────────────────────────────────────── */
.tab-content {
  /* visible by default; hidden class overrides */
  display: block;
}

.tab-content.hidden {
  display: none;
}

/* ── History placeholder ─────────────────────────────────────────────── */
.history-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 16rem;
  gap: 0.75rem;
  color: #9ca3af;
  font-size: 0.875rem;
}

.history-placeholder-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════════
   History List + Detail Layout
   Task 9: History List Loading + Detail View + Goldstandard Toggle
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Two-column layout: sidebar (list) + main (detail) ──────────────── */
.history-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
  min-height: 60vh;
  padding: 1rem 0;
}

@media (max-width: 768px) {
  .history-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.history-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-right: 1px solid #e5e7eb;
  padding-right: 1rem;
}

@media (max-width: 768px) {
  .history-sidebar {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding-right: 0;
    padding-bottom: 1rem;
  }
}

/* ── Search input ────────────────────────────────────────────────────── */
.history-search input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  color: #374151;
  background: #f9fafb;
  outline: none;
  box-sizing: border-box;
}

.history-search input:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.history-search input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Similar-cases button ────────────────────────────────────────────── */
.similar-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
}

.similar-btn:hover:not(:disabled) {
  background: #e5e7eb;
  color: #1f2937;
}

.similar-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Case list ───────────────────────────────────────────────────────── */
.history-list {
  flex: 1;
  overflow-y: auto;
  max-height: 65vh;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* ── List item ───────────────────────────────────────────────────────── */
.history-list-item {
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}

.history-list-item:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.history-list-item.selected {
  background: #eff6ff;
  border-color: #93c5fd;
}

.history-list-item:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
}

.hli-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.hli-date {
  font-size: 0.75rem;
  color: #6b7280;
}

.hli-meta {
  font-size: 0.7rem;
  color: #9ca3af;
  white-space: nowrap;
}

.hli-frage {
  font-size: 0.8125rem;
  color: #374151;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── Soft hint (Task 15: cleanup nudge — blue dismissible banner) ────── */
.history-soft-hint {
  margin-top: 1rem;
  padding: 0.6rem 0.9rem;
  background: #eff6ff;
  color: #1e40af;
  border-radius: 0.4rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.history-soft-hint .hint-icon {
  font-size: 1rem;
}
.history-soft-hint .hint-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  color: #1e40af;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.1rem 0.4rem;
}
.history-soft-hint .hint-dismiss:hover {
  background: #dbeafe;
  border-radius: 0.3rem;
}
.history-soft-hint.hidden { display: none; }

/* ── Empty / error states ────────────────────────────────────────────── */
.history-empty {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: #9ca3af;
}

.history-error {
  color: #dc2626;
}

/* ── Detail main area ────────────────────────────────────────────────── */
.history-main {
  overflow-y: auto;
  max-height: 75vh;
}

.history-detail {
  padding: 0 0.5rem;
}

/* ── Detail header ───────────────────────────────────────────────────── */
.hd-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.hd-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hd-date {
  font-size: 0.8125rem;
  color: #6b7280;
}

.hd-modus {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: #f3f4f6;
  color: #374151;
  border-radius: 9999px;
}

/* ── Detail actions ──────────────────────────────────────────────────── */
.hd-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hd-gold-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6b7280;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.hd-gold-btn:hover {
  background: #fef9c3;
  border-color: #fde047;
  color: #854d0e;
}

.hd-gold-btn.active {
  background: #fef9c3;
  border-color: #fde047;
  color: #854d0e;
  font-weight: 600;
}

.hd-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6b7280;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.hd-delete-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

/* ── Nachfrage / Follow-up button (Feature 3) ─────────────────────────── */
.hd-followup-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hd-followup-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e3a8a;
}

/* ── Detail sections ─────────────────────────────────────────────────── */
.hd-section {
  margin-bottom: 1.25rem;
}

.hd-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.hd-frage {
  font-size: 0.9375rem;
  color: #111827;
  line-height: 1.6;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.hd-kurzfassung {
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Raw output (collapsed pre) ─────────────────────────────────────── */
.hd-output {
  font-size: 0.75rem;
  font-family: 'Menlo', 'Consolas', monospace;
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  max-height: 20rem;
  overflow-y: auto;
  white-space: pre;
  word-break: normal;
}

/* ── Fachgebiete chips ───────────────────────────────────────────────── */
.hd-fachgebiete {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.hd-fach-chip {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 9999px;
  font-weight: 500;
}

/* ── Similarity badge (Task 12: similar-cases view) ─────────────────────── */
.similarity-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.4rem;
  margin-bottom: 0.2rem;
  margin-right: 0.4rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   PII Live Warning — Layer 1 (Task 13)
   Non-blocking: yellow border + hint below field while typing.
   Layer 2 backend still enforces if user ignores.
   ═══════════════════════════════════════════════════════════════════════ */

.pii-warning {
  border-color: #f59e0b !important;
  background-color: #fffbeb;
}

.pii-warning-msg {
  background: #fef3c7;
  color: #78350f;
  padding: 0.6rem 0.9rem;
  border-radius: 0.4rem;
  margin-top: 0.3rem;
  font-size: 0.85rem;
}

.pii-warning-msg ul { margin: 0.3rem 0 0 1.5rem; padding: 0; }
.pii-warning-msg li { margin: 0.1rem 0; }

.pii-warning-msg.hidden { display: none; }

/* ═══════════════════════════════════════════════════════════════════════
   Tooltips — CSS-only via [data-tooltip] attribute
   Used on every action button (Goldstandard, Delete, Nachfrage, Tab buttons,
   Evidenz-Badges, study-links). Pure CSS, no JS lib.
   ═══════════════════════════════════════════════════════════════════════ */

[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  max-width: 280px;
  white-space: normal;
  word-wrap: break-word;
  background: #1f2937;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
  text-align: center;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  /* small fade-in to feel less abrupt */
  opacity: 0;
  animation: tt-fade-in 0.12s ease-out 0.25s forwards;
}

/* Arrow under the tooltip pointing to the trigger */
[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1f2937;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  animation: tt-fade-in 0.12s ease-out 0.25s forwards;
}

/* Variant: tooltip placed below the trigger (useful at the very top of viewport) */
[data-tooltip][data-tooltip-pos="below"]:hover::after,
[data-tooltip][data-tooltip-pos="below"]:focus-visible::after {
  bottom: auto;
  top: calc(100% + 6px);
}
[data-tooltip][data-tooltip-pos="below"]:hover::before,
[data-tooltip][data-tooltip-pos="below"]:focus-visible::before {
  bottom: auto;
  top: 100%;
  border-top-color: transparent;
  border-bottom-color: #1f2937;
}

/* Variant: tooltip placed to the right of the trigger (for narrow icon buttons) */
[data-tooltip][data-tooltip-pos="right"]:hover::after,
[data-tooltip][data-tooltip-pos="right"]:focus-visible::after {
  bottom: auto;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
}
[data-tooltip][data-tooltip-pos="right"]:hover::before,
[data-tooltip][data-tooltip-pos="right"]:focus-visible::before {
  bottom: auto;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-top-color: transparent;
  border-right-color: #1f2937;
}

@keyframes tt-fade-in {
  to { opacity: 1; }
}

/* Suppress tooltip on touch devices — would stay stuck otherwise */
@media (hover: none) {
  [data-tooltip]:hover::after,
  [data-tooltip]:hover::before {
    display: none;
  }
}

/* ─── Feedback FAB (Beta-Phase) ─────────────────────────────────
 * Floating action button bottom-right — opens user's mail client
 * with pre-filled subject + body for direct kontakt@-feedback.
 * Mobile-aware (smaller on phones).
 */
#feedback-fab {
  position: fixed;
  right: 1.5rem;
  /* Defense-in-depth fuer Mobile-Browser mit dynamischer UI-Bar (Firefox Android):
     env(safe-area-inset-bottom) ist iOS-safe, fallback auf 0 sonst. */
  bottom: max(1.5rem, env(safe-area-inset-bottom, 0px) + 1.5rem);
  right:  max(1.5rem, env(safe-area-inset-right, 0px) + 1.5rem);
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  /* z-index hoch genug ueber Tab-Content (typ. <1000), aber unter Modals (9999+).
     Plus isolation: isolate fuer eigenen Stacking-Context — verhindert dass
     Tab-Content-Layout-Changes den FAB ueberdecken. */
  z-index: 9000;
  isolation: isolate;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
#feedback-fab:hover  { transform: scale(1.08); box-shadow: 0 6px 22px rgba(0,0,0,0.20); }
#feedback-fab:active { transform: scale(0.96); }
#feedback-fab:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

@media (max-width: 768px) {
  #feedback-fab {
    right:  max(1rem, env(safe-area-inset-right, 0px) + 1rem);
    bottom: max(1rem, env(safe-area-inset-bottom, 0px) + 1rem);
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.25rem;
  }
}

/* ──────────────────────────────────────────────────────────────
 * Feedback Modal — Multi-Client-tauglich (Copy-Adresse + mailto-Fallback)
 * Replaces direct-mailto FAB to avoid Gmail-redirect on browsers without
 * desktop mail client. Added 2026-05-26 for clinic rollout.
 * ──────────────────────────────────────────────────────────── */
.feedback-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 10001;  /* over the FAB itself */
}
.feedback-modal-overlay.hidden { display: none; }

.feedback-modal-content {
  background: #fff;
  border-radius: 1rem;
  max-width: 28rem;
  width: 100%;
  padding: 1.5rem 1.75rem 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  position: relative;
}
.feedback-modal-content h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.5rem;
}
.feedback-modal-intro {
  font-size: 0.875rem;
  color: #4b5563;
  margin: 0 0 0.875rem;
  line-height: 1.5;
}
.feedback-modal-close {
  position: absolute;
  top: 0.625rem;
  right: 0.875rem;
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.feedback-modal-close:hover { color: #111827; }

.feedback-email-row {
  display: flex;
  gap: 0.5rem;
  margin: 0;
}
.feedback-email-row input {
  flex: 1;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #f9fafb;
  color: #111827;
  min-width: 0;  /* allow flex shrink */
}
.feedback-email-row button {
  background: #2563eb;
  color: #fff;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.feedback-email-row button:hover { background: #1d4ed8; }
.feedback-email-row button:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.feedback-copy-status {
  font-size: 0.75rem;
  margin: 0.5rem 0 0;
  min-height: 1em;
}

.feedback-modal-divider {
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
  margin: 1rem 0 0.75rem;
}

.feedback-mailto-button {
  display: block;
  width: 100%;
  padding: 0.625rem 1rem;
  text-align: center;
  background: #f3f4f6;
  color: #111827;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #d1d5db;
  transition: background 0.15s ease;
}
.feedback-mailto-button:hover { background: #e5e7eb; }
.feedback-mailto-button:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.feedback-modal-hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 1rem 0 0;
  text-align: center;
  line-height: 1.5;
}
.feedback-modal-hint strong { color: #dc2626; }

@media (max-width: 480px) {
  .feedback-email-row { flex-direction: column; }
  .feedback-email-row button { width: 100%; }
}

/* ──────────────────────────────────────────────────────────────
 * Feedback Form — server-side submit via WF5 (2026-05-26)
 * Replaces mailto/copy modal. POSTs to /webhook/beta-feedback,
 * Resend sends mail to expertengremium.feedback@gmail.com.
 * ──────────────────────────────────────────────────────────── */
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.25rem;
}
.feedback-field-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin: 0.5rem 0 0;
}
.feedback-required { color: #dc2626; }

.feedback-form textarea,
.feedback-form input[type="email"] {
  width: 100%;
  font: inherit;
  font-size: 0.875rem;
  color: #111827;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  resize: vertical;
}
.feedback-form textarea { min-height: 6.5rem; }
.feedback-form textarea:focus,
.feedback-form input[type="email"]:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.feedback-char-counter {
  font-size: 0.6875rem;
  color: #9ca3af;
  margin: 0.125rem 0 0;
  text-align: right;
}

.feedback-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  justify-content: flex-end;
}
.feedback-btn-primary,
.feedback-btn-secondary {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.feedback-btn-primary {
  background: #2563eb;
  color: #fff;
}
.feedback-btn-primary:hover:not(:disabled) { background: #1d4ed8; }
.feedback-btn-primary:disabled {
  background: #93c5fd;
  cursor: not-allowed;
}
.feedback-btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}
.feedback-btn-secondary:hover { background: #e5e7eb; }
.feedback-btn-primary:focus-visible,
.feedback-btn-secondary:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.feedback-status {
  font-size: 0.8125rem;
  margin: 0.5rem 0 0;
  text-align: center;
  line-height: 1.4;
  min-height: 1.2em;
}
.feedback-status-success { color: #16a34a; }
.feedback-status-error   { color: #dc2626; }

@media (max-width: 480px) {
  .feedback-actions { flex-direction: column-reverse; }
  .feedback-actions button { width: 100%; }
}

/* ──────────────────────────────────────────────────────────────
 * Feedback Success-Pane — prominenter Erfolgs-State
 * Ersetzt im Modal das Form, bis User auf "Schliessen" klickt.
 * Enthaelt Feedback-Kopie zum manuellen Markieren+Kopieren.
 * ──────────────────────────────────────────────────────────── */
.feedback-success-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.25rem 0;
}
.feedback-success-pane.hidden { display: none; }

.feedback-success-icon {
  color: #16a34a;
  background: #dcfce7;
  width: 84px; height: 84px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0.25rem 0 0.75rem;
}
.feedback-success-headline {
  font-size: 1.5rem;
  font-weight: 700;
  color: #14532d;
  margin: 0 0 0.25rem;
}
.feedback-success-lead {
  font-size: 0.9375rem;
  color: #166534;
  margin: 0 0 0.5rem;
  line-height: 1.5;
}
.feedback-success-reply {
  font-size: 0.875rem;
  color: #374151;
  margin: 0 0 1rem;
  line-height: 1.5;
  max-width: 28rem;
}
.feedback-success-reply strong { color: #111827; font-weight: 600; }

.feedback-success-receipt-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  align-self: flex-start;
  margin: 0.25rem 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.feedback-success-receipt {
  width: 100%;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem 0.875rem;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  color: #111827;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 12rem;
  overflow-y: auto;
  margin: 0 0 1rem;
  text-align: left;
  user-select: text;
  -webkit-user-select: text;
}
.feedback-actions-success {
  justify-content: center;
  width: 100%;
}
.feedback-actions-success button { min-width: 8rem; }

@media (max-width: 480px) {
  .feedback-success-headline { font-size: 1.25rem; }
  .feedback-success-receipt { font-size: 0.75rem; max-height: 9rem; }
}
