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

/* ---- channel filter chips (row under the all/open/resolved filters) ---- */
.ttp-ch-bar {
  display: flex;
  gap: 6px;
  padding: 0 12px 10px;
  flex-wrap: wrap;
}
.ttp-ch {
  appearance: none;
  border: 1px solid #dfe6e2;
  background: #fff;
  color: #41544c;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.ttp-ch:hover { background: #f1f5f3; border-color: #c3d2cb; }
.ttp-ch.active {
  background: #0d2b22;
  border-color: #0d2b22;
  color: #fff;
}
.ttp-ch:focus-visible { outline: 2px solid #128c7e; outline-offset: 1px; }

/* ---- per-row channel tag inside .conversation-meta ---- */
.ttp-ch-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 5px;
  margin-top: 4px;
  white-space: nowrap;
}
.ttp-ch-tag.whatsapp { background: #e3f5ee; color: #0f6b5f; }
.ttp-ch-tag.webchat { background: #e6eefc; color: #2a4f9b; }

/* The bundle's .conversation-meta is a column stack (time over badge);
   keep the tag from stretching the row height. */
.conversation-list button .conversation-meta { align-items: flex-end; }

/* ---- web-chat threads: hide WhatsApp-only composer affordances ----
   Templates and media uploads are WhatsApp concepts (approved templates,
   the 24h window). On a web-chat thread they would 400 at send-message,
   so hide rather than let an agent click into an error. */
body.ttp-webchat-thread .chat-actions button[title*="emplate"],
body.ttp-webchat-thread .chat-composer button[title*="emplate"],
body.ttp-webchat-thread .composer-template,
body.ttp-webchat-thread .template-picker-trigger {
  display: none !important;
}

/* ---- mobile: chips scroll horizontally instead of wrapping ---- */
@media (max-width: 760px) {
  .ttp-ch-bar {
    padding: 0 10px 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ttp-ch-bar::-webkit-scrollbar { display: none; }
  .ttp-ch { flex: 0 0 auto; }
}

/* ---- details toggle: the bundle hides .contact-pane (display:none) but the
   shared-inbox grid keeps its 250px third column -> an empty white strip.
   When closed, drop the column so the thread expands edge-to-edge. ---- */
body.ttp-details-closed .shared-inbox { grid-template-columns: 310px minmax(420px, 1fr); }
@media (max-width: 1150px) {
  body.ttp-details-closed .shared-inbox { grid-template-columns: 290px minmax(0, 1fr); }
}

/* ---- contact pane top: the avatar's name + phone duplicate the chat header
   (which keeps avatar, name and channel line). Hide the name block on desktop;
   the pane keeps the avatar, status/contact details and the visitor card. ---- */
.contact-pane > h3,
.contact-pane > p { display: none; }

/* ---- visitor card (tawk.to-style) in the contact pane ---- */
#ttp-visitor-card { text-align: left; padding: 15px 0; border-top: 1px solid #e0e7e3; }
#ttp-visitor-card h4 { margin: 0 0 8px; font-size: 12px; color: #14231e; }
#ttp-visitor-card h5.ttp-v-sub {
  margin: 12px 0 6px; font-size: 10px; text-transform: uppercase;
  letter-spacing: .08em; color: #7b8983;
}
.ttp-v-muted { margin: 4px 0; font-size: 11px; color: #74827c; }
.ttp-v-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.ttp-v-chip {
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: #edf3f0; color: #41544c; text-transform: capitalize;
}
.ttp-v-chip.src { background: #e1f7ee; color: #14704f; }
.ttp-v-chip.camp { background: #e6eefc; color: #2a4f9b; }
.ttp-v-row { display: flex; gap: 8px; padding: 4px 0; font-size: 11px; align-items: baseline; }
.ttp-v-k { flex: 0 0 62px; color: #7b8983; text-transform: uppercase; font-size: 9px; letter-spacing: .05em; font-weight: 700; }
.ttp-v-v { color: #14231e; word-break: break-word; }
.ttp-v-link { color: #0f6b5f; text-decoration: none; word-break: break-all; font-size: 11px; }
.ttp-v-link:hover { text-decoration: underline; }
.ttp-v-pages { display: grid; gap: 4px; }
.ttp-v-page {
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
  padding: 5px 8px; border: 1px solid #e4eae7; border-radius: 8px;
  background: #fafcfb; text-decoration: none; color: #14231e;
}
.ttp-v-page:hover { border-color: #128c7e; background: #f1f5f3; }
.ttp-v-page-url { font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttp-v-page-t { font-size: 9.5px; color: #74827c; flex: 0 0 auto; }

/* ---- canned reply images ---- */
.canned-img { max-width: 140px; border-radius: 8px; margin-top: 6px; display: block; }
.canned-img-actions { display: flex; gap: 8px; align-items: center; }
.canned-img-actions .ghost { margin-top: 6px; }
