/* ============================================
   REPORT A BUG MODAL (issue 333, Phase 1)
   ============================================
   Consumed by public/ReportBugModal.js (vanilla DOM, appended to
   document.body — see that file's CODENOTE on why it uses the canonical
   .modal-overlay/.modal-content/.modal-header/.modal-title/.modal-body/
   .modal-footer system from base.css rather than the dead
   .modal-backdrop/.modal-container classes ThemePickerModal still uses).

   Contrast notes (verified via .claude/tools/contrast.mjs):
   - white on --color-structure-primary (header) = 4.73:1 PASS
   - white on --color-action-dark (buttons)      = 6.63:1 PASS
   - --text-primary on white/--color-structure-bg = 11.43:1 / 10.34:1 PASS
   - --text-secondary and --color-action-primary/--color-positive as TEXT
     colors on white all fail AA (<3:1) — avoided everywhere in this file. */

.report-bug-modal {
  width: 100%;
  max-width: 440px;
}

.report-bug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.report-bug-close-button {
  background: transparent;
  border: none;
  color: var(--color-white);
  font-size: var(--font-size-2xl);
  line-height: 1;
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  min-width: 44px;
  min-height: 44px;
}

.report-bug-close-button:hover,
.report-bug-close-button:focus-visible {
  opacity: 0.8;
}

.report-bug-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.report-bug-textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: var(--space-md);
  font-family: var(--font-primary);
  font-size: var(--font-size-input);
  color: var(--text-primary);
  border: 2px solid var(--border-default);
  border-radius: var(--border-radius-md);
  outline: none;
  box-sizing: border-box;
}

.report-bug-textarea:focus {
  border-color: var(--color-action-primary);
}

.report-bug-context-line {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  font-size: var(--font-size-sm);
  color: var(--text-primary);
}

.report-bug-peek-toggle {
  display: block;
  margin-top: var(--space-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-structure-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs) 0;
  text-decoration: underline;
  min-height: 44px;
}

.report-bug-peek {
  margin-top: var(--space-sm);
  background: var(--color-structure-deepest);
  color: var(--color-structure-lightest);
  border-radius: var(--border-radius-md);
  padding: var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 220px;
  overflow: auto;
}

.report-bug-error {
  margin-top: var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-danger-dark);
}

.report-bug-btn-secondary,
.report-bug-btn-primary {
  padding: var(--space-sm) var(--space-lg);
  min-height: 44px;
  border-radius: var(--border-radius-md);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-base);
  cursor: pointer;
  font-family: var(--font-primary);
  border: 2px solid transparent;
}

.report-bug-btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-default);
}

.report-bug-btn-secondary:hover {
  background: var(--color-structure-lightest);
}

.report-bug-btn-primary {
  background: var(--color-action-dark);
  color: var(--color-white);
  border-color: var(--color-action-dark);
}

.report-bug-btn-primary:hover {
  background: var(--color-action-darkest);
  border-color: var(--color-action-darkest);
}

.report-bug-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.report-bug-success {
  text-align: center;
  padding: var(--space-sm) var(--space-xs);
}

.report-bug-success h3 {
  font-family: var(--font-display);
  letter-spacing: var(--letter-spacing-tight);
  font-size: var(--font-size-display-sm);
  margin: 0 0 var(--space-sm);
  color: var(--text-primary);
}

.report-bug-success p {
  font-size: var(--font-size-base);
  color: var(--text-primary);
  margin: 0 0 var(--space-md);
}

.report-bug-success-link {
  color: var(--color-structure-primary);
  font-weight: var(--font-weight-bold);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
}

@media (max-width: 640px) {
  .report-bug-modal {
    max-width: 100%;
  }
}
