:root {
  --cn2g-ink: #071421;
  --cn2g-ink-2: #10243a;
  --cn2g-blue: #185d9d;
  --cn2g-teal: #0f766e;
  --cn2g-gold: #d8ad4f;
  --cn2g-gold-2: #f4d68b;
  --cn2g-paper: #fbfcf8;
  --cn2g-line: #dce5ec;
  --cn2g-muted: #64748b;
  --cn2g-danger: #c2413a;
  --cn2g-shadow: 0 28px 80px rgba(6, 18, 33, .24);
  --cn2g-radius: 8px;
}

.cn2g-live-support-enabled .customer-support-widget {
  display: none !important;
}

.cn2g-live-widget,
.cn2g-live-widget *,
.cn2g-live-admin,
.cn2g-live-admin * {
  box-sizing: border-box;
}

.cn2g-live-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  color: var(--cn2g-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cn2g-live-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  min-width: 154px;
  height: 56px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(244, 214, 139, .56);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 32%),
    linear-gradient(135deg, #071421 0%, #102947 52%, #0f766e 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: 0 18px 46px rgba(7, 20, 33, .32), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.cn2g-live-button::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 12px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cn2g-gold-2), var(--cn2g-teal));
  box-shadow: 0 0 18px rgba(244, 214, 139, .54);
}

.cn2g-live-button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 10%, rgba(255, 255, 255, .22) 42%, transparent 62%);
  transform: translateX(-120%);
  transition: transform .55s ease;
}

.cn2g-live-button:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 214, 139, .86);
  box-shadow: 0 24px 58px rgba(7, 20, 33, .38), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.cn2g-live-button:hover::after {
  transform: translateX(120%);
}

.cn2g-live-button em {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #f05252;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  line-height: 20px;
  box-shadow: 0 8px 18px rgba(240, 82, 82, .32);
}

.cn2g-live-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(462px, calc(100vw - 28px));
  max-height: min(750px, calc(100vh - 102px));
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(244, 214, 139, .24);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .98));
  box-shadow: var(--cn2g-shadow), inset 0 1px 0 rgba(255, 255, 255, .95);
  backdrop-filter: blur(18px);
}

.cn2g-live-panel header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(244, 214, 139, .15), transparent 30%),
    linear-gradient(135deg, #071421 0%, #10243a 62%, #0f766e 100%);
  color: #fff;
}

.cn2g-live-panel header::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(244, 214, 139, .74), rgba(15, 118, 110, .54), transparent);
}

.cn2g-live-panel header span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--cn2g-gold-2);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cn2g-live-panel header span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #35d19a;
  box-shadow: 0 0 0 5px rgba(53, 209, 154, .13);
}

.cn2g-live-panel header strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0;
}

.cn2g-live-icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--cn2g-radius);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  transition: background .16s ease, border-color .16s ease;
}

.cn2g-live-icon-btn:hover {
  border-color: rgba(244, 214, 139, .56);
  background: rgba(244, 214, 139, .14);
}

.cn2g-live-start,
.cn2g-live-chat {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, .96), rgba(255, 255, 255, .98)),
    repeating-linear-gradient(90deg, rgba(16, 36, 58, .025) 0, rgba(16, 36, 58, .025) 1px, transparent 1px, transparent 18px);
}

.cn2g-live-start p {
  margin: 0 0 16px;
  border: 1px solid rgba(216, 173, 79, .24);
  border-radius: var(--cn2g-radius);
  background: linear-gradient(135deg, rgba(255, 249, 229, .88), rgba(239, 253, 250, .82));
  color: #475569;
  padding: 12px 13px;
  font-size: 13px;
  line-height: 1.7;
}

.cn2g-live-field {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
}

.cn2g-live-field span {
  color: #25364d;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .01em;
}

