/* ============================================================
   The Tech Pad — HUMAN AGENT REPLY overlay styles (Messenger / Instagram)
   Light theme only (the app is light; only the sidebar is dark):
   cards #fff, borders #dfe6e2 / #c3d2cb, text #14231e, muted #74827c,
   accent green #128c7e.
   ============================================================ */

.ttp-ha {
  margin: 0 16px 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #dfe6e2;
  background: #f7faf9;
  color: #14231e;
  font-size: 12.5px;
  line-height: 1.45;
}

.ttp-ha-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}
.ttp-ha-head b { font-size: 13px; }
.ttp-ha-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #128c7e;
  flex: 0 0 auto;
}
.ttp-ha-chan {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 5px;
  background: #e9ecff;
  color: #2f3fa8;
}
.ttp-ha[data-cid] .ttp-ha-chan { white-space: nowrap; }

.ttp-ha-text { margin: 0 0 8px; color: #2f443d; }
.ttp-ha-note { font-size: 11.5px; color: #74827c; }

/* ---- inside the standard 24-hour window: informational only ---- */
.ttp-ha-open .ttp-ha-dot { background: #128c7e; }

/* ---- window closed, human agent reply allowed: the actionable state ---- */
.ttp-ha-human-agent {
  background: #fff8e8;
  border-color: #e8c880;
}
.ttp-ha-human-agent .ttp-ha-dot { background: #d68a00; }

.ttp-ha-toggle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 8px;
  padding: 9px 10px;
  border: 1px solid #e8c880;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  color: #14231e;
}
.ttp-ha-toggle input {
  margin: 1px 0 0;
  width: 15px;
  height: 15px;
  accent-color: #128c7e;
  flex: 0 0 auto;
}
.ttp-ha-toggle:hover { border-color: #128c7e; }

.ttp-ha-why {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-left: 3px solid #e8c880;
  background: #fffdf6;
  border-radius: 0 6px 6px 0;
  font-size: 11.5px;
  color: #5c5344;
}
.ttp-ha-why p { margin: 0 0 5px; }
.ttp-ha-why p:last-child { margin-bottom: 0; }
.ttp-ha-why b { color: #14231e; }

/* ---- past 7 days: nothing can be delivered ---- */
.ttp-ha-closed {
  background: #fdf3f3;
  border-color: #e6b7b7;
}
.ttp-ha-closed .ttp-ha-dot { background: #c0392b; }

/* ---- reply that went out with the tag ---- */
.ttp-ha-history {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed #dfe6e2;
  font-size: 11.5px;
  font-weight: 600;
  color: #0f6b5f;
}

article.message-bubble[data-ttp-ha] footer::after {
  content: "· human agent reply";
  margin-left: 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: #0f6b5f;
  white-space: nowrap;
}
article.message-bubble[data-ttp-ha] {
  box-shadow: inset 0 0 0 1px #b9e0d6;
}

/* ---- mobile: keep the notice readable in the narrow composer ---- */
@media (max-width: 760px) {
  .ttp-ha { margin: 0 10px 8px; padding: 11px 12px; font-size: 12px; }
  .ttp-ha-why { font-size: 11px; }
}
