﻿*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Arial, sans-serif; background: #0f172a; color: #e2e8f0; }
.container { max-width: 980px; margin: 24px auto; padding: 16px; }
h1, h2 { margin: 0 0 12px; }
.hint { color: #94a3b8; margin-bottom: 12px; }
.error { color: #fca5a5; margin-top: 8px; }
.status { color: #93c5fd; margin: 8px 0; }
.hidden { display: none !important; }
.card { border: 1px solid #334155; border-radius: 10px; padding: 12px; background: #111827; }
.card-center { max-width: 420px; margin: 30px auto; }

.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar-col { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
input, select, button, textarea {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #111827;
  color: #e2e8f0;
}
textarea { resize: vertical; min-height: 120px; }
button { cursor: pointer; background: #2563eb; border: none; }
.btn-light { background: #334155; }

.layout { display: grid; grid-template-columns: 350px 1fr; gap: 12px; padding: 12px; }
.sidebar, .main { border: 1px solid #334155; border-radius: 12px; padding: 12px; background: #111827; }
.sidebar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

.metrics-box {
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 10px;
  background: #0b1220;
  font-size: 13px;
}

.conversation-list { display: flex; flex-direction: column; gap: 8px; max-height: 68vh; overflow: auto; }
.conv-item { border: 1px solid #334155; border-radius: 10px; padding: 10px; cursor: pointer; color: #e2e8f0; transition: all .15s ease; }
.conv-item strong { color: #f8fafc; display: block; }
.conv-item.active { border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(96,165,250,.25) inset; }
.conv-item small { color: #cbd5e1; display: block; }
.conv-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 2px 0 4px;
}
.conv-agent-name {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(191, 219, 254, 0.5);
  white-space: nowrap;
}
.conv-item .state-badge { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); margin-right: 4px; }
.conv-item.conv-state-red { background: #3a0f16; border-color: #ef4444; }
.conv-item.conv-state-red small { color: #fecaca; }
.conv-item.conv-state-green { background: #0f2a1b; border-color: #22c55e; }
.conv-item.conv-state-green small { color: #bbf7d0; }
.conv-item.conv-state-white { background: #0f172a; border-color: #64748b; }
.conv-item.conv-state-white small { color: #cbd5e1; }

.chat-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.chat-actions { display: flex; gap: 8px; align-items: center; }

.tag-list { margin-bottom: 10px; }
.chip {
  display: inline-block;
  border: 1px solid #475569;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  margin: 2px;
  background: #1e293b;
}

.messages { height: 460px; overflow: auto; border: 1px solid #334155; border-radius: 10px; padding: 12px; background: #020617; }
.msg { margin-bottom: 10px; padding: 8px 10px; border-radius: 10px; max-width: 85%; width: fit-content; }
.msg.customer { background: #1f2937; margin-right: auto; color: #f8fafc; }
.msg.bot { background: #0f766e; margin-right: auto; color: #ecfeff; }
.msg.agent { background: #2563eb; margin-left: auto; color: #eff6ff; }
.msg.system { background: #374151; margin: 0 auto 10px; text-align: center; color: #f3f4f6; }
.msg.msg-media-only {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 4px 0;
  max-width: min(280px, 85%);
}
.msg.msg-media-only .meta {
  color: #94a3b8;
  margin-bottom: 4px;
}
.chat-media { display: block; line-height: 0; }
.chat-image {
  display: block;
  max-width: min(240px, 100%);
  height: auto;
  border-radius: 10px;
  cursor: zoom-in;
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.chat-video {
  display: block;
  max-width: min(280px, 100%);
  border-radius: 10px;
}
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.86);
  padding: 24px;
}
.image-lightbox.open { display: flex; }
.image-lightbox img {
  max-width: min(96vw, 1100px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
.image-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.meta { font-size: 12px; color: #93c5fd; margin-bottom: 4px; }
.msg.agent .meta { font-size: 13px; color: #dbeafe; }
.msg.agent .agent-author {
  display: inline-block;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.2px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.36);
  border: 1px solid rgba(191, 219, 254, 0.45);
  border-radius: 8px;
  padding: 2px 8px;
  margin-right: 4px;
}

.composer { display: flex; gap: 8px; margin-top: 12px; }
.composer input { flex: 1; }
.composer #agentAttachBtn { min-width: 64px; }
.typing-preview {
  min-height: 20px;
  margin-top: 8px;
  margin-bottom: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(30, 58, 138, 0.16);
  border: 1px dashed rgba(147, 197, 253, 0.55);
  color: #bfdbfe;
  font-size: 13px;
  line-height: 1.35;
}
.typing-preview:not(.active) {
  display: none;
}

table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid #334155; padding: 8px; text-align: left; }

/* ===== Agent themes + full chat layout ===== */
.agent-page {
  --agent-bg: #0f172a;
  --agent-text: #e2e8f0;
  --agent-panel: #111827;
  --agent-border: #334155;
  --agent-muted: #94a3b8;
  --agent-input-bg: #111827;
  --agent-input-text: #e2e8f0;
  --agent-chat-bg: #020617;
  --agent-chip-bg: #1e293b;
}

.agent-page.agent-theme-day {
  --agent-bg: #eef2f7;
  --agent-text: #0f172a;
  --agent-panel: #ffffff;
  --agent-border: #cbd5e1;
  --agent-muted: #475569;
  --agent-input-bg: #ffffff;
  --agent-input-text: #0f172a;
  --agent-chat-bg: #f8fafc;
  --agent-chip-bg: #e2e8f0;
}

.agent-page {
  background: var(--agent-bg);
  color: var(--agent-text);
}

.agent-page .hint { color: var(--agent-muted); }
.agent-page .layout { padding: 12px; }
.agent-page #appView {
  height: calc(100vh - 24px);
}
.agent-page #appView .sidebar,
.agent-page #appView .main {
  background: var(--agent-panel);
  border-color: var(--agent-border);
}
.agent-page #appView .sidebar,
.agent-page #appView .main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.agent-page #appView .conversation-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}
.agent-page #appView input,
.agent-page #appView select,
.agent-page #appView textarea {
  background: var(--agent-input-bg);
  color: var(--agent-input-text);
  border-color: var(--agent-border);
}
.agent-page #appView .chip { background: var(--agent-chip-bg); border-color: var(--agent-border); }
.agent-page #appView .metrics-box { background: color-mix(in srgb, var(--agent-panel) 92%, #000 8%); border-color: var(--agent-border); }
.agent-page #appView .messages {
  flex: 1 1 auto;
  min-height: 220px;
  height: auto;
  background: var(--agent-chat-bg);
  border-color: var(--agent-border);
}
.agent-page #appView .composer {
  margin-top: 8px;
}
.agent-page #appView .toolbar {
  margin-bottom: 8px;
}
.agent-page .theme-toggle-btn {
  min-width: 116px;
  font-weight: 700;
}

.agent-page.agent-theme-day .conv-item {
  color: #0f172a;
  border-color: #cbd5e1;
  background: #f8fafc;
}
.agent-page.agent-theme-day .conv-item strong,
.agent-page.agent-theme-day .conv-item small {
  color: #0f172a;
}
.agent-page.agent-theme-day .conv-item.conv-state-red { background: #fee2e2; border-color: #ef4444; }
.agent-page.agent-theme-day .conv-item.conv-state-green { background: #dcfce7; border-color: #22c55e; }
.agent-page.agent-theme-day .conv-item.conv-state-white { background: #f8fafc; border-color: #94a3b8; }
.agent-page.agent-theme-day .msg.customer { background: #e2e8f0; color: #0f172a; }
.agent-page.agent-theme-day .msg.bot { background: #ccfbf1; color: #0f172a; }
.agent-page.agent-theme-day .msg.agent { background: #2563eb; color: #eff6ff; }
.agent-page.agent-theme-day .msg.system { background: #e2e8f0; color: #334155; }
.agent-page.agent-theme-day .meta { color: #334155; }

/* ===== Customer page style (casino-like) ===== */
.customer-page {
  background: #dcdcdc;
  color: #111827;
  overflow-x: hidden;
  min-height: 100dvh;
}

.customer-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100svh;
  height: 100svh;
  border: 1px solid #c3c3c3;
  background: #ececec;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.customer-issue-launcher {
  padding: 16px 18px 24px;
  background: linear-gradient(90deg, #0c4b8e 0%, #0a3f7b 100%);
  border-bottom: 1px solid #cfd4dc;
  min-height: 100dvh;
}

.launcher-notice {
  background: #f6f6f6;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #d8d8d8;
  margin-bottom: 16px;
}

.launcher-notice-title {
  background: #ff1414;
  color: #fff;
  font-weight: 800;
  text-align: center;
  padding: 8px 10px;
  font-size: 17px;
}

.launcher-notice-body {
  color: #3a3a3a;
  font-size: 16px;
  line-height: 1.4;
  padding: 10px 16px;
  font-weight: 600;
  overflow: visible;
  max-height: none;
  white-space: normal;
  word-break: break-word;
}

.launcher-notice-body a {
  color: #0b44ff;
  font-weight: 800;
}

.launcher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px 20px;
}

.launcher-card {
  border: 1px solid #d7d7d7;
  border-radius: 12px;
  background: #fff;
  min-height: 122px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 10px;
  cursor: pointer;
}

.launcher-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}

.launcher-card img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.launcher-card span {
  color: #101010;
  font-size: 18px;
  font-weight: 500;
}

.customer-topbar {
  height: 52px;
  background: #1507f5;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-weight: 700;
}

.customer-greeting {
  background: #2b6cbf;
  color: #fff;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.customer-greeting .greet-main {
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.customer-greeting .greet-alias {
  color: #d6f399;
}

.customer-greeting .greet-user-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  position: relative;
  flex: 0 0 16px;
}

.customer-greeting .greet-user-icon::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2b6cbf;
  transform: translateX(-50%);
}

.customer-greeting .greet-user-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 10px;
  height: 5px;
  border-radius: 5px 5px 0 0;
  background: #2b6cbf;
  transform: translateX(-50%);
}

.customer-greeting .greet-close {
  color: #dbeafe;
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
}

.customer-body {
  display: grid;
  grid-template-columns: 1fr;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  width: 100%;
  min-width: 0;
}

.customer-sidebar {
  display: none;
}

.customer-brand {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.customer-brand-row,
.customer-main-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.HomeMobile-module__IB_Feq__logoBox {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: #000;
  background-image: url("/favicon.svg");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid #111;
  box-shadow: inset 0 0 0 2px #000, 0 1px 3px rgba(0, 0, 0, 0.35);
  flex: 0 0 36px;
}

.customer-phone {
  color: #1d4ed8;
  margin-bottom: 14px;
  font-size: 14px;
}

.customer-list-item {
  padding: 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #d4d4d4;
}

.customer-list-item.active {
  border-color: #2563eb;
}

.customer-main {
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.customer-main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  background: #f8f8f8;
}

.customer-main-title {
  font-weight: 700;
  font-size: 16px;
  min-width: 0;
}

.customer-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.customer-controls input {
  width: 180px;
  max-width: 100%;
  border: 1px solid #bbb;
  background: #fff;
  color: #111;
}

.customer-controls button {
  background: #2563eb;
  color: #fff;
}

.customer-status {
  padding: 8px 16px;
  font-size: 13px;
  color: #1d4ed8;
  background: #f5f5f5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.customer-messages {
  margin: 0 16px;
  flex: 1 1 auto;
  min-height: 0;
  width: auto;
  min-width: 0;
  background: #f4f7fb;
  border: 1px solid #d4d9e2;
  border-radius: 8px;
  color: #111827;
  overflow-x: hidden;
}

.customer-messages .msg {
  max-width: min(78%, 100%);
  color: #111827;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  overflow-wrap: anywhere;
  word-break: break-word;
  width: fit-content;
}

.customer-messages .msg.customer {
  background: #2563eb;
  color: #ffffff;
  margin-left: auto;
  margin-right: 0;
  margin-inline-start: auto;
  margin-inline-end: 0;
  border-color: #1d4ed8;
}

.customer-messages .msg.customer.msg-media-only {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 4px 0;
  max-width: min(240px, 78%);
}

.customer-messages .msg.bot.msg-media-only,
.customer-messages .msg.agent.msg-media-only {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 4px 0;
  max-width: min(240px, 78%);
}

.customer-messages .msg.customer.msg-media-only .meta {
  color: #64748b;
}

.customer-messages .chat-image {
  max-width: min(220px, 100%);
}

.customer-messages .msg.bot,
.customer-messages .msg.agent {
  background: #f1f2f4;
  color: #111827;
  margin-right: auto;
  margin-left: 0;
  margin-inline-end: auto;
  margin-inline-start: 0;
  border-color: #d1d5db;
}

.customer-messages .msg.system {
  background: #e2e8f0;
  color: #1f2937;
  border-color: #cbd5e1;
}

.customer-messages .meta {
  color: #334155;
  font-weight: 600;
}

.customer-messages .msg.agent .meta {
  color: #000000 !important;
  font-weight: 800 !important;
}

.customer-agent-name {
  color: #000000 !important;
  font-weight: 900 !important;
  text-shadow: 0 0 0 currentColor;
}

.customer-messages .msg.agent .customer-agent-name {
  color: #000000 !important;
}

.customer-messages .msg.customer .meta {
  color: #dbeafe;
}

.agent-avatar-inline {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 8px;
  border: 1px solid #94a3b8;
}

.promo-card {
  max-width: 760px;
  margin: 40px auto;
  padding: 18px;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  background: #fff7ed;
}

.promo-banner {
  text-align: center;
  font-size: 24px;
  color: #1d4ed8;
  font-weight: 800;
  margin-bottom: 12px;
}

.promo-card ul {
  margin: 0;
  padding-left: 22px;
  line-height: 1.9;
}

.issue-open-note {
  border: 1px solid #cfd8e3;
  border-radius: 4px;
  background: #dce7f3;
  color: #1f2937;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.issue-open-note a {
  color: #e11d2e;
  font-weight: 800;
  text-decoration: underline;
}

.issue-open-note .hl-red {
  color: #e11d2e;
  font-weight: 800;
}

.chat-date-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 14px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}

.chat-date-sep::before,
.chat-date-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #c9d2de;
}

.chat-date-sep span {
  flex: 0 0 auto;
}

.customer-input-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "attach input emoji send";
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #d5d7dc;
  background: #f1f2f4;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  position: relative;
  bottom: auto;
  z-index: 5;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.customer-input-wrap #attachBtn { grid-area: attach; }
.customer-input-wrap #messageInput { grid-area: input; }
.customer-input-wrap #emojiBtn { grid-area: emoji; }
.customer-input-wrap #sendBtn { grid-area: send; }

.customer-input-wrap input {
  width: 100%;
  min-width: 0;
  background: #fff;
  color: #111827;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
}

.customer-input-wrap button {
  min-width: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.customer-input-wrap #attachBtn {
  min-width: 96px;
  width: auto;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon img {
  max-width: 22px;
  max-height: 22px;
  object-fit: contain;
  opacity: 0.88;
}

.send-icon img {
  max-width: 30px;
  max-height: 30px;
  opacity: 1;
}

.typing-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.customer-typing {
  margin: 6px 16px 0;
  color: #334155;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.typing-dots { display: inline-flex; gap: 4px; align-items: center; }
.typing-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
  display: inline-block;
  animation: typing-bounce 1.1s infinite ease-in-out;
}
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .5; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.customer-resume {
  margin: 8px 16px 0;
  padding: 10px 12px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #7c2d12;
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.customer-login-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.customer-login-card {
  width: min(92vw, 360px);
  background: #ffffff;
  color: #111827;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #d1d5db;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.customer-login-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.customer-login-card input {
  background: #ffffff;
  color: #111827;
  border: 1px solid #9ca3af;
}

.customer-login-card select {
  background: #ffffff;
  color: #111827;
  border: 1px solid #9ca3af;
  padding: 10px 12px;
  border-radius: 8px;
}

.customer-login-label {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.customer-login-note {
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  color: #7c2d12;
}

.customer-login-card button {
  background: #2563eb;
  color: #fff;
}

@media (max-width: 980px) {
  .customer-issue-launcher {
    padding: 12px 10px 16px;
  }
  .launcher-notice-body {
    font-size: 13px;
    line-height: 1.38;
    padding: 10px 12px;
  }
  .launcher-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .launcher-card {
    min-height: 108px;
    padding: 12px 8px;
  }
  .launcher-card img {
    width: 48px;
    height: 48px;
  }
  .launcher-card span {
    font-size: 14px;
  }
  .customer-body {
    grid-template-columns: 1fr;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }
  .customer-sidebar {
    border-right: 0;
    border-bottom: 1px solid #d0d0d0;
  }
  .customer-messages {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .customer-shell {
    border: 0;
    width: 100vw;
    max-width: 100vw;
  }
  .customer-body,
  .customer-main,
  .customer-main-header,
  .customer-status,
  .customer-input-wrap,
  .customer-messages {
    max-width: 100%;
    min-width: 0;
  }
  .customer-topbar {
    height: 46px;
    padding: 0 10px;
    font-size: 14px;
  }
  .customer-greeting {
    font-size: 14px;
    padding: 8px 10px;
  }
  .launcher-card {
    min-height: 102px;
  }
  .customer-sidebar {
    display: none;
  }
  .customer-main-header {
    padding: 10px 12px;
  }
  .customer-body {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }
  .customer-main-title {
    font-size: 15px;
  }
  .customer-controls {
    font-size: 12px;
  }
  .customer-status {
    padding: 6px 12px;
    font-size: 12px;
  }
  .customer-messages {
    margin: 0 10px;
    flex: 1 1 auto;
    min-height: 0;
    width: auto;
    overflow-x: hidden;
  }
  .customer-messages .msg {
    max-width: 88% !important;
    width: auto;
    font-size: 14px;
  }
  .customer-messages .msg.customer {
    margin-left: auto !important;
    margin-right: 0 !important;
  }
  .customer-messages .msg.bot,
  .customer-messages .msg.agent {
    margin-right: auto !important;
    margin-left: 0 !important;
  }
  .customer-input-wrap {
    padding: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "attach input emoji send";
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
  .customer-page input,
  .customer-page textarea,
  .customer-page select {
    font-size: 16px !important;
  }
  .customer-input-wrap button {
    min-width: 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    white-space: nowrap;
  }
  .customer-input-wrap #attachBtn {
    min-width: 82px;
    width: auto;
    padding: 0 8px;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .launcher-grid {
    gap: 8px;
  }
  .launcher-card {
    min-height: 96px;
  }
  .launcher-card span {
    font-size: 13px;
  }
  .customer-input-wrap {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "attach input emoji send";
  }
  .customer-messages {
    margin: 0 8px;
  }
}
