/* ============================================================
   FEEDBACK MODAL
   Compact, low-friction feedback form. Reuses existing modal
   base classes (.modal, .modal-backdrop, .modal-card, .pill).
   ============================================================ */

#feedback-backdrop { z-index: 10002; }
#feedback-modal    { z-index: 10003; }

.feedback-card {
  width: min(520px, 96vw);
  max-height: min(90vh, 580px);
  padding: 26px 26px 22px;
}

/* Header row */
.feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.feedback-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

.feedback-close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.12s ease, color 0.12s ease;
  font-family: inherit;
}
.feedback-close-btn:hover {
  background: #f1f5f9;
  color: #475569;
}

/* Category chips */
.feedback-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 15px;
}

.feedback-chip {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: #f1f5f9;
  color: #64748b;
  border: 1.5px solid transparent;
  transition: background 0.1s ease, color 0.1s ease, border-color 0.1s ease;
  font-family: inherit;
  line-height: 1.5;
}
.feedback-chip:hover {
  background: #e2e8f0;
  color: #334155;
}
.feedback-chip[aria-pressed="true"] {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

/* Textarea */
.feedback-prompt {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 7px;
}

.feedback-textarea {
  width: 100%;
  min-height: 88px;
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #f8fafc;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  line-height: 1.5;
  display: block;
  margin-bottom: 14px;
}
.feedback-textarea:focus {
  border-color: #2563eb;
  background: #fff;
}
.feedback-textarea.feedback-shake {
  animation: fbShake 0.32s ease;
  border-color: #ef4444;
}
@keyframes fbShake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-5px); }
  75%       { transform: translateX(5px); }
}

/* Submit */
.feedback-submit-btn {
  width: 100%;
  display: block;
  padding: 12px 20px;
  font-size: 14px;
}

/* Success */
.feedback-success {
  padding: 24px 0 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

/* ── Secondary / inline entry point ──────────────────────── */

.feedback-inline-wrap {
  margin-top: 10px;
  text-align: center;
  /* Override #footer { pointer-events: none } */
  pointer-events: auto;
}

.feedback-inline-text {
  font-size: 12px;
  color: #94a3b8;
}

.feedback-inline-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: inherit;
  transition: color 0.12s ease;
  pointer-events: auto;
}
.feedback-inline-btn:hover {
  color: #334155;
}

/* Hide secondary prompt while a game is active */
#layout[data-route="play"] .feedback-inline-wrap {
  display: none;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .feedback-card {
    padding: 20px 16px 18px;
  }
}
