.gprog-chat {
  --chat-message-bg: #dceade;
  --chat-wallpaper-overlay: rgba(220, 234, 222, .78);
  color: var(--ui-text);
}
.gprog-chat .gprog-chat-window { background-color: var(--chat-message-bg); background-size: 620px auto; border-radius: 24px; }
.gprog-chat-topbar { margin: 10px 10px 0; height: 54px; border-radius: 20px; background: var(--ui-surface); box-shadow: 0 2px 12px rgb(0 0 0 / .08); }
.gprog-chat .gprog-chat-topbar-tool { border: 0; background: transparent; color: var(--ui-text); border-radius: 50%; padding: 0; box-shadow: none; }
.gprog-chat .gprog-chat-topbar-tool:hover { background: var(--ui-subtle); }
.gprog-chat-topbar-tool:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
.gprog-chat .gprog-chat-header-user { display: flex; align-items: center; gap: 10px; min-width: 0; border: 0; padding: 0; background: transparent; color: var(--ui-text); text-align: left; }
.gprog-chat-header-avatar { position: relative; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: #1764df; color: #fff; font-size: 16px; font-weight: 600; overflow: hidden; }
.gprog-chat-header-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gprog-chat-header-avatar img[hidden] { display: none; }
.gprog-chat-header-nickname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; line-height: 24px; font-weight: 600; }
.gprog-chat .gprog-chat-topbar-tool { flex-shrink: 0; }
.gprog-chat-header-user:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 4px; }
.gprog-chat .gprog-chat-glass-menu { background: rgb(244 250 244 / .78); color: #17212b; border: 1px solid rgb(255 255 255 / .5); border-radius: 18px; backdrop-filter: blur(18px); box-shadow: 0 8px 30px rgb(0 0 0 / .18); font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif; }
:root[data-ui-theme="dark"] .gprog-chat .gprog-chat-glass-menu { background: rgb(32 42 50 / .84); color: #f2f5f8; border-color: rgb(255 255 255 / .12); }
.gprog-chat .gprog-chat-glass-menu:not(.gprog-chat-reaction-strip) :is(button, summary) { font-family: inherit; font-size: 14px; line-height: 20px; font-weight: 500; }
.gprog-chat-main-menu { width: min(280px, calc(100vw - 48px)); max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain; }
.gprog-chat-admin-menu[data-admin="true"] { margin-top: 4px; padding-top: 4px; border-top: 1px solid rgb(100 116 139 / .22); }
.gprog-chat-admin-menu > summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; cursor: pointer; list-style: none; }
.gprog-chat-admin-menu > summary[hidden] { display: none; }
.gprog-chat-admin-menu > summary::-webkit-details-marker { display: none; }
.gprog-chat-admin-menu > summary:hover { background: rgb(100 116 139 / .12); }
.gprog-chat-admin-menu > summary svg:last-child { margin-left: auto; transition: transform 120ms; }
.gprog-chat-admin-menu[open] > summary svg:last-child { transform: rotate(180deg); }
.gprog-chat .gprog-chat-glass-menu button:hover { background: rgb(0 0 0 / .06); filter: none; }
:root[data-ui-theme="dark"] .gprog-chat .gprog-chat-glass-menu button:hover { background: rgb(255 255 255 / .10); }
:root[data-ui-theme="dark"] .gprog-chat-glass-menu .text-rose-700 { color: #ffafb8; }
:root[data-ui-theme="dark"] .gprog-chat-glass-menu .text-amber-700 { color: #ecd597; }
.gprog-chat-message-menu { width: min(300px, calc(100vw - 32px)); max-height: calc(100dvh - 64px); }
.gprog-chat-menu-actions { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.gprog-chat-menu-actions > button { min-height: 34px; }
.gprog-chat-reaction-strip { display: flex; flex: 0 0 auto; gap: 4px; padding: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; overscroll-behavior: contain; }
.gprog-chat-reaction-strip > button { flex: 0 0 36px; height: 36px; border: 0; border-radius: 50%; font-size: 24px; background: transparent; }
.gprog-chat .gprog-chat-layout { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); padding: 10px; gap: 18px; }
@media (min-width: 768px) {
  .gprog-chat .gprog-chat-layout { grid-template-columns: 320px minmax(0, 1fr); }
}
.gprog-chat .gprog-chat-sidebar { padding: 12px; border: 0; border-radius: 20px; background: var(--ui-surface); box-shadow: 0 3px 16px rgb(0 0 0 / .12); }
.gprog-chat .gprog-chat-workspace { background: transparent; padding: 0; width: min(100%, 780px); justify-self: center; min-width: 0; }
.gprog-chat-conversation-header { padding-inline: 16px; background: var(--ui-surface); border-radius: 24px; box-shadow: 0 2px 10px rgb(0 0 0 / .08); }
.gprog-chat .gprog-chat-conversation-header .text-\[24px\] { font-size: 18px; }
.gprog-chat-messages { background: transparent; border: 0; }
.gprog-chat :is(.gprog-chat-messages, .gprog-chat-list, textarea) { overscroll-behavior: contain; }
@media (max-width: 767px) {
  .gprog-chat .gprog-chat-window { border-radius: 0; }
  .gprog-chat .gprog-chat-layout { padding: 8px; gap: 0; }
  .gprog-chat-topbar { margin-inline: 8px; }
}
:root[data-ui-theme="dark"] .gprog-chat .gprog-chat-quote {
  background-color: #263c52;
  border-left-color: #93c5fd;
  color: #e7ecf2;
}
:root[data-ui-theme="dark"] .gprog-chat .gprog-chat-quote:hover { background-color: #304b65; }
:root[data-ui-theme="dark"] .gprog-chat .gprog-chat-quote .text-indigo-700 { color: #93c5fd; }
:root[data-ui-theme="dark"] .gprog-chat .gprog-chat-quote .text-slate-700 { color: #e7ecf2; }
.gprog-chat .gprog-chat-quote:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
:root[data-ui-theme="dark"] .gprog-chat .gprog-chat-list-row {
  background-color: var(--ui-surface);
  border-color: var(--ui-border);
  color: var(--ui-text);
}
:root[data-ui-theme="dark"] .gprog-chat .gprog-chat-list-row:hover { background-color: var(--ui-subtle); }
:root[data-ui-theme="dark"] .gprog-chat .gprog-chat-list-row[data-active="true"] {
  background-color: #2b5278;
  box-shadow: none;
}
:root[data-ui-theme="dark"] .gprog-chat .gprog-chat-list-row--blocked[data-active="true"] {
  background-color: #2b5278;
  box-shadow: none;
}
:root[data-ui-theme="dark"] .gprog-chat .gprog-chat-list-row :is(.text-slate-800, .text-slate-700) { color: var(--ui-text); }
:root[data-ui-theme="dark"] .gprog-chat .gprog-chat-list-row .text-slate-500 { color: #b8c6d6; }
.gprog-chat-scroll-latest {
  background: #1764df;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 3px 12px rgb(0 0 0 / .25);
  cursor: pointer;
}
.gprog-chat-scroll-latest:not(:disabled):hover { background: #124eb1; filter: none; }
.gprog-chat-scroll-latest:focus-visible { outline: 3px solid var(--ui-focus); outline-offset: 3px; }
.gprog-chat-scroll-latest-badge { background: #fff; color: #124eb1; border: 1px solid #1764df; }
:root[data-ui-theme="dark"] .gprog-chat-scroll-latest { background: #93c5fd; color: #131c27; border-color: #191f25; }
:root[data-ui-theme="dark"] .gprog-chat-scroll-latest:not(:disabled):hover { background: #bfdbfe; filter: none; }
:root[data-ui-theme="dark"] .gprog-chat-scroll-latest-badge { background: #232b34; color: #e7ecf2; border-color: #93c5fd; }
:root[data-ui-theme="dark"] .gprog-chat {
  --chat-message-bg: #101417;
  --chat-wallpaper-overlay: rgba(16, 20, 23, .94);
}
.gprog-chat [class~="bg-white/92"] { background-color: var(--ui-surface); }
.gprog-chat :is([class*="border-slate-200"], [class*="border-white/70"]) { border-color: var(--ui-border); }
.gprog-chat .gprog-chat-list-row { border-top: 0; border-bottom: 0; border-radius: 8px; margin-block: 2px; }
.gprog-chat .gprog-chat-list-row { display: flex; align-items: center; gap: 8px; min-height: 68px; padding: 8px 10px; }
.gprog-chat .gprog-chat-list-row:hover { background-color: var(--ui-subtle); }
.gprog-chat .gprog-chat-row-select { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 10px; border: 0; padding: 0; background: transparent; }
.gprog-chat-row-avatar { position: relative; display: block; width: 52px; height: 52px; flex: 0 0 52px; }
.gprog-chat-row-avatar > img, .gprog-chat-row-avatar-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--ui-subtle); font-size: 22px; }
.gprog-chat-row-online { position: absolute; top: -1px; left: -1px; width: 12px; height: 12px; border-radius: 50%; background: #10b981; border: 2px solid var(--ui-surface); }
.gprog-chat-row-copy { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }
.gprog-chat-row-name-line { display: flex; align-items: center; gap: 3px; min-width: 0; height: 20px; }
.gprog-chat-row-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 20px; font-weight: 600; }
.gprog-chat-row-name-line > :not(.gprog-chat-row-name) { flex-shrink: 0; }
.gprog-chat-row-preview { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 18px; }
.gprog-chat-row-tools { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.gprog-chat .gprog-chat-list-row[data-active="true"] { background-color: #1764df; color: #fff; }
.gprog-chat .gprog-chat-list-row[data-active="true"] :is(.text-slate-800, .text-slate-700, .text-slate-500, .text-slate-400) { color: #fff; }
:root[data-ui-theme="dark"] .gprog-chat .gprog-chat-list-row[data-active="true"] :is(.text-slate-800, .text-slate-700, .text-slate-500, .text-slate-400) { color: #fff; }
.gprog-chat .gprog-chat-list-row[data-active="true"] button:hover:not(.flex-1):not(.w-full) { color: #fff; background-color: rgb(255 255 255 / .12); filter: none; }
.gprog-chat .gprog-chat-list-row button:is(.flex-1, .w-full),
.gprog-chat .gprog-chat-list-row button:is(.flex-1, .w-full):hover { background: transparent; filter: none; }
.gprog-chat-bubble { --chat-bubble: #fff; background: var(--chat-bubble); color: #17212b; border: 0; border-radius: 16px 16px 16px 4px; box-shadow: 0 1px 2px rgb(0 0 0 / .10); }
.gprog-chat-bubble[data-mine="true"] { --chat-bubble: #e3f2ff; border-radius: 16px 16px 4px 16px; }
.gprog-chat-bubble::before { content: ""; position: absolute; bottom: 0; left: -6px; width: 12px; height: 12px; background: var(--chat-bubble); clip-path: polygon(100% 0, 100% 100%, 0 100%); pointer-events: none; }
.gprog-chat-bubble[data-mine="true"]::before { left: auto; right: -6px; transform: scaleX(-1); }
.gprog-chat-message-text { color: inherit; overflow-wrap: anywhere; }
.gprog-chat-message-meta { color: #64748b; }
.gprog-chat-bubble[data-media="true"] { display: flex; flex-direction: column; width: 360px; min-width: 0; }
.gprog-chat-bubble[data-attachments="true"] { display: flex; flex-direction: column; min-width: 0; }
.gprog-chat-bubble[data-files="true"] { width: 400px; }
.gprog-chat-bubble[data-attachments="true"] .gprog-chat-attachments { order: 1; margin-top: 4px; }
.gprog-chat-bubble[data-attachments="true"] .gprog-chat-caption { order: 2; padding-top: 7px; }
.gprog-chat-bubble[data-attachments="true"] :is(.gprog-chat-message-meta, .gprog-chat-reactions) { order: 3; }
.gprog-chat .gprog-chat-file-link { color: inherit; background: transparent; border: 0; border-radius: 0; text-decoration: none; min-width: 0; }
.gprog-chat-file-link:hover .gprog-chat-file-name { text-decoration: underline; }
.gprog-chat-file-size { color: var(--ui-muted); }
.gprog-chat-file-icon { --file-color: #2586e8; position: relative; display: inline-flex; justify-content: center; align-items: center; width: 52px; height: 56px; flex: 0 0 52px; color: var(--file-color); }
.gprog-chat-file-icon svg { fill: var(--file-color); }
.gprog-chat-file-icon svg path:last-child { fill: none; stroke: rgb(255 255 255 / .6); }
.gprog-chat-file-icon > span { position: absolute; bottom: 9px; left: 4px; right: 4px; text-align: center; font: 600 11px/16px "Segoe UI", Arial, sans-serif; color: #fff; }
.gprog-chat-file-icon[data-extension="txt"] { --file-color: #64748b; }
.gprog-chat-file-icon[data-extension="zip"] { --file-color: #b87e17; }
.gprog-chat-file-icon[data-extension="rar"] { --file-color: #bd447a; }
.gprog-chat .gprog-chat-file-remove { color: var(--ui-muted); background: transparent; border: 0; }
.gprog-chat-file-remove:hover { color: #be123c; }
.gprog-chat-pending-file { color: var(--ui-text); background: var(--ui-surface); border-radius: 8px; max-width: min(100%, 420px); min-width: 0; }
.gprog-chat-bubble[data-media="true"] .gprog-chat-photo-wrap { margin-inline: -14px; width: calc(100% + 28px); }
.gprog-chat-photo { border-radius: 14px; overflow: hidden; }
.gprog-chat-photo img { width: 100%; height: auto; }
.gprog-chat-image-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 120px; min-height: 160px; color: var(--ui-muted); background: var(--ui-subtle); border-radius: 14px; }
:root[data-ui-theme="dark"] .gprog-chat-bubble { --chat-bubble: #1c2b38; color: #fff; box-shadow: none; }
:root[data-ui-theme="dark"] .gprog-chat-bubble[data-mine="true"] { --chat-bubble: #284761; }
:root[data-ui-theme="dark"] .gprog-chat-bubble .gprog-chat-message-meta { color: #b8c6d6; }
:root[data-ui-theme="dark"] .gprog-chat-bubble :is(.text-indigo-700, .text-emerald-700) { color: #93c5fd; }
.gprog-chat-composer { border-radius: 24px; box-shadow: 0 1px 3px rgb(0 0 0 / .08); background: var(--ui-surface); }
.gprog-chat-composer-tool { border: 0; border-radius: 50%; color: var(--ui-text); background: transparent; }
.gprog-chat-composer-tool:hover { background: var(--ui-subtle); }
.gprog-chat .gprog-chat-composer-input { border: 0; border-radius: 8px; background: transparent; color: var(--ui-text); }
.gprog-chat-send { border: 0; border-radius: 50%; background: #1764df; }
