/* /css/saas/11-components.customer-chats.css */

.saas-chat-section-title {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
  margin: 12px 8px 6px 8px;
}

.live-indicator {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  opacity: 0.9;
}

.live-indicator.is-live {
  font-weight: 700;
}

/* .watched-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  margin-left: 8px;
  opacity: 0.9;
} */

.watched-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 999px;
  background: rgba(94,203,255,.15);
  font-size: 14px; /* emoji scales naturally */
}

.watched-badge.is-watched {
  font-weight: 700;
}

.a12.is-live-thread {
  outline: 1px solid rgba(255,255,255,0.12);
}

.a12.is-ended-thread {
  opacity: 0.6;
}

.saas-chat-mode-banner {
  margin: 8px 0 10px 0;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  font-size: 13px;
  line-height: 1.2;
}

.saas-chat-mode-banner.is-hidden {
  display: none;
}

/* ================================
   Customer (iframe) chat rows
   Mirror regular chat layout
================================ */

/* Row layout */
#divLiveIframeChats .a12,
#divIframeHistory .a12 {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  align-items: center;
  gap: 10px;

  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}

/* Left icon column */
#divLiveIframeChats .conversation-icons,
#divIframeHistory .conversation-icons {
  display: grid;
  gap: 6px;
  justify-items: center;
}

/* Chat SVG icon — THIS FIXES THE HUGE ICON */
#divLiveIframeChats .chat-icon,
#divIframeHistory .chat-icon {
  width: 18px;
  height: 18px;
  opacity: 0.9;
  object-fit: contain;
}

#divLiveIframeChats .a12:hover,
#divIframeHistory .a12:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(94,203,255,0.35);
}

.conversation-status {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.conversation-row {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  align-items: center;
  gap: 10px;
}

.watched-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 999px;
  background: rgba(94,203,255,.15);
}

/* .watched-badge img.watch-icon {
  width: 14px;
  height: 14px;
  opacity: 0.9;
} */

.system-message {
  font-size: 14px;
  line-height: 1.45;
  margin: 6px 0;
  word-wrap: break-word;
}

.system-message strong {
  font-weight: 700;
  margin-right: 4px;
}

.conversation-icons {
  align-self: flex-start;
}

/* =========================================================
   Customer Chat – System Message Styling
   (Actors: user, bot, bot suggestion, admin)
   Safe: does NOT affect regular bot/admin chat bubbles
========================================================= */

.system-message {
  margin: 10px 0;                 /* clear separation between actors */
  padding: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text-main, #0f172a);
  word-break: break-word;
}

/* Bold speaker label */
.system-message strong {
  font-weight: 700;
  margin-right: 6px;
  white-space: nowrap;
}

/* Optional: slightly dim long system text for readability */
.system-message span,
.system-message {
  opacity: 0.95;
}

/* Mobile safety */
@media (max-width: 640px) {
  .system-message {
    font-size: 13.5px;
  }
}

.live-indicator.is-offline { opacity: 0.7; }
.live-indicator.is-ended { opacity: 0.6; }

/* =========================================================
   Customer HISTORY: action icons under chat icon
   Scoped: only affects #divIframeHistory
========================================================= */

/* Stack chat icon + actions nicely */
#divIframeHistory .conversation-icons {
  gap: 6px; /* keep existing spacing */
}

/* Row of tiny icons under chat icon */
#divIframeHistory .cust-actions-under-icon {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

/* Make them same size as chat icon (18px) */
#divIframeHistory .cust-action-icon {
  width: 18px;
  height: 18px;
  opacity: 0.85;
  object-fit: contain;
  cursor: pointer;
}

/* Subtle hover without affecting other elements */
#divIframeHistory .cust-action-icon:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* Prevent the icons from stretching the grid column */
#divIframeHistory .conversation-icons img {
  display: block;
}
