/* Feedback inbox (feedback.js): conversation list + thread, July palette. */
.fb-shell { display: grid; gap: 14px; }
.fb-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.fb-head h2 { margin: 2px 0 4px; font-size: 22px; color: var(--teal-xdark, #134e4a); }
.fb-sub { margin: 0; font-size: 13.5px; color: var(--text-muted, #78716c); }
.fb-head-actions { display: flex; gap: 8px; }
.fb-primary {
  min-height: 42px; padding: 9px 18px; border: 0; border-radius: 12px; background: var(--teal, #0d9488);
  color: #fff; font-weight: 700; cursor: pointer;
}
.fb-primary:hover:not(:disabled) { background: var(--teal-dark, #0f766e); }
.fb-primary:disabled { opacity: .6; cursor: default; }
.fb-notice { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--danger-soft, #fff1f2); color: #9f1239; font-size: 13px; }

.fb-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fb-filter {
  min-height: 36px; padding: 6px 12px; border: 1px solid var(--stroke, #e4e2dc); border-radius: 999px;
  background: #fff; color: var(--text-primary, #1c1917); font-size: 13px; cursor: pointer;
}
.fb-filter span { margin-left: 4px; color: var(--text-muted, #78716c); font-weight: 600; }
.fb-filter.active { border-color: var(--teal, #0d9488); background: var(--teal-light, #ccfbf1); color: var(--teal-xdark, #134e4a); font-weight: 700; }
.fb-search { flex: 1 1 220px; min-height: 38px; padding: 8px 12px; border: 1px solid var(--stroke, #e4e2dc); border-radius: 10px; font: inherit; }

.fb-layout { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 14px; align-items: start; }
.fb-list, .fb-pane { background: #fff; border: 1px solid var(--stroke, #e4e2dc); border-radius: 16px; }
.fb-list { padding: 6px; max-height: 70vh; overflow: auto; }
.fb-pane { padding: 16px; min-height: 260px; }
.fb-empty, .fb-placeholder p { margin: 0; padding: 18px; color: var(--text-muted, #78716c); font-size: 13.5px; }
.fb-placeholder { display: grid; place-items: center; min-height: 220px; text-align: center; }

.fb-threads { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.fb-thread-row {
  width: 100%; display: grid; gap: 3px; padding: 10px 12px; border: 1px solid transparent; border-radius: 12px;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.fb-thread-row:hover { background: var(--warm-gray, #f5f4f0); }
.fb-thread-row.active { border-color: var(--teal, #0d9488); background: var(--mint, #f0fdf9); }
.fb-row-top { display: flex; justify-content: space-between; gap: 8px; }
.fb-row-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.fb-thread-row.unread .fb-row-top strong { color: var(--teal-xdark, #134e4a); }
.fb-row-when { flex: 0 0 auto; color: var(--text-muted, #78716c); font-size: 12px; }
.fb-row-person { color: var(--teal-dark, #0f766e); font-size: 12.5px; font-weight: 600; }
.fb-row-preview { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: #57534e; font-size: 13px; }
.fb-row-foot { display: flex; align-items: center; gap: 6px; }
.fb-unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger, #e11d48); }

.fb-status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--warm-gray, #f5f4f0); color: #57534e; }
.fb-status.answered { background: var(--green-soft, #f0fdf4); color: #15803d; }
.fb-status.open { background: #fffbeb; color: #b45309; }

.fb-back { display: none; margin-bottom: 8px; padding: 6px 0; border: 0; background: none; color: var(--teal-dark, #0f766e); font-weight: 700; cursor: pointer; }
.fb-thread-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.fb-thread-head h3, .fb-compose h3 { margin: 0; font-size: 17px; }
.fb-person { margin: 4px 0 0; color: var(--text-muted, #78716c); font-size: 13px; }
.fb-status-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.fb-messages { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 10px; max-height: 50vh; overflow: auto; }
.fb-message { max-width: 82%; padding: 10px 12px; border-radius: 14px; }
.fb-message.theirs { justify-self: start; background: var(--warm-gray, #f5f4f0); border-top-left-radius: 4px; }
.fb-message.mine { justify-self: end; background: var(--teal, #0d9488); color: #fff; border-top-right-radius: 4px; }
.fb-message-who { margin: 0 0 2px; font-size: 11.5px; font-weight: 700; opacity: .8; }
.fb-message-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.fb-message-when { margin: 4px 0 0; font-size: 11px; opacity: .7; }

.fb-compose, .fb-reply { display: grid; gap: 10px; }
.fb-compose label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.fb-compose input, .fb-compose textarea, .fb-reply textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--stroke, #e4e2dc); border-radius: 10px; font: inherit; font-weight: 400; resize: vertical;
}
.fb-compose input:focus, .fb-compose textarea:focus, .fb-reply textarea:focus, .fb-search:focus { outline: 2px solid var(--teal, #0d9488); outline-offset: 1px; }
.fb-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fb-count { color: var(--text-muted, #78716c); font-size: 12px; }
.fb-hint { margin: 0; color: var(--text-muted, #78716c); font-size: 12.5px; }

/* Unread count on the Feedback / Feedback inbox navigation items. */
[data-view="feedback"], [data-view="feedback-inbox"] { position: relative; }
.feedback-count-badge {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--danger, #e11d48); color: #fff; font: 700 11px/18px Inter, system-ui, sans-serif; text-align: center; pointer-events: none;
}

@media (max-width: 820px) {
  .fb-layout { grid-template-columns: minmax(0, 1fr); }
  .fb-layout.has-open .fb-list { display: none; }
  .fb-layout:not(.has-open) .fb-pane { display: none; }
  .fb-back { display: inline-block; }
  .fb-list { max-height: none; }
  .fb-message { max-width: 92%; }
}
@media print { .fb-head-actions, .fb-reply, .fb-filters { display: none; } }
