/* Audit feedback controls (assets/deck-feedback.js). Deliberately quiet: the
   triggers read as tertiary actions so they never compete with the audit
   result itself. Uses the shared design tokens from content.css. */

.deck-feedback-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Subtle triggers ------------------------------------------------------ */

.deck-feedback-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
  background: none;
  padding: 3px 6px;
  border-radius: var(--radius-pill, 999px);
  color: var(--text-3, #6a6780);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.deck-feedback-trigger:hover {
  color: var(--text-1, #f0eef8);
  background: rgba(255, 255, 255, 0.05);
}
.deck-feedback-trigger:focus-visible {
  outline: 2px solid var(--accent, #c9a84c);
  outline-offset: 2px;
}
.deck-feedback-trigger svg {
  flex: none;
}
.deck-feedback-trigger.is-reported {
  color: var(--text-3, #6a6780);
  cursor: default;
  background: none;
  opacity: 0.85;
}
.deck-feedback-trigger.is-reported:hover {
  background: none;
}

.deck-feedback-trigger-text::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 1px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}
.deck-feedback-trigger.is-reported.deck-feedback-trigger-text::before {
  opacity: 0.35;
}

/* --- Modal ---------------------------------------------------------------- */

.deck-feedback-dialog {
  width: min(440px, calc(100vw - 32px));
  max-width: 440px;
  padding: 0;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-lg, 20px);
  background: var(--surface-2, #17171d);
  color: var(--text-1, #f0eef8);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.deck-feedback-dialog::backdrop {
  background: rgba(6, 6, 10, 0.6);
  backdrop-filter: blur(2px);
}

.deck-feedback-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
}
.deck-feedback-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.deck-feedback-subject {
  margin: 0;
  font-size: 13px;
  color: var(--text-2, #8a879e);
  overflow-wrap: anywhere;
}
.deck-feedback-field-label {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-1, #f0eef8);
}
.deck-feedback-select,
.deck-feedback-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.14));
  border-radius: var(--radius-md, 12px);
  background: var(--surface-3, #1d1d26);
  color: var(--text-1, #f0eef8);
  font: inherit;
  font-size: 14px;
}
.deck-feedback-textarea {
  resize: vertical;
  min-height: 64px;
}
.deck-feedback-select:focus-visible,
.deck-feedback-textarea:focus-visible {
  outline: 2px solid var(--accent, #c9a84c);
  outline-offset: 1px;
  border-color: var(--accent, #c9a84c);
}
.deck-feedback-counter {
  align-self: flex-end;
  font-size: 11.5px;
  color: var(--text-3, #6a6780);
}
.deck-feedback-error {
  margin: 0;
  font-size: 13px;
  color: #e79a7c;
}
.deck-feedback-note {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-3, #6a6780);
}

.deck-feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.deck-feedback-btn {
  height: 38px;
  padding: 0 18px;
  border-radius: var(--radius-pill, 999px);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.deck-feedback-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.deck-feedback-btn-ghost {
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.14));
  background: none;
  color: var(--text-1, #f0eef8);
}
.deck-feedback-btn-ghost:hover:not(:disabled) {
  border-color: var(--text-2, #8a879e);
}
.deck-feedback-btn-primary {
  border: 1px solid var(--accent, #c9a84c);
  background: var(--accent, #c9a84c);
  color: #14140f;
}
.deck-feedback-btn-primary:hover:not(:disabled) {
  background: var(--accent-soft, #efd58b);
}
.deck-feedback-btn:focus-visible {
  outline: 2px solid var(--accent, #c9a84c);
  outline-offset: 2px;
}

/* --- Case File feedback footer -------------------------------------------- */

.deck-feedback-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.deck-feedback-footer-row {
  display: flex;
  justify-content: flex-end;
}

/* --- Report block inside the per-card classification dialog --------------- */

.classification-dialog__report {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.classification-dialog__report-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-2, #8a879e);
}

/* --- "Was this audit useful?" bar ----------------------------------------- */

.deck-feedback-useful {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 14px);
  background: rgba(255, 255, 255, 0.02);
}
.deck-feedback-useful-prompt {
  font-size: 14px;
  font-weight: 650;
  color: var(--text-1, #f0eef8);
}
.deck-feedback-useful-buttons {
  display: flex;
  gap: 8px;
}
.deck-feedback-useful-btn {
  min-width: 58px;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.14));
  border-radius: var(--radius-pill, 999px);
  background: none;
  color: var(--text-1, #f0eef8);
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, opacity .15s ease;
}
.deck-feedback-useful-btn:hover:not(:disabled) {
  border-color: var(--accent, #c9a84c);
}
.deck-feedback-useful-btn:focus-visible {
  outline: 2px solid var(--accent, #c9a84c);
  outline-offset: 2px;
}
.deck-feedback-useful-btn.is-selected {
  border-color: var(--accent, #c9a84c);
  background: var(--accent-dim, rgba(201, 168, 76, 0.14));
  color: var(--accent-soft, #efd58b);
}
.deck-feedback-useful-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.deck-feedback-useful-status {
  font-size: 13px;
  color: var(--text-2, #8a879e);
}

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

@media (prefers-reduced-motion: reduce) {
  .deck-feedback-trigger,
  .deck-feedback-btn,
  .deck-feedback-useful-btn,
  .deck-feedback-select,
  .deck-feedback-textarea {
    transition: none;
  }
}
