/* Meta Business Suite-style Social Inbox */
.gm-bs-inbox {
  padding-bottom: 12px;
}
.gm-bs-inbox .gm-bs-hero,
.gm-bs-inbox .blue-hero {
  background: linear-gradient(135deg, #0b2559, #163e8a);
}
.gm-bs-sync-note {
  color: #0b2559;
  border-color: #dbeafe;
}
.gm-bs-inbox .gm-bs-hero h1 {
  font-size: 26px !important;
  letter-spacing: -0.03em;
}
.gm-bs-inbox .gm-bs-hero p {
  max-width: 40rem !important;
}
.gm-bs-workspace {
  min-height: min(72vh, 760px);
  background: #fff;
  box-shadow: 0 10px 28px rgba(11, 37, 89, 0.08);
}
.gm-bs-list,
.gm-bs-thread {
  background: #fff;
}
.gm-bs-list-head,
.gm-bs-thread-head {
  padding: 12px 14px !important;
  background: #fff;
}
.gm-bs-list-head h3,
.gm-bs-thread-head h3 {
  font-size: 15px !important;
  font-weight: 800 !important;
}
.gm-bs-refresh {
  color: #1877f2 !important;
  font-weight: 800 !important;
}
.gm-bs-conv {
  position: relative;
  background: #fff;
  border-color: #eef2f6 !important;
}
.gm-bs-conv.is-active {
  background: #e7f3ff !important;
}
.gm-bs-conv.is-active::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #1877f2;
}
.gm-bs-avatar {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #4b8ef7, #1877f2);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}
.gm-bs-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.gm-bs-unread {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #1877f2;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}
.gm-bs-thread {
  display: flex;
  flex-direction: column;
  background: #f0f2f5;
}
.gm-bs-thread-head {
  background: #fff !important;
}
.gm-bs-thread-log {
  flex: 1;
  background:
    linear-gradient(180deg, rgba(24, 119, 242, 0.05), transparent 90px),
    #e9eef5;
  max-height: min(58vh, 520px) !important;
}
.gm-bs-bubble {
  box-shadow: 0 1px 1px rgba(11, 37, 89, 0.06);
  word-break: break-word;
}
.gm-bs-out {
  background: #1877f2 !important;
  color: #fff !important;
  border-end-end-radius: 6px !important;
}
.gm-bs-in {
  background: #fff !important;
  color: #111827 !important;
  border: 0 !important;
  border-end-start-radius: 6px !important;
}
/* Keep page/agent bubbles on the visual right, like Messenger */
.gm-bs-thread-log > .flex.justify-end {
  justify-content: flex-end !important;
}
.gm-bs-thread-log > .flex.justify-start {
  justify-content: flex-start !important;
}
[dir="rtl"] .gm-bs-thread-log > .flex.justify-end {
  justify-content: flex-start !important;
}
[dir="rtl"] .gm-bs-thread-log > .flex.justify-start {
  justify-content: flex-end !important;
}
.gm-bs-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px 12px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}
.gm-bs-composer-input,
.gm-bs-inbox textarea.gm-bs-composer-input {
  min-height: 42px !important;
  max-height: 120px;
  border-radius: 22px !important;
  background: #f0f2f5 !important;
  border-color: transparent !important;
  padding: 10px 14px !important;
  resize: none;
}
.gm-bs-send {
  min-width: 44px;
  height: 42px;
  border-radius: 999px !important;
  background: #1877f2 !important;
  color: #fff !important;
}
.gm-bs-inbox .gm-bs-thread [class*="md:grid-cols-[1fr_auto]"] {
  margin-bottom: 4px;
}
html.dark .gm-bs-workspace,
html.dark .gm-bs-list,
html.dark .gm-bs-list-head,
html.dark .gm-bs-thread-head,
html.dark .gm-bs-composer {
  background: #121a2b;
  border-color: rgba(226, 232, 240, 0.12);
}
html.dark .gm-bs-thread,
html.dark .gm-bs-thread-log {
  background: #0b1220;
}
html.dark .gm-bs-conv {
  background: transparent;
  border-color: rgba(226, 232, 240, 0.08) !important;
}
html.dark .gm-bs-conv.is-active {
  background: rgba(24, 119, 242, 0.16) !important;
}
html.dark .gm-bs-in {
  background: #1c273c !important;
  color: #e2e8f0 !important;
}
html.dark .gm-bs-composer-input,
html.dark .gm-bs-inbox textarea.gm-bs-composer-input {
  background: #1c273c !important;
  color: #e2e8f0 !important;
}
@media (max-width: 1023.98px) {
  .gm-bs-workspace {
    min-height: 0;
    border-radius: 1rem;
  }
  .gm-bs-list [class*="max-h-[680px]"] {
    max-height: 42vh !important;
  }
  .gm-bs-thread-log {
    max-height: 48vh !important;
  }
  .gm-bs-inbox .gm-bs-hero h1 {
    font-size: 22px !important;
  }
}
