
:root{
  --pog-bg:#0b1220;
  --pog-panel:#0b1220;
  --pog-header:#070d18;
  --pog-border:rgba(148,163,184,.25);
  --pog-text:#e5e7eb;
  --pog-muted:#94a3b8;
  --pog-accent: var(--e-global-color-primary, #0ea5e9);
  --pog-user: var(--e-global-color-primary, #0284c7);
  --pog-model:#111827;
}

/* Backdrop for "chat website" feel */
.pog-chat-backdrop{
  position:fixed;inset:0;z-index:99998;
  background:rgba(2,6,23,.55);
  backdrop-filter: blur(2px);
  display:none;
}
.pog-chat-backdrop.is-open{display:block}

/* Bubble centered in footer area (bottom-center) */
.pog-chat-bubble{
  position:fixed;left:50%;transform:translateX(-50%);
  bottom:18px;z-index:99999;
  width:64px;height:64px;border-radius:999px;border:none;
  background:linear-gradient(135deg,var(--pog-accent), #22d3ee);
  box-shadow:0 16px 44px rgba(2,132,199,.35);
  cursor:pointer;transition:transform .15s ease, opacity .15s ease, filter .15s ease;
  display:flex;align-items:center;justify-content:center;padding:0;
}
.pog-chat-bubble:hover{transform:translateX(-50%) scale(1.06)}
.pog-chat-bubble:active{transform:translateX(-50%) scale(.98)}
.pog-chat-bubble.is-hidden{opacity:0;pointer-events:none}
.pog-chat-bubble-icon{font-size:24px;line-height:1;display:block}

/* Panel centered like a modal. Desktop ~50% width */
.pog-chat-panel{
  position:fixed;left:50%;top:50%;
  transform:translate(-50%,-50%);
  z-index:99999;

  width:50vw; max-width:860px; min-width:420px;
  height:70vh; max-height:760px;

  background:var(--pog-panel);
  border:1px solid rgba(255,255,255,.10);
  border-radius:22px;
  box-shadow:0 30px 80px rgba(2,6,23,.75);
  overflow:hidden;display:none;flex-direction:column;
}
.pog-chat-panel.is-open{display:flex}

.pog-chat-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 16px 14px 16px;background:var(--pog-header);
  border-bottom:1px solid rgba(148,163,184,.18);
}
.pog-chat-title-main{color:#e2e8f0;font-weight:800;font-size:15px;letter-spacing:.2px}
.pog-chat-title-sub{color:var(--pog-muted);font-size:12.5px;margin-top:2px}
.pog-chat-close{
  background:transparent;border:none;color:#cbd5e1;font-size:20px;
  cursor:pointer;padding:8px 12px;border-radius:12px;
}
.pog-chat-close:hover{background:rgba(148,163,184,.12)}

.pog-chat-messages{
  flex:1;overflow:auto;padding:16px;background:rgba(2,6,23,.18);
}
.pog-chat-row{display:flex;margin:12px 0}
.pog-chat-row.is-user{justify-content:flex-end}
.pog-chat-row.is-model{justify-content:flex-start}
.pog-chat-msg{
  max-width:78%;white-space:pre-wrap;
  padding:12px 14px;border-radius:16px;
  font-size:15px;line-height:1.45;
}
.pog-chat-row.is-user .pog-chat-msg{
  background:var(--pog-user);color:#fff;border-bottom-right-radius:7px;
}
.pog-chat-row.is-model .pog-chat-msg{
  background:var(--pog-model);color:var(--pog-text);
  border:1px solid rgba(148,163,184,.15);
  border-bottom-left-radius:7px;
}

.pog-chat-composer{
  display:flex;gap:10px;padding:14px;background:var(--pog-header);
  border-top:1px solid rgba(148,163,184,.18);
}
.pog-chat-input{
  flex:1;border:none;outline:none;border-radius:14px;
  padding:13px 14px;background:var(--pog-bg);color:var(--pog-text);
  font-size:15px;
}
.pog-chat-send{
  width:52px;border:none;border-radius:14px;cursor:pointer;
  background:var(--pog-accent);color:#fff;font-size:18px;
}
.pog-chat-send:hover{filter:brightness(1.06)}
.pog-chat-send:active{transform:scale(.98)}
.pog-chat-hint{
  padding:10px 14px 14px;color:#64748b;font-size:12px;background:var(--pog-header);
}

/* typing dots */
.pog-chat-typing{display:flex;gap:6px}
.pog-chat-typing span{
  width:7px;height:7px;border-radius:99px;background:#38bdf8;display:inline-block;
  animation:pog-bounce 1.1s infinite ease-in-out;
}
.pog-chat-typing span:nth-child(2){animation-delay:.12s}
.pog-chat-typing span:nth-child(3){animation-delay:.24s}
@keyframes pog-bounce{0%,80%,100%{transform:translateY(0);opacity:.45}40%{transform:translateY(-6px);opacity:1}}

/* Mobile: cover ~75% */
@media (max-width: 768px){
  .pog-chat-panel{
    width:92vw; min-width:0;
    height:75vh; max-height:none;
    border-radius:18px;
  }
  .pog-chat-msg{font-size:14px}
  .pog-chat-input{font-size:14px}
}
@media (max-width: 420px){
  .pog-chat-bubble{width:60px;height:60px;bottom:12px}
}
