/* GlobaPlace 3.3 Batch G: Conversation / Support / Message Context shell */

:root {
  --gp-thread-ink: #151611;
  --gp-thread-muted: rgba(21,22,17,.66);
  --gp-thread-line: rgba(21,22,17,.13);
  --gp-thread-card: #fff;
  --gp-thread-soft: #f7f4e7;
  --gp-thread-yellow: #f3c80f;
  --gp-thread-blue: #153e75;
  --gp-thread-green: #1d7f47;
  --gp-thread-red: #9b2f25;
}

.gp-thread-layout {
  display: grid;
  grid-template-columns: minmax(260px, .36fr) minmax(0, 1fr) minmax(280px, .42fr);
  gap: 16px;
  margin-top: 18px;
}

.gp-thread-sidebar,
.gp-thread-main,
.gp-thread-context {
  border: 1px solid var(--gp-thread-line);
  border-radius: 22px;
  background: var(--gp-thread-card);
  box-shadow: 0 14px 38px rgba(21,22,17,.06);
  overflow: hidden;
}

.gp-thread-section-head {
  padding: 16px;
  border-bottom: 1px solid var(--gp-thread-line);
  background: linear-gradient(135deg, #fff, #fff8d2);
}

.gp-thread-section-head h2,
.gp-thread-section-head h3 {
  margin: 0;
  letter-spacing: -.035em;
  line-height: 1.05;
}

.gp-thread-section-head p {
  margin: 7px 0 0;
  color: var(--gp-thread-muted);
  line-height: 1.4;
  font-size: 13px;
}

.gp-thread-list,
.gp-thread-context-list,
.gp-thread-messages {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.gp-thread-row {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--gp-thread-line);
  border-radius: 16px;
  background: #fff;
}

.gp-thread-row.active {
  background: #fff8d7;
  border-color: rgba(243,200,15,.50);
}

.gp-thread-avatar {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: var(--gp-thread-yellow);
  display: grid;
  place-items: center;
  color: var(--gp-thread-ink);
  font-weight: 900;
}

.gp-thread-row strong {
  display: block;
  font-size: 14px;
  line-height: 1.15;
}

.gp-thread-row span {
  display: block;
  margin-top: 4px;
  color: var(--gp-thread-muted);
  line-height: 1.35;
  font-size: 12px;
}

.gp-thread-message {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--gp-thread-soft);
  border: 1px solid var(--gp-thread-line);
}

.gp-thread-message.agent {
  margin-left: auto;
  background: #fff8d7;
  border-color: rgba(243,200,15,.45);
}

.gp-thread-message strong {
  display: block;
  font-size: 13px;
  margin-bottom: 5px;
}

.gp-thread-message p {
  margin: 0;
  color: rgba(21,22,17,.78);
  line-height: 1.45;
  font-size: 13px;
}

.gp-thread-composer {
  border-top: 1px solid var(--gp-thread-line);
  padding: 14px;
  display: grid;
  gap: 10px;
  background: #fbfaf4;
}

.gp-thread-composer textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border-radius: 16px;
  border: 1px solid var(--gp-thread-line);
  padding: 12px;
  box-sizing: border-box;
  font: inherit;
}

.gp-thread-composer button {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.16);
  background: var(--gp-thread-yellow);
  color: var(--gp-thread-ink);
  font-weight: 900;
  opacity: .7;
  cursor: not-allowed;
}

.gp-context-card {
  padding: 13px;
  border: 1px solid var(--gp-thread-line);
  border-radius: 16px;
  background: #fff;
}

.gp-context-card strong {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: rgba(21,22,17,.58);
}

.gp-context-card h3 {
  margin: 6px 0;
  font-size: 17px;
  line-height: 1.15;
}

.gp-context-card p {
  margin: 0;
  color: var(--gp-thread-muted);
  font-size: 13px;
  line-height: 1.4;
}

.gp-thread-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.gp-thread-pill {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid var(--gp-thread-line);
  background: #f4f3ed;
  color: var(--gp-thread-muted);
  font-size: 12px;
  font-weight: 800;
}

.gp-thread-pill.good {
  background: #eaf7ef;
  color: var(--gp-thread-green);
  border-color: rgba(29,127,71,.22);
}

.gp-thread-pill.warn {
  background: #fff8d7;
  color: #7a5908;
  border-color: rgba(243,200,15,.45);
}

.gp-thread-pill.risk {
  background: #fff0ec;
  color: var(--gp-thread-red);
  border-color: rgba(155,47,37,.22);
}

.gp-support-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  margin-top: 18px;
}

.gp-support-stat {
  padding: 16px;
  border: 1px solid var(--gp-thread-line);
  border-radius: 18px;
  background: #fff;
}

.gp-support-stat strong {
  display: block;
  font-size: 25px;
  letter-spacing: -.04em;
}

.gp-support-stat span {
  display: block;
  margin-top: 6px;
  color: var(--gp-thread-muted);
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .gp-thread-layout {
    grid-template-columns: 1fr;
  }

  .gp-support-board {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 640px) {
  .gp-thread-message {
    max-width: 100%;
  }

  .gp-support-board {
    grid-template-columns: 1fr;
  }
}
