/* ═══════════════════════════════════════════════════════════════
   sm-feedback.css — SenseMake.uk Shared Framework
   Teacher feedback modal
   ═══════════════════════════════════════════════════════════════ */

/* ── Overlay (same pattern as .sm-notes-overlay) ───────────────── */
.sm-feedback-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 600;  /* Above drawer (300) and notes (500) */
  align-items: center;
  justify-content: center;
}
.sm-feedback-overlay.open {
  display: flex;
}
[data-theme="dark"] .sm-feedback-overlay {
  background: rgba(0, 0, 0, 0.6);
}

/* ── Modal (same pattern as .sm-notes-modal) ───────────────────── */
.sm-feedback-modal {
  width: 90%;
  max-width: 440px;
  max-height: 85vh;
  background: var(--sm-surface);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
[data-theme="dark"] .sm-feedback-modal {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ── Header ────────────────────────────────────────────────────── */
.sm-feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--sm-border);
}
.sm-feedback-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--sm-font);
  color: var(--sm-text);
}
.sm-feedback-close {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--sm-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
}
.sm-feedback-close:hover {
  background: var(--sm-surface-raised);
  color: var(--sm-text);
}

/* ── Body ──────────────────────────────────────────────────────── */
.sm-feedback-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

/* ── Labels ────────────────────────────────────────────────────── */
.sm-fb-label {
  margin: 0 0 10px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--sm-text);
  font-family: var(--sm-font);
}

/* ── Role buttons ──────────────────────────────────────────────── */
.sm-fb-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.sm-fb-role-btn {
  padding: 6px 12px;
  min-height: 34px;
  border: 1.5px solid var(--sm-border);
  border-radius: 6px;
  background: var(--sm-surface);
  color: var(--sm-text);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--sm-font);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.sm-fb-role-btn:hover {
  background: var(--sm-surface-raised);
  border-color: var(--sm-text-muted);
}
.sm-fb-role-btn.selected {
  background: var(--sm-indigo);
  border-color: var(--sm-indigo);
  color: #fff;
}

.sm-fb-other-note {
  font-size: 11px;
  color: var(--sm-text-muted);
  font-style: italic;
  margin: 6px 0 0 0;
  line-height: 1.5;
}

/* ── Type buttons (reaction cards) ─────────────────────────────── */
.sm-fb-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.sm-fb-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  min-height: 44px;
  border: 1.5px solid var(--sm-border);
  border-radius: 8px;
  background: var(--sm-surface);
  color: var(--sm-text);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--sm-font);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.sm-fb-type-btn:hover {
  background: var(--sm-surface-raised);
  border-color: var(--sm-text-muted);
}
.sm-fb-type-btn:active {
  transform: scale(0.97);
}
.sm-fb-type-btn.selected {
  border-color: var(--sm-indigo);
  background: var(--sm-indigo-light);
}
[data-theme="dark"] .sm-fb-type-btn.selected {
  background: rgba(79, 70, 229, 0.2);
}
.sm-fb-emoji {
  font-size: 22px;
  line-height: 1;
}

/* ── Quick send ────────────────────────────────────────────────── */
.sm-fb-quick-send {
  display: block;
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  background: none;
  border: none;
  color: var(--sm-indigo);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--sm-font);
  cursor: pointer;
  text-align: center;
}
.sm-fb-quick-send:hover {
  text-decoration: underline;
}

/* ── Detail step ───────────────────────────────────────────────── */
.sm-fb-selected-type {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sm-fb-selected-pill {
  display: inline-block;
  padding: 3px 10px;
  background: var(--sm-indigo-light);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sm-indigo);
}
[data-theme="dark"] .sm-fb-selected-pill {
  background: rgba(79, 70, 229, 0.2);
}
.sm-fb-change {
  background: none;
  border: none;
  font-size: 11px;
  color: var(--sm-text-muted);
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--sm-font);
  padding: 0;
}

.sm-fb-textarea {
  width: 100%;
  min-height: 80px;
  max-height: 150px;
  padding: 10px;
  border: 1.5px solid var(--sm-border);
  border-radius: 8px;
  background: var(--sm-surface);
  color: var(--sm-text);
  font-size: 13px;
  font-family: var(--sm-font);
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 8px;
}
.sm-fb-textarea:focus {
  outline: none;
  border-color: var(--sm-indigo);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.sm-fb-email {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--sm-border);
  border-radius: 6px;
  background: var(--sm-surface);
  color: var(--sm-text);
  font-size: 12px;
  font-family: var(--sm-font);
  margin-bottom: 12px;
}
.sm-fb-email:focus {
  outline: none;
  border-color: var(--sm-indigo);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Honeypot — hidden from humans, visible to bots */
.sm-fb-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

.sm-fb-submit {
  width: 100%;
  padding: 10px;
  min-height: 44px;
  background: var(--sm-indigo);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--sm-font);
  cursor: pointer;
  transition: background 0.15s;
}
.sm-fb-submit:hover {
  background: #4338ca;  /* slightly darker indigo */
}
.sm-fb-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ── Success state ─────────────────────────────────────────────── */
.sm-fb-done {
  text-align: center;
  padding: 24px 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--sm-correct);
}

/* ── Error state ───────────────────────────────────────────────── */
.sm-fb-error {
  text-align: center;
  padding: 16px;
  font-size: 13px;
  color: var(--sm-incorrect);
}
.sm-fb-retry {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 20px;
  min-height: 44px;
  background: var(--sm-surface);
  border: 1.5px solid var(--sm-border);
  border-radius: 6px;
  color: var(--sm-text);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--sm-font);
  cursor: pointer;
}
.sm-fb-retry:hover {
  background: var(--sm-surface-raised);
}
