/* ==========================================================================
   Feedback — the firm record's satisfaction rating card plus the shared bits
   of the feedback and service-improvement tables (both the firm-scoped and the
   tenant-wide versions).
   ========================================================================== */

/* --- Satisfaction rating -------------------------------------------------- */
.satisfaction__current {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.satisfaction__faces {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.satisfaction__face {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--font-size-xlarge);
  line-height: 1;
}

/* The firm's current score. Filled rather than outlined so it reads as the one
   answer among five rather than as five equal options. */
.satisfaction__face--selected {
  background: var(--color-primary-green);
  border-color: var(--color-primary-green);
  box-shadow: var(--shadow-glow-green);
}

.satisfaction__score {
  min-width: 0;
}

.satisfaction__score-value {
  margin: 0;
  font-size: var(--font-size-xxlarge);
  font-family: var(--font-family-bold);
  font-weight: 600;
  color: var(--color-primary-dark);
  line-height: 1.2;
}

.satisfaction__score-meta {
  margin: 0;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

/* A firm nobody has asked yet has no score, which is not the same as a bad
   one — so the readout withholds the number rather than showing a zero. */
.satisfaction__score-value--empty {
  color: var(--color-text-faint);
}

/* Pushed to the far edge, away from the score it has nothing to do with. */
.satisfaction__send {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  margin-left: auto;
  flex-shrink: 0;
}

/* `button_to` wraps its button in a form; dissolve it so the button sits on
   the column's own gap. */
.satisfaction__send form {
  display: contents;
}

/* Who the survey goes to, or why it cannot go — a greyed-out button on its own
   says neither. Capped so a long contact name wraps rather than stretching the
   card's first row. */
.satisfaction__send-meta {
  margin: 0;
  max-width: 260px;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  text-align: right;
}

.satisfaction__history-label {
  margin: 0 0 var(--space-4);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

.satisfaction__chart {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.satisfaction__column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.satisfaction__bar-value {
  font-size: var(--font-size-small);
  font-family: var(--font-family-bold);
  font-weight: 600;
  color: var(--color-primary-dark);
}

/* Fixed-height track so every bar is measured against the same 5, and the
   month labels sit on one line. */
.satisfaction__bar-track {
  display: flex;
  align-items: flex-end;
  width: 34px;
  height: 96px;
}

.satisfaction__bar {
  width: 100%;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.satisfaction__bar--good {
  background: #4caf7d;
}

.satisfaction__bar--fair {
  background: var(--color-warning);
}

.satisfaction__bar-month {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

/* --- Section blurbs ------------------------------------------------------ */
/* The header's left column is a heading plus a line of guidance, so it stacks
   rather than sitting on the row's centre line. */
.firm-records__header:has(.firm-records__blurb) {
  align-items: flex-start;
}

.firm-records__blurb {
  margin: var(--space-1) 0 0;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

/* --- Feedback & suggestion tables ---------------------------------------- */
/* Free text is the point of both tables, so those columns take the slack and
   wrap; everything else stays on one line. */
.feedback-table__body-cell,
.suggestion-table__description-cell {
  min-width: 260px;
  white-space: normal;
}

.feedback-table__firm-cell {
  font-family: var(--font-family-bold);
  font-weight: 600;
  color: var(--color-primary-dark);
}

.feedback-table__recipients-header {
  min-width: 140px;
}

.feedback-recipients {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-start;
}

.feedback-recipients__avatars {
  display: flex;
  align-items: center;
}

/* Overlap the avatars so a long list stays inside the column. */
.feedback-recipients__avatars .profile-picture + .profile-picture {
  margin-left: -10px;
}

.feedback-recipients__names {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  white-space: normal;
}
