.g26-chat-widget {
  --g26-bg: #171325;
  --g26-bg-rgb: 23, 19, 37;
  --g26-brand: #ec2826;
  --g26-brand-rgb: 236, 40, 38;
  --g26-brand-2: #eb2ea5;
  --g26-brand-2-rgb: 235, 46, 165;
  --g26-accent: #f68f22;
  --g26-accent-rgb: 246, 143, 34;
  --g26-highlight: #f4ce29;
  --g26-highlight-rgb: 244, 206, 41;
  --g26-border: rgba(255, 255, 255, 0.14);
  --g26-chat-height: min(650px, 78vh);
  --g26-chat-expanded-height: 100vh;
  /* Expanded desktop: readable column width (messages, input, sources align). */
  --g26-expanded-readable: min(900px, 100%);
  color: #fff;
  text-align: left;
  font-family: "Sora", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Theme sync: follows page-level toggle from html[data-g26-theme]. */
html[data-g26-theme="light"] .g26-chat-widget,
body[data-g26-theme="light"] .g26-chat-widget,
.g26-chat-widget[data-g26-theme="light"] {
  --g26-bg: #f7f3ff;
  --g26-bg-rgb: 247, 243, 255;
  --g26-border: rgba(23, 19, 37, 0.14);
  color: #171325;
}

html[data-g26-theme="light"] .g26-chat-widget .g26-chat,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat,
.g26-chat-widget[data-g26-theme="light"] .g26-chat {
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 48px rgba(23, 19, 37, 0.18), 0 0 32px rgba(var(--g26-brand-2-rgb), 0.12);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-chat-head,
html[data-g26-theme="light"] .g26-chat-widget .g26-chat-foot,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-head,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-foot,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-head,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-foot {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(23, 19, 37, 0.12);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-chat-badge,
html[data-g26-theme="light"] .g26-chat-widget .g26-chat-new,
html[data-g26-theme="light"] .g26-chat-widget .g26-chat-expand,
html[data-g26-theme="light"] .g26-chat-widget .g26-chat-close,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-badge,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-new,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-expand,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-close,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-badge,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-new,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-expand,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-close {
  color: #171325;
  background: rgba(23, 19, 37, 0.06);
  border-color: rgba(23, 19, 37, 0.14);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-msg,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg,
.g26-chat-widget[data-g26-theme="light"] .g26-msg {
  color: #171325;
  background: rgba(23, 19, 37, 0.06);
  border-color: rgba(23, 19, 37, 0.14);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-msg-user,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-user,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-user {
  background: rgba(var(--g26-brand-rgb), 0.16);
  border-color: rgba(var(--g26-brand-rgb), 0.45);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-msg-content a,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-content a,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-content a {
  color: #b91c1c;
  text-decoration-color: rgba(var(--g26-brand-rgb), 0.75);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-msg-content code,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-content code,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-content code {
  background: rgba(23, 19, 37, 0.08);
  border-color: rgba(23, 19, 37, 0.16);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-msg-content pre,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-content pre,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-content pre {
  background: rgba(23, 19, 37, 0.07);
  border-color: rgba(23, 19, 37, 0.16);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-chat-input,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-input,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-input {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(23, 19, 37, 0.16);
  color: #171325;
}

html[data-g26-theme="light"] .g26-chat-widget .g26-chat-input::placeholder,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-input::placeholder,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-input::placeholder {
  color: rgba(23, 19, 37, 0.45);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-chat-input:focus,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-input:focus,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-input:focus {
  box-shadow: 0 0 0 2px rgba(var(--g26-brand-rgb), 0.28);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-chat-source,
html[data-g26-theme="light"] .g26-chat-widget .g26-service-link,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-source,
body[data-g26-theme="light"] .g26-chat-widget .g26-service-link,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-source,
.g26-chat-widget[data-g26-theme="light"] .g26-service-link {
  color: #171325;
  background: rgba(23, 19, 37, 0.05);
  border-color: rgba(23, 19, 37, 0.14);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-msg-content,
html[data-g26-theme="light"] .g26-chat-widget .g26-msg-content p,
html[data-g26-theme="light"] .g26-chat-widget .g26-msg-content ul,
html[data-g26-theme="light"] .g26-chat-widget .g26-msg-content ol,
html[data-g26-theme="light"] .g26-chat-widget .g26-msg-content li,
html[data-g26-theme="light"] .g26-chat-widget .g26-msg-content strong,
html[data-g26-theme="light"] .g26-chat-widget .g26-msg-content em,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-content,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-content p,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-content ul,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-content ol,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-content li,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-content strong,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-content em,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-content,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-content p,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-content ul,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-content ol,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-content li,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-content strong,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-content em {
  color: #171325 !important;
  -webkit-text-fill-color: #171325 !important;
}

html[data-g26-theme="light"] .g26-chat-widget .g26-chat-source-icon,
html[data-g26-theme="light"] .g26-chat-widget .g26-service-link-icon,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-source-icon,
body[data-g26-theme="light"] .g26-chat-widget .g26-service-link-icon,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-source-icon,
.g26-chat-widget[data-g26-theme="light"] .g26-service-link-icon {
  background: rgba(23, 19, 37, 0.08);
  color: #171325;
}

html[data-g26-theme="light"] .g26-chat-widget .g26-chat-sources-label,
html[data-g26-theme="light"] .g26-chat-widget .g26-service-links-label,
html[data-g26-theme="light"] .g26-chat-widget .g26-chat-privacy-note,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-sources-label,
body[data-g26-theme="light"] .g26-chat-widget .g26-service-links-label,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-privacy-note,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-sources-label,
.g26-chat-widget[data-g26-theme="light"] .g26-service-links-label,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-privacy-note {
  color: rgba(23, 19, 37, 0.62);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-chat-chip,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-chip,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-chip {
  color: #171325;
  background: rgba(23, 19, 37, 0.08);
  border-color: rgba(23, 19, 37, 0.18);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-chat-chip:hover,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-chip:hover,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-chip:hover {
  color: #fff;
  background: var(--g26-brand);
  border-color: var(--g26-brand);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-chat-body,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-body,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-body {
  scrollbar-color: rgba(23, 19, 37, 0.28) transparent;
}

html[data-g26-theme="light"] .g26-chat-widget .g26-chat-body::-webkit-scrollbar-thumb,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-body::-webkit-scrollbar-thumb,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-body::-webkit-scrollbar-thumb {
  background: rgba(23, 19, 37, 0.24);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-chat-body::-webkit-scrollbar-thumb:hover,
body[data-g26-theme="light"] .g26-chat-widget .g26-chat-body::-webkit-scrollbar-thumb:hover,
.g26-chat-widget[data-g26-theme="light"] .g26-chat-body::-webkit-scrollbar-thumb:hover {
  background: rgba(23, 19, 37, 0.38);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-msg-streaming .g26-msg-content::after,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-streaming .g26-msg-content::after,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-streaming .g26-msg-content::after {
  border-right-color: rgba(23, 19, 37, 0.7);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-loading-label,
body[data-g26-theme="light"] .g26-chat-widget .g26-loading-label,
.g26-chat-widget[data-g26-theme="light"] .g26-loading-label {
  color: rgba(23, 19, 37, 0.9);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-loading-dots span,
body[data-g26-theme="light"] .g26-chat-widget .g26-loading-dots span,
.g26-chat-widget[data-g26-theme="light"] .g26-loading-dots span {
  background: rgba(23, 19, 37, 0.56);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-msg-content th,
html[data-g26-theme="light"] .g26-chat-widget .g26-msg-content td,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-content th,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-content td,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-content th,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-content td {
  border-color: rgba(23, 19, 37, 0.2);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-msg-content th,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-content th,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-content th {
  background: rgba(23, 19, 37, 0.08);
}

html[data-g26-theme="light"] .g26-chat-widget .g26-msg-content blockquote,
body[data-g26-theme="light"] .g26-chat-widget .g26-msg-content blockquote,
.g26-chat-widget[data-g26-theme="light"] .g26-msg-content blockquote {
  color: rgba(23, 19, 37, 0.9);
}

html[data-g26-theme="light"] .g26-chat-widget.g26-chat-expanded,
body[data-g26-theme="light"] .g26-chat-widget.g26-chat-expanded,
.g26-chat-widget[data-g26-theme="light"].g26-chat-expanded {
  background: rgba(247, 243, 255, 0.95);
}

/* Strong widget scoping to prevent host-page .g26-* collisions. */
[data-g26-chat-widget] {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* Keep widget clear of fixed nav when scrolling into view after closing fullscreen. */
  scroll-margin-top: min(120px, 20vh);
  scroll-margin-bottom: 24px;
}

[data-g26-chat-widget] *,
[data-g26-chat-widget] *::before,
[data-g26-chat-widget] *::after {
  box-sizing: border-box;
}

/* Prevent inherited theme alignment/typography rules from distorting chat output. */
[data-g26-chat-widget] .g26-chat-body,
[data-g26-chat-widget] .g26-chat-body * {
  direction: ltr;
  unicode-bidi: plaintext;
}

.g26-chat-widget .g26-chat-wrap {
  position: relative;
  margin: 32px auto 0;
  max-width: 980px;
  padding: 4px;
  border-radius: 48px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.g26-chat-widget .g26-chat-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 48px;
  background: linear-gradient(90deg, var(--g26-brand), var(--g26-brand-2), var(--g26-accent));
  opacity: 0.12;
  filter: blur(12px);
  z-index: 0;
  pointer-events: none;
}

.g26-chat-widget .g26-chat {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: var(--g26-chat-height);
  max-height: var(--g26-chat-height);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px);
  border: 1px solid transparent;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 40px rgba(var(--g26-brand-2-rgb), 0.12);
  transition: border-radius 0.22s ease, box-shadow 0.22s ease;
}

@supports (height: 1dvh) {
  .g26-chat-widget {
    --g26-chat-height: min(650px, 78dvh);
    --g26-chat-expanded-height: 100dvh;
  }
}

.g26-chat-widget .g26-chat::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(var(--g26-brand-rgb), 0.45),
    rgba(var(--g26-brand-2-rgb), 0.4),
    rgba(var(--g26-accent-rgb), 0.34),
    rgba(var(--g26-highlight-rgb), 0.25)
  );
  background-size: 200% 200%;
  animation: g26GradientFlow 10s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

.g26-chat-widget .g26-chat::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(var(--g26-brand-2-rgb), 0.1), transparent 40%, rgba(var(--g26-brand-rgb), 0.1));
  pointer-events: none;
}

.g26-chat-widget .g26-chat-head,
.g26-chat-widget .g26-chat-foot {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.02);
}

.g26-chat-widget .g26-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.g26-chat-widget .g26-chat-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
}

.g26-chat-widget .g26-chat-head-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.g26-chat-widget .g26-chat-brand {
  display: flex;
  align-items: center;
}

.g26-chat-widget .g26-chat-brand img {
  display: block;
  height: 22px;
  width: auto;
  max-width: 180px;
}

.g26-chat-widget .g26-chat-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: transparent;
  display: grid;
  place-items: center;
  overflow: visible;
}

.g26-chat-widget .g26-chat-avatar .dot {
  position: absolute;
  inset: auto -2px 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #22c55e;
  border: 2px solid var(--g26-bg);
}

.g26-chat-widget .g26-chat-avatar img {
  width: 22px;
  height: 22px;
  display: block;
}

.g26-chat-widget .g26-chat-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
}

.g26-chat-widget .g26-chat-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(34, 197, 94, 0.85);
  font-weight: 600;
}

.g26-chat-widget .g26-chat-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--g26-border);
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.45);
}

.g26-chat-widget .g26-chat-expand,
.g26-chat-widget .g26-chat-close {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  place-items: center;
  touch-action: manipulation;
}

.g26-chat-widget .g26-chat-expand:hover,
.g26-chat-widget .g26-chat-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.g26-chat-widget.g26-chat-can-reexpand:not(.g26-chat-expanded) .g26-chat-expand {
  display: inline-grid;
}

/* New chat: only when there is an active thread (hidden for welcome-only state). */
.g26-chat-widget .g26-chat-new {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
  flex-shrink: 0;
}

.g26-chat-widget .g26-chat-new:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.24);
}

.g26-chat-widget .g26-chat-new svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.g26-chat-widget.g26-chat-has-thread .g26-chat-new {
  display: inline-flex;
}

.g26-chat-widget .g26-chat-new:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 420px) {
  .g26-chat-widget .g26-chat-new {
    position: relative;
    padding: 0 10px;
    min-width: 40px;
    min-height: 40px;
  }

  .g26-chat-widget .g26-chat-new-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

.g26-chat-widget .g26-chat-body {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  /* Allow scroll chaining so mobile page scroll is not trapped inside collapsed chat. */
  overscroll-behavior-y: auto;
  overscroll-behavior-x: contain;
  touch-action: pan-y;
  padding: 28px 24px;
  text-align: left !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

/* In fullscreen mode, keep scroll isolated to chat content. */
.g26-chat-widget.g26-chat-expanded .g26-chat-body {
  overscroll-behavior: contain;
}

.g26-chat-widget .g26-chat-body::-webkit-scrollbar {
  width: 8px;
}

.g26-chat-widget .g26-chat-body::-webkit-scrollbar-track {
  background: transparent;
}

.g26-chat-widget .g26-chat-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.g26-chat-widget .g26-chat-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.g26-chat-widget .g26-chat-body::after {
  display: none;
}

.g26-chat-widget .g26-chat-body.g26-chat-scroll-hint::after {
  display: none;
}

/* Backward compatibility: neutralize old class name if cached JS still uses it. */
.g26-chat-widget .g26-chat-body.g26-scroll-hint {
  display: block !important;
  text-align: left !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.g26-chat-widget .g26-scroll-anchor {
  height: 1px;
  width: 100%;
}

.g26-chat-widget .g26-msg {
  max-width: 85%;
  min-width: 0;
  padding: 18px 22px;
  border-radius: 18px 18px 18px 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  text-align: left !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.g26-chat-widget .g26-msg-content > *:first-child {
  margin-top: 0;
}

.g26-chat-widget .g26-msg-content > *:last-child {
  margin-bottom: 0;
}

.g26-chat-widget .g26-msg-content {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.g26-chat-widget .g26-msg-content p,
.g26-chat-widget .g26-msg-content ul,
.g26-chat-widget .g26-msg-content ol,
.g26-chat-widget .g26-msg-content blockquote,
.g26-chat-widget .g26-msg-content pre,
.g26-chat-widget .g26-msg-content li {
  margin: 0.6em 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Protect chat copy from aggressive theme typography rules in embeds. */
.g26-chat-widget .g26-msg-content,
.g26-chat-widget .g26-msg-content p,
.g26-chat-widget .g26-msg-content ul,
.g26-chat-widget .g26-msg-content ol,
.g26-chat-widget .g26-msg-content li,
.g26-chat-widget .g26-msg-content strong,
.g26-chat-widget .g26-msg-content em,
.g26-chat-widget .g26-msg-content a,
.g26-chat-widget .g26-chat-source,
.g26-chat-widget .g26-chat-source-title,
.g26-chat-widget .g26-service-link,
.g26-chat-widget .g26-service-link-text {
  text-align: left !important;
  line-height: 1.55 !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
  text-indent: 0 !important;
  float: none !important;
  clear: none !important;
  column-count: 1 !important;
  column-gap: 0 !important;
  position: static !important;
  min-height: 0 !important;
  max-height: none !important;
  transform: none !important;
  color: rgba(255, 255, 255, 0.92) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.92) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.g26-chat-widget .g26-msg-content ul,
.g26-chat-widget .g26-msg-content ol {
  margin: 0.55em 0;
  padding-left: 1.25rem;
  list-style-position: outside !important;
}

.g26-chat-widget .g26-msg-content ul {
  list-style: disc !important;
}

.g26-chat-widget .g26-msg-content ol {
  list-style: decimal !important;
}

.g26-chat-widget .g26-msg-content li {
  display: list-item !important;
  list-style-position: outside !important;
  margin: 0.32em 0;
  padding-left: 0;
  overflow: visible !important;
}

.g26-chat-widget .g26-msg-content h1,
.g26-chat-widget .g26-msg-content h2,
.g26-chat-widget .g26-msg-content h3,
.g26-chat-widget .g26-msg-content h4 {
  margin: 0.65em 0 0.35em;
  line-height: 1.25;
  font-weight: 700;
}

.g26-chat-widget .g26-msg-content h1 { font-size: 1.08rem; }
.g26-chat-widget .g26-msg-content h2 { font-size: 1.02rem; }
.g26-chat-widget .g26-msg-content h3 { font-size: 0.98rem; }
.g26-chat-widget .g26-msg-content h4 { font-size: 0.95rem; }

.g26-chat-widget .g26-msg-content li {
  margin: 0.25em 0;
}

.g26-chat-widget .g26-msg-content a {
  color: #ffd87d;
  -webkit-text-fill-color: #ffd87d !important;
  text-decoration: underline;
  text-decoration-color: rgba(var(--g26-highlight-rgb), 0.7);
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.g26-chat-widget .g26-msg-content a:hover {
  text-decoration-color: rgba(var(--g26-highlight-rgb), 1);
}

.g26-chat-widget .g26-msg-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 1px 5px;
}

.g26-chat-widget .g26-msg-content pre {
  overflow: auto;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: rgba(3, 6, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
}

.g26-chat-widget .g26-msg-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.g26-chat-widget .g26-msg-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.6em 0;
  font-size: 0.92em;
}

.g26-chat-widget .g26-msg-content th,
.g26-chat-widget .g26-msg-content td {
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 8px;
  text-align: left;
}

.g26-chat-widget .g26-msg-content th {
  background: rgba(255, 255, 255, 0.08);
}

.g26-chat-widget .g26-msg-content blockquote {
  border-left: 3px solid rgba(var(--g26-brand-rgb), 0.8);
  padding: 0 0 0 10px;
  color: rgba(255, 255, 255, 0.86);
}

.g26-chat-widget .g26-msg-user {
  margin-left: auto;
  margin-top: 12px;
  border-radius: 18px 18px 6px 18px;
  background: rgba(var(--g26-brand-rgb), 0.2);
  border-color: rgba(var(--g26-brand-rgb), 0.45);
}

.g26-chat-widget .g26-msg-assistant {
  margin-top: 12px;
}

.g26-chat-widget .g26-msg-error {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
}

.g26-chat-widget .g26-msg-loading {
  opacity: 0.95;
}

.g26-chat-widget .g26-msg-streaming .g26-msg-content::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 2px;
  transform: translateY(2px);
  border-right: 2px solid rgba(255, 255, 255, 0.75);
  animation: g26CaretBlink 0.95s step-end infinite;
}

.g26-chat-widget .g26-loading-label {
  display: inline-block;
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.9);
}

.g26-chat-widget .g26-loading-dots {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
}

.g26-chat-widget .g26-loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  animation: g26DotPulse 1.2s infinite ease-in-out;
}

.g26-chat-widget .g26-loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.g26-chat-widget .g26-loading-dots span:nth-child(3) { animation-delay: 0.3s; }

.g26-chat-widget .g26-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.g26-chat-widget .g26-chat-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.g26-chat-widget .g26-chat-chip:hover {
  background: var(--g26-brand);
  border-color: var(--g26-brand);
}

.g26-chat-widget .g26-chat-foot {
  padding: 22px 24px 26px;
  padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Collapsed: composer spans full foot width; expanded desktop overrides below. */
.g26-chat-widget .g26-chat-input-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.g26-chat-widget .g26-chat-input {
  display: block;
  width: 100%;
  min-height: calc(2 * 1.5em + 30px);
  max-height: 200px;
  padding: 16px 58px 16px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 15px;
  line-height: 1.5;
  font-family: inherit;
  outline: none;
  resize: none;
  overflow-y: auto;
  overflow-x: hidden;
  vertical-align: top;
  -webkit-appearance: none;
  appearance: none;
}

@supports (field-sizing: content) {
  .g26-chat-widget .g26-chat-input {
    field-sizing: content;
  }
}

.g26-chat-widget .g26-chat-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.g26-chat-widget .g26-chat-send {
  position: absolute;
  right: 10px;
  bottom: 10px;
  top: auto;
  transform: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--g26-brand), var(--g26-brand-2), var(--g26-accent));
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  touch-action: manipulation;
}

.g26-chat-widget .g26-chat-foot-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--g26-brand-rgb), 0.5);
  background: linear-gradient(
    90deg,
    rgba(var(--g26-brand-rgb), 0.9),
    rgba(var(--g26-brand-2-rgb), 0.85),
    rgba(var(--g26-accent-rgb), 0.85)
  );
  color: #fff;
  font-weight: 800;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 14px auto 0;
}

.g26-chat-widget .g26-chat-sources {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.g26-chat-widget .g26-chat-sources-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.g26-chat-widget .g26-chat-source {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 6px 10px;
  text-align: left;
}

.g26-chat-widget .g26-chat-source:hover {
  border-color: rgba(var(--g26-brand-rgb), 0.75);
  background: rgba(var(--g26-brand-rgb), 0.15);
}

.g26-chat-widget .g26-chat-source-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
  flex: 0 0 auto;
}

.g26-chat-widget .g26-chat-source-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.g26-chat-widget .g26-service-links {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.g26-chat-widget .g26-service-links-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.g26-chat-widget .g26-service-link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  text-align: left;
}

.g26-chat-widget .g26-service-link:hover {
  border-color: rgba(var(--g26-brand-rgb), 0.85);
  background: rgba(var(--g26-brand-rgb), 0.2);
}

.g26-chat-widget .g26-service-link-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.95);
  flex: 0 0 auto;
}

.g26-chat-widget .g26-service-link-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.g26-chat-widget .g26-chat-privacy-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

html.g26-chat-lock,
body.g26-chat-lock {
  overflow: hidden !important;
}

.g26-chat-widget.g26-chat-expanded {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: var(--g26-chat-expanded-height);
  z-index: 9999;
  background: rgba(var(--g26-bg-rgb), 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  margin: 0;
  animation: g26ExpandIn 0.22s ease;
}

.g26-chat-widget.g26-chat-expanded .g26-chat-wrap {
  margin: 0;
  width: 100%;
  max-width: none;
  height: var(--g26-chat-expanded-height);
  padding: max(10px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px))
    max(10px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  border-radius: 0;
}

.g26-chat-widget.g26-chat-expanded .g26-chat {
  height: 100%;
  max-height: 100%;
  border-radius: 0;
  box-shadow: none;
}

.g26-chat-widget.g26-chat-expanded .g26-chat-close {
  display: inline-grid;
}

@media (min-width: 769px) {
  .g26-chat-widget.g26-chat-expanded .g26-chat-body {
    padding: 26px clamp(20px, 5vw, 52px);
  }

  .g26-chat-widget.g26-chat-expanded .g26-msg {
    max-width: var(--g26-expanded-readable);
  }

  .g26-chat-widget.g26-chat-expanded .g26-msg-assistant,
  .g26-chat-widget.g26-chat-expanded .g26-chat-sources,
  .g26-chat-widget.g26-chat-expanded .g26-service-links {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: var(--g26-expanded-readable);
  }

  .g26-chat-widget.g26-chat-expanded .g26-chat-input-wrap {
    max-width: var(--g26-expanded-readable);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .g26-chat-widget {
    --g26-chat-height: min(620px, 78vh);
  }

  @supports (height: 1dvh) {
    .g26-chat-widget {
      --g26-chat-height: min(620px, 78dvh);
    }
  }

  .g26-chat-widget .g26-chat-wrap {
    margin-top: 20px;
    padding: 2px;
    border-radius: 28px;
  }

  .g26-chat-widget .g26-chat {
    border-radius: 24px;
  }

  .g26-chat-widget .g26-chat-head {
    padding: 14px 14px;
  }

  .g26-chat-widget .g26-chat-brand img {
    height: 20px;
    max-width: 150px;
  }

  .g26-chat-widget .g26-chat-body {
    padding: 16px 14px;
  }

  .g26-chat-widget .g26-msg {
    max-width: 92%;
    padding: 14px 16px;
    font-size: 14px;
  }

  .g26-chat-widget .g26-chat-foot {
    padding: 12px 14px 14px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .g26-chat-widget .g26-chat-input-wrap {
    max-width: 100%;
  }

  .g26-chat-widget .g26-chat-input {
    font-size: 16px;
    min-height: calc(2 * 1.5em + 24px);
    max-height: 180px;
    padding: 13px 54px 13px 15px;
  }

  .g26-chat-widget .g26-chat-send {
    width: 42px;
    height: 42px;
    right: 6px;
    bottom: 8px;
    min-width: 40px;
    min-height: 40px;
  }

  .g26-chat-widget .g26-chat-foot-note,
  .g26-chat-widget .g26-chat-privacy-note {
    letter-spacing: 0.08em;
    font-size: 10px;
  }

  .g26-chat-widget .g26-chat-source,
  .g26-chat-widget .g26-service-link {
    border-radius: 14px;
  }

  .g26-chat-widget.g26-chat-expanded {
    align-items: stretch;
    justify-content: stretch;
  }

  .g26-chat-widget.g26-chat-expanded .g26-chat-wrap {
    max-width: none;
    width: 100%;
    padding: 0;
    border-radius: 0;
  }

  .g26-chat-widget.g26-chat-expanded .g26-chat {
    height: var(--g26-chat-expanded-height);
    max-height: var(--g26-chat-expanded-height);
    border-radius: 0;
  }

  .g26-chat-widget.g26-chat-expanded .g26-chat-foot {
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .g26-chat-widget.g26-chat-expanded .g26-chat-foot-note {
    display: none;
  }
}

@media (max-width: 480px) {
  .g26-chat-widget {
    --g26-chat-height: min(600px, 80vh);
  }

  @supports (height: 1dvh) {
    .g26-chat-widget {
      --g26-chat-height: min(600px, 80dvh);
    }
  }

  .g26-chat-widget .g26-chat {
    min-height: 360px;
  }

  .g26-chat-widget .g26-msg {
    max-width: 95%;
    padding: 12px 14px;
    font-size: 13.5px;
  }

  .g26-chat-widget .g26-chat-foot-note {
    display: none;
  }
}


.wp-admin .g26-admin-preview-shell {
  background: radial-gradient(circle at top right, rgba(var(--g26-brand-2-rgb), 0.28), rgba(var(--g26-bg-rgb), 0.95));
  border-radius: 24px;
  padding: 20px 20px 28px;
}

@keyframes g26DotPulse {
  0%, 80%, 100% { transform: scale(0.75); opacity: 0.45; }
  40% { transform: scale(1); opacity: 1; }
}

@keyframes g26GradientFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes g26CaretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes g26ExpandIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .g26-chat-widget .g26-chat::before,
  .g26-chat-widget .g26-loading-dots span,
  .g26-chat-widget .g26-msg-streaming .g26-msg-content::after {
    animation: none !important;
  }

  .g26-chat-widget .g26-chat-body::after {
    transition: none;
  }
}
