/* =============================================================================
   Feedback FAB + Modul
   ============================================================================= */

/* Floating Action Button — unten rechts, immer sichtbar */
#feedback-fab {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid rgba(124, 58, 237, 0.45);
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #C4B5FD;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(124, 58, 237, 0.20);
  transition: transform 100ms ease, background 100ms ease;
}
#feedback-fab:hover {
  background: rgba(124, 58, 237, 0.28);
  transform: translateY(-1px);
  color: #fff;
}
.feedback-fab__label {
  letter-spacing: 0.02em;
}
.feedback-fab__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--mod-alert);
  color: white;
  font-size: 10px;
  font-weight: 700;
  margin-left: 2px;
}

/* Feedback-Modul: Liste */
.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.feedback-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--glass-dark);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  align-items: start;
}
.feedback-item[data-status="done"] {
  opacity: 0.55;
}
.feedback-item__checkbox {
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.30);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 100ms ease, border-color 100ms ease;
  margin-top: 2px;
}
.feedback-item__checkbox:hover {
  border-color: var(--mod-finance);
}
.feedback-item[data-status="done"] .feedback-item__checkbox {
  background: var(--mod-finance);
  border-color: var(--mod-finance);
}
.feedback-item[data-status="done"] .feedback-item__checkbox::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.feedback-item__main {
  min-width: 0;
}
.feedback-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 0.375rem;
}
.feedback-item__route {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  color: var(--text-muted);
}
.feedback-item__text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.feedback-item[data-status="done"] .feedback-item__text {
  text-decoration: line-through;
  color: var(--text-muted);
}
.feedback-item__context {
  margin-top: 0.25rem;
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}
.feedback-item__actions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-end;
}
.feedback-item__date {
  font-size: 10px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* Markierter Bereich in der Liste — Chip mit „Zeigen"-Button */
.feedback-item__marker {
  margin-top: 0.375rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 3px 8px;
  border: 1px solid rgba(124, 58, 237, 0.40);
  background: rgba(124, 58, 237, 0.12);
  border-radius: 999px;
  font-size: 11px;
  color: #C4B5FD;
  cursor: pointer;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feedback-item__marker:hover {
  background: rgba(124, 58, 237, 0.22);
  color: #fff;
}

/* =============================================================================
   Element-Picker (DevTools-Style Overlay)
   ============================================================================= */
#feedback-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none; /* Picker fängt Klicks selber über document handler */
}

.feedback-picker__box {
  position: fixed;
  top: 0;
  left: 0;
  display: none;
  border: 2px solid #A78BFA;
  background: rgba(124, 58, 237, 0.18);
  pointer-events: none;
  transition: transform 60ms ease, width 60ms ease, height 60ms ease;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4), 0 0 20px rgba(124, 58, 237, 0.45);
  border-radius: 3px;
}
.feedback-picker__box::after {
  content: attr(data-tag);
  position: absolute;
  top: -22px;
  left: 0;
  padding: 2px 8px;
  background: #A78BFA;
  color: #1a1037;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  border-radius: 3px;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.feedback-picker__hint {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem 0.5rem 1rem;
  background: rgba(20, 12, 38, 0.95);
  border: 1px solid rgba(124, 58, 237, 0.50);
  border-radius: 999px;
  color: #E9D5FF;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: auto;  /* Overlay hat pointer-events: none — hier wieder aktivieren */
}
.feedback-picker__cancel {
  padding: 6px 12px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  color: #fff;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 100ms ease;
}
.feedback-picker__cancel:hover {
  background: rgba(255,255,255,0.20);
}
.feedback-picker__hint kbd {
  display: inline-block;
  padding: 1px 6px;
  margin: 0 2px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.20);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  color: #fff;
}

/* Highlight-Pulse für "Zeigen"-Aktion (3s) */
@keyframes feedback-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.95), 0 0 0 8px rgba(167, 139, 250, 0.25), 0 0 0 16px rgba(167, 139, 250, 0); }
  50%      { box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.95), 0 0 0 14px rgba(167, 139, 250, 0.40), 0 0 0 24px rgba(167, 139, 250, 0); }
}
.feedback-highlight {
  animation: feedback-pulse 1.6s ease-in-out infinite;
  border-radius: 4px;
  position: relative;
  z-index: 10;
}

/* Bereich-Chip im FAB-Dialog */
.feedback-marker-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(124, 58, 237, 0.40);
  border-radius: var(--radius-md);
  background: rgba(124, 58, 237, 0.10);
  font-size: 12px;
  margin-bottom: 0.625rem;
}
.feedback-marker-chip__label {
  flex: 1;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  color: #C4B5FD;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feedback-marker-chip__clear {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
}
.feedback-marker-chip__clear:hover {
  color: var(--mod-alert);
  background: rgba(255,255,255,0.05);
}

.btn--mark {
  background: rgba(124, 58, 237, 0.18);
  border: 1px solid rgba(124, 58, 237, 0.45);
  color: #C4B5FD;
}
.btn--mark:hover {
  background: rgba(124, 58, 237, 0.28);
  color: #fff;
}