.cn2g-live-input,
.cn2g-live-select,
.cn2g-live-textarea {
  width: 100%;
  border: 1px solid #d6e0ea;
  border-radius: var(--cn2g-radius);
  background: #fff;
  color: var(--cn2g-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.cn2g-live-input,
.cn2g-live-select {
  height: 44px;
  padding: 0 12px;
}

.cn2g-live-select {
  appearance: none;
  padding-right: 34px;
  background:
    linear-gradient(45deg, transparent 50%, #667085 50%) calc(100% - 17px) 19px / 6px 6px no-repeat,
    linear-gradient(135deg, #fff, #f8fafc);
}

.cn2g-live-textarea {
  min-height: 108px;
  resize: vertical;
  padding: 11px 12px;
  line-height: 1.6;
}

.cn2g-live-input:focus,
.cn2g-live-select:focus,
.cn2g-live-textarea:focus {
  border-color: rgba(24, 93, 157, .62);
  box-shadow: 0 0 0 4px rgba(24, 93, 157, .10);
}

.cn2g-live-hint {
  display: block;
  margin-top: 4px;
  color: var(--cn2g-muted);
  font-size: 12px;
  line-height: 1.5;
}

.cn2g-live-primary {
  display: inline-flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(244, 214, 139, .5);
  border-radius: var(--cn2g-radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .30), rgba(255, 255, 255, 0) 36%),
    linear-gradient(135deg, #bc842d 0%, #f4d68b 52%, #d0a04a 100%);
  color: #081927;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(188, 132, 45, .22);
  transition: transform .16s ease, box-shadow .16s ease;
}

.cn2g-live-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(188, 132, 45, .28);
}

.cn2g-live-primary:disabled,
.cn2g-live-secondary:disabled {
  cursor: wait;
  opacity: .62;
}

.cn2g-live-error {
  margin: 12px 0 0;
  border: 1px solid rgba(194, 65, 58, .18);
  border-radius: var(--cn2g-radius);
  background: #fff4f2;
  color: var(--cn2g-danger);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
}

.cn2g-live-statusbar {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: center;
  margin-bottom: 13px;
}

.cn2g-live-badge {
  display: inline-flex;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 999px;
  background: #ecfdf5;
  color: #067647;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.cn2g-live-statusbar .cn2g-live-field {
  margin: 0;
}

.cn2g-live-messages {
  display: grid;
  gap: 12px;
  max-height: 380px;
  overflow: auto;
  padding: 5px 2px 14px;
  scroll-behavior: smooth;
}

.cn2g-live-message {
  display: grid;
  gap: 5px;
  max-width: 88%;
}

.cn2g-live-message.is-customer {
  justify-self: end;
}

.cn2g-live-message.is-agent {
  justify-self: start;
}

.cn2g-live-message small {
  color: #7b8796;
  font-size: 11px;
  font-weight: 850;
}

.cn2g-live-bubble {
  border: 1px solid rgba(15, 35, 70, .08);
  border-radius: var(--cn2g-radius);
  padding: 11px 12px;
  color: #142238;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.65;
  white-space: pre-wrap;
  box-shadow: 0 8px 18px rgba(15, 35, 70, .06);
}

.cn2g-live-message.is-customer .cn2g-live-bubble {
  border-color: rgba(24, 93, 157, .18);
  background: linear-gradient(135deg, #e8f3ff, #dff7f3);
}

.cn2g-live-message.is-agent .cn2g-live-bubble {
  border-color: rgba(216, 173, 79, .20);
  background: linear-gradient(135deg, #fffdf5, #f4f7fb);
}

.cn2g-live-attachment {
  display: inline-flex;
  width: fit-content;
  border: 1px solid #d7e0eb;
  border-radius: var(--cn2g-radius);
  background: #fff;
  color: var(--cn2g-blue);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.cn2g-live-reply {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 10px;
  align-items: end;
  border-top: 1px solid #e2e8f0;
  padding-top: 13px;
}

.cn2g-live-reply textarea {
  min-height: 50px;
  max-height: 128px;
}

.cn2g-live-reply .cn2g-live-primary {
  height: 50px;
}

.cn2g-live-admin {
  margin: 28px 0;
  color: var(--cn2g-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cn2g-live-admin-head,
.cn2g-live-admin-card,
.cn2g-live-admin-ai {
  border: 1px solid rgba(15, 35, 70, .10);
  border-radius: var(--cn2g-radius);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 52px rgba(15, 35, 70, .08);
}

.cn2g-live-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border-color: rgba(216, 173, 79, .20);
  background:
    linear-gradient(90deg, rgba(255, 249, 229, .78), rgba(240, 253, 250, .72)),
    #fff;
}

.cn2g-live-admin-head span,
.cn2g-live-admin-ai span {
  color: #9a6b1e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cn2g-live-admin-head h2,
.cn2g-live-admin-ai h3 {
  margin: 5px 0 0;
  color: #0c1b2a;
  font-size: 22px;
  line-height: 1.2;
}

.cn2g-live-admin-head p,
.cn2g-live-admin-ai p {
  margin: 7px 0 0;
  color: var(--cn2g-muted);
  font-size: 14px;
  line-height: 1.6;
}

.cn2g-live-admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cn2g-live-secondary {
  min-height: 38px;
  border: 1px solid #d5dfeb;
  border-radius: var(--cn2g-radius);
  background: linear-gradient(180deg, #fff, #f8fafc);
  color: #1f3248;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 950;
  transition: border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.cn2g-live-secondary:hover {
  border-color: rgba(24, 93, 157, .34);
  color: var(--cn2g-blue);
  box-shadow: 0 10px 22px rgba(15, 35, 70, .08);
}

.cn2g-live-admin-grid {
  display: grid;
  grid-template-columns: minmax(230px, 310px) minmax(0, 1fr) minmax(230px, 300px);
  gap: 16px;
  align-items: start;
}

.cn2g-live-list,
.cn2g-live-agent-chat,
.cn2g-live-admin-ai {
  min-height: 540px;
  max-height: 780px;
  overflow: auto;
}

.cn2g-live-list {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.cn2g-live-list button {
  position: relative;
  width: 100%;
  border: 1px solid #e1e8f0;
  border-radius: var(--cn2g-radius);
  background: #fff;
  color: var(--cn2g-ink);
  padding: 12px 12px 12px 14px;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.cn2g-live-list button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: transparent;
}

.cn2g-live-list button:hover {
  border-color: rgba(24, 93, 157, .28);
  box-shadow: 0 10px 24px rgba(15, 35, 70, .07);
}

.cn2g-live-list button.is-active {
  border-color: rgba(216, 173, 79, .54);
  background: linear-gradient(135deg, #fff9e8, #f5fbff);
}

.cn2g-live-list button.is-active::before {
  background: linear-gradient(180deg, var(--cn2g-gold), var(--cn2g-teal));
}

.cn2g-live-list strong,
.cn2g-live-agent-title strong {
  display: block;
  color: #12243a;
  font-size: 15px;
  line-height: 1.35;
}

.cn2g-live-list span,
.cn2g-live-list p {
  display: block;
  margin: 5px 0 0;
  color: var(--cn2g-muted);
  font-size: 12px;
  line-height: 1.45;
}

.cn2g-live-list em {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  border-radius: 999px;
  background: #f05252;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.cn2g-live-admin-card {
  padding: 14px;
}

.cn2g-live-agent-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 4px 2px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.cn2g-live-agent-title span {
  display: block;
  margin-top: 6px;
  color: var(--cn2g-muted);
  font-size: 12px;
  line-height: 1.45;
}

.cn2g-live-agent-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.cn2g-live-agent-controls .cn2g-live-select {
  width: 220px;
  height: 38px;
}

.cn2g-live-status-actions {
  display: inline-flex;
  gap: 5px;
}

.cn2g-live-status-actions button {
  min-height: 36px;
  border: 1px solid #d5dfeb;
  border-radius: var(--cn2g-radius);
  background: #fff;
  color: #34445d;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 950;
}

.cn2g-live-status-actions button.is-active {
  border-color: rgba(7, 20, 33, .96);
  background: linear-gradient(135deg, #071421, #10243a);
  color: #fff;
}

.cn2g-live-admin-messages {
  display: grid;
  gap: 12px;
  max-height: 490px;
  overflow: auto;
  padding: 14px 2px;
}

.cn2g-live-admin-message {
  border: 1px solid #e3eaf3;
  border-radius: var(--cn2g-radius);
  background: linear-gradient(180deg, #fff, #fbfdff);
  padding: 12px;
  box-shadow: 0 10px 22px rgba(15, 35, 70, .04);
}

.cn2g-live-admin-message.is-agent {
  border-color: rgba(24, 93, 157, .20);
  background: linear-gradient(180deg, #f7fbff, #fff);
}

.cn2g-live-admin-message header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--cn2g-muted);
  font-size: 12px;
  font-weight: 950;
}

.cn2g-live-admin-block {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}

.cn2g-live-admin-block strong {
  color: #15253a;
  font-size: 13px;
  font-weight: 950;
}

.cn2g-live-admin-block p {
  margin: 0;
  border: 1px solid #edf2f7;
  border-radius: var(--cn2g-radius);
  background: #fff;
  color: #1f2f49;
  padding: 10px 11px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  white-space: pre-wrap;
}

.cn2g-live-admin-block.is-translation p {
  border-color: rgba(216, 173, 79, .28);
  background: linear-gradient(135deg, #fff9e8, #f8fbff);
}

.cn2g-live-admin-reply {
  display: grid;
  gap: 10px;
  border-top: 1px solid #e2e8f0;
  padding-top: 13px;
}

.cn2g-live-admin-reply textarea {
  min-height: 100px;
}

.cn2g-live-admin-ai {
  padding: 16px;
  background:
    linear-gradient(180deg, #fff, #f8fafc),
    repeating-linear-gradient(0deg, rgba(16, 36, 58, .025) 0, rgba(16, 36, 58, .025) 1px, transparent 1px, transparent 18px);
}

.cn2g-live-ai-box {
  margin-top: 14px;
  border: 1px solid rgba(15, 118, 110, .16);
  border-radius: var(--cn2g-radius);
  background: linear-gradient(135deg, #f0fdfa, #fff);
  padding: 12px;
}

.cn2g-live-ai-box strong {
  display: block;
  margin-bottom: 6px;
  color: #10243a;
}

.cn2g-live-ai-box p {
  margin: 0;
  color: #34445d;
  white-space: pre-wrap;
}

.cn2g-live-empty {
  margin: 0;
  color: var(--cn2g-muted);
  padding: 20px;
  text-align: center;
}

.cn2g-live-messages::-webkit-scrollbar,
.cn2g-live-admin-messages::-webkit-scrollbar,
.cn2g-live-list::-webkit-scrollbar,
.cn2g-live-agent-chat::-webkit-scrollbar,
.cn2g-live-admin-ai::-webkit-scrollbar,
.cn2g-live-start::-webkit-scrollbar,
.cn2g-live-chat::-webkit-scrollbar {
  width: 9px;
}

.cn2g-live-messages::-webkit-scrollbar-thumb,
.cn2g-live-admin-messages::-webkit-scrollbar-thumb,
.cn2g-live-list::-webkit-scrollbar-thumb,
.cn2g-live-agent-chat::-webkit-scrollbar-thumb,
.cn2g-live-admin-ai::-webkit-scrollbar-thumb,
.cn2g-live-start::-webkit-scrollbar-thumb,
.cn2g-live-chat::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(100, 116, 139, .34);
  background-clip: padding-box;
}

@media (max-width: 980px) {
  .cn2g-live-admin-grid {
    grid-template-columns: 1fr;
  }

  .cn2g-live-list,
  .cn2g-live-agent-chat,
  .cn2g-live-admin-ai {
    min-height: auto;
    max-height: none;
  }

  .cn2g-live-agent-head {
    grid-template-columns: 1fr;
  }

  .cn2g-live-agent-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .cn2g-live-widget {
    right: 12px;
    bottom: 82px;
  }

  .cn2g-live-button {
    min-width: 56px;
    width: 56px;
    padding: 0;
  }

  .cn2g-live-button span {
    display: none;
  }

  .cn2g-live-button::before {
    left: 9px;
  }

  .cn2g-live-panel {
    right: -2px;
    bottom: 66px;
    max-height: calc(100vh - 150px);
  }

  .cn2g-live-statusbar {
    grid-template-columns: 1fr;
  }

  .cn2g-live-reply {
    grid-template-columns: 1fr;
  }

  .cn2g-live-agent-controls .cn2g-live-select {
    width: 100%;
  }
}
