/* =========================================================
   CCAA Testimonials — auto-scroll strip + submission pages
   ========================================================= */

/* ---------- Front-page auto-scroll marquee ---------- */
.testi-scroll-outer {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.testi-scroll-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: ccaa-testi-scroll var(--testi-scroll-seconds, 36s) linear infinite;
}
.testi-scroll-outer:hover .testi-scroll-track,
.testi-scroll-outer:focus-within .testi-scroll-track {
  animation-play-state: paused;
}
@keyframes ccaa-testi-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.testi-scroll-track .testi-card {
  flex: 0 0 340px;
  width: 340px;
}
@media (max-width: 640px) {
  .testi-scroll-track .testi-card { flex-basis: 280px; width: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  .testi-scroll-track { animation: none; }
  .testi-scroll-outer { overflow-x: auto; }
}

.testi-section-head-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  /* This row carries the shared .section-head rule (max-width:680px), which
     was capping the whole title+button row instead of just the text — that
     squeezed the button onto its own line below. Let the row use the full
     section width and constrain only the text column instead. */
  max-width: none;
}
.testi-section-head-text { max-width: 680px; }
.testi-write-cta { flex-shrink: 0; }

@media (max-width: 640px) {
  /* Below the breakpoint where the button would crowd the title, drop it
     back under the text instead of squeezing both onto one line. */
  .testi-section-head-row { align-items: flex-start; }
  .testi-write-cta { width: 100%; text-align: center; }
}

.testi-empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: center;
  color: var(--ink-dim);
}
.testi-empty a { color: var(--crest); font-weight: 600; }

/* ---------- Write-a-review / My-testimonials pages ---------- */
.ccaa-tform-section { padding: 64px 0 96px; }
.ccaa-tform-wrap { max-width: 720px; }
.ccaa-tform-title { font-family: var(--font-display); font-size: 36px; margin: 10px 0 14px; color: var(--ink); }
.ccaa-tform-note { color: var(--ink-dim); line-height: 1.7; margin-bottom: 28px; }

.ccaa-tform-notice {
  border-radius: 10px; padding: 14px 18px; margin-bottom: 22px; font-size: 14px; line-height: 1.6;
}
.ccaa-tform-notice ul { margin: 0; padding-left: 18px; }
.ccaa-tform-notice--error   { background: rgba(162,55,55,.08); border: 1px solid rgba(162,55,55,.25); color: #7a2626; }
.ccaa-tform-notice--info    { background: rgba(30,58,95,.06); border: 1px solid rgba(30,58,95,.2); color: var(--crest); }
.ccaa-tform-notice--success { background: rgba(92,122,82,.1); border: 1px solid rgba(92,122,82,.3); color: var(--sage); }

.ccaa-tform { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; }
.ccaa-tform-row { margin-bottom: 20px; }
.ccaa-tform-row label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--ink); }
.ccaa-tform-row input[type="text"],
.ccaa-tform-row textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; padding: 11px 14px;
  font-family: var(--font-body); font-size: 15px; color: var(--ink); background: var(--surface);
}
.ccaa-tform-row input[type="text"]:focus,
.ccaa-tform-row textarea:focus { outline: none; border-color: var(--crest); }
.ccaa-tform-row textarea { resize: vertical; }

.ccaa-star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.ccaa-star-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.ccaa-star-input label {
  font-size: 30px; line-height: 1; color: var(--line-strong); cursor: pointer;
  transition: color .12s ease; margin: 0 !important;
}
.ccaa-star-input input:checked ~ label,
.ccaa-star-input label:hover,
.ccaa-star-input label:hover ~ label {
  color: var(--gold);
}

.ccaa-tform-terms { margin-bottom: 24px; font-size: 13px; color: var(--ink-dim); line-height: 1.6; }
.ccaa-tform-terms label { display: flex; align-items: flex-start; gap: 10px; }
.ccaa-tform-terms input { margin-top: 3px; }

.ccaa-tform-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- My testimonials list ---------- */
.ccaa-tmine-head-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.ccaa-tmine-new { margin-bottom: 32px; display: inline-flex; flex-shrink: 0; }
.ccaa-tmine-empty { color: var(--ink-dim); }
.ccaa-tmine-list { display: flex; flex-direction: column; gap: 20px; }
.ccaa-tmine-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.ccaa-tmine-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.ccaa-tmine-date { color: var(--ink-dim); font-size: 12px; }

.ccaa-tstatus {
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
}
.ccaa-tstatus.is-approved   { background: rgba(92,122,82,.12); color: var(--sage); }
.ccaa-tstatus.is-pending    { background: rgba(212,167,58,.15); color: #93741f; }
.ccaa-tstatus.is-needs-info { background: rgba(30,58,95,.1); color: var(--crest); }
.ccaa-tstatus.is-rejected   { background: rgba(162,55,55,.1); color: var(--clay); }
.ccaa-tstatus.is-draft      { background: var(--surface-2); color: var(--ink-dim); }

.ccaa-tmine-note {
  margin-top: 16px; background: var(--surface-2); border-left: 3px solid var(--crest);
  border-radius: 6px; padding: 12px 16px;
}
.ccaa-tmine-note strong { font-size: 12px; color: var(--ink); }
.ccaa-tmine-note p { margin: 4px 0 0; font-size: 14px; color: var(--ink-dim); line-height: 1.6; }

.ccaa-tmine-actions { margin-top: 18px; display: flex; gap: 10px; }
.ccaa-tmine-actions form { margin: 0; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-danger { color: var(--clay); border-color: rgba(162,55,55,.35); }
.btn-danger:hover { background: rgba(162,55,55,.08); }

/* ---------- Threaded conversation (panel notes + member replies) ---------- */
.ccaa-tmine-thread { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.ccaa-tmine-thread-entry {
  border-left: 3px solid var(--crest); background: var(--surface-2);
  border-radius: 0 6px 6px 0; padding: 10px 14px;
}
.ccaa-tmine-thread-entry--member { border-left-color: var(--heritage); background: rgba(154,106,35,.06); }
.ccaa-tmine-thread-meta { font-size: 11px; color: var(--ink-dim); margin-bottom: 4px; }
.ccaa-tmine-thread-entry p { margin: 0; font-size: 14px; color: var(--ink); line-height: 1.6; white-space: pre-wrap; }

.ccaa-tmine-reply-form { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.ccaa-tmine-reply-form label { font-weight: 600; font-size: 13px; color: var(--ink); }
.ccaa-tmine-reply-form textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; padding: 11px 14px;
  font-family: var(--font-body); font-size: 14px; color: var(--ink); background: var(--surface); resize: vertical;
}
.ccaa-tmine-reply-form textarea:focus { outline: none; border-color: var(--crest); }
.ccaa-tmine-reply-form button { align-self: flex-start; }
