/* GoodDog 官网在线客服 —— 浮动聊天框样式
   跟随站点配色变量（--accent/--card/--fg/--muted/--border），变量缺失时用兜底值。
   单独一个文件，方便整块删；不覆盖站点任何既有类名（全部 gd- 前缀）。 */

#gdChatBtn{
  position:fixed; right:20px; bottom:20px; z-index:9998;
  width:56px; height:56px; border-radius:50%; cursor:pointer;
  border:1px solid var(--border,#30363d);
  background:var(--accent,#f0b429); color:#0d1117;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 8px 26px rgba(0,0,0,.45);
  transition:transform .15s ease, box-shadow .15s ease;
  padding:0; font-size:22px; line-height:1;
}
#gdChatBtn:hover{ transform:translateY(-2px); box-shadow:0 12px 32px rgba(0,0,0,.55); }
#gdChatBtn.gd-hidden{ display:none; }
#gdChatBadge{
  position:absolute; top:-4px; right:-4px; min-width:18px; height:18px; border-radius:9px;
  background:#3fb950; color:#0d1117; font:700 11px/18px -apple-system,Segoe UI,Roboto,sans-serif;
  padding:0 4px; display:none;
}

#gdChatPanel{
  position:fixed; right:20px; bottom:88px; z-index:9999;
  width:min(376px, calc(100vw - 28px));
  height:min(560px, calc(100vh - 130px));
  display:none; flex-direction:column; overflow:hidden;
  background:var(--card,#161b22); color:var(--fg,#e6edf3);
  border:1px solid var(--border,#30363d); border-radius:14px;
  box-shadow:0 20px 56px rgba(0,0,0,.6);
  font:15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue","PingFang SC","Microsoft YaHei",sans-serif;
}
#gdChatPanel.gd-open{ display:flex; }

#gdChatHead{
  display:flex; align-items:center; gap:10px; padding:12px 14px;
  border-bottom:1px solid var(--border,#30363d); background:rgba(255,255,255,.02);
}
#gdChatHead .gd-dot{
  width:8px; height:8px; border-radius:50%; background:#3fb950; box-shadow:0 0 0 3px rgba(63,185,80,.18);
}
#gdChatHead .gd-title{ font-weight:650; font-size:14.5px; }
#gdChatHead .gd-sub{ color:var(--muted,#8b949e); font-size:12px; margin-top:1px; }
#gdChatClose{
  margin-left:auto; background:transparent; border:0; color:var(--muted,#8b949e);
  font-size:22px; line-height:1; cursor:pointer; padding:2px 4px; border-radius:6px;
}
#gdChatClose:hover{ color:var(--fg,#e6edf3); background:rgba(255,255,255,.06); }

#gdChatLog{
  flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px;
  scrollbar-width:thin;
}
#gdChatLog::-webkit-scrollbar{ width:8px; }
#gdChatLog::-webkit-scrollbar-thumb{ background:var(--border,#30363d); border-radius:4px; }

.gd-msg{ max-width:86%; padding:9px 12px; border-radius:12px; white-space:pre-wrap; word-break:break-word; }
.gd-msg.gd-bot{
  align-self:flex-start; background:rgba(255,255,255,.05);
  border:1px solid var(--border,#30363d); border-bottom-left-radius:4px;
}
.gd-msg.gd-me{
  align-self:flex-end; background:var(--accent,#f0b429); color:#0d1117;
  border-bottom-right-radius:4px; font-weight:500;
}
.gd-msg.gd-sys{ align-self:center; background:transparent; color:var(--muted,#8b949e); font-size:12.5px; }

.gd-typing{ align-self:flex-start; display:flex; gap:4px; padding:10px 12px; }
.gd-typing i{
  width:6px; height:6px; border-radius:50%; background:var(--muted,#8b949e);
  animation:gd-blink 1.2s infinite;
}
.gd-typing i:nth-child(2){ animation-delay:.2s; }
.gd-typing i:nth-child(3){ animation-delay:.4s; }
@keyframes gd-blink{ 0%,60%,100%{opacity:.25} 30%{opacity:1} }

.gd-card{
  align-self:flex-start; background:rgba(240,180,41,.07);
  border:1px dashed rgba(240,180,41,.5); border-radius:12px; padding:11px 12px; max-width:92%;
}
.gd-card .gd-card-t{ font-weight:650; font-size:13.5px; margin-bottom:2px; }
.gd-card .gd-card-d{ color:var(--muted,#8b949e); font-size:12.5px; margin-bottom:9px; }
.gd-card img{ width:168px; height:168px; display:block; border-radius:8px; background:#fff; padding:6px; }
.gd-card a{ color:var(--accent,#f0b429); font-size:12.5px; text-decoration:none; word-break:break-all; }
.gd-card a:hover{ text-decoration:underline; }

#gdChatQuick{ display:flex; flex-wrap:wrap; gap:6px; padding:0 12px 8px; }
#gdChatQuick button{
  background:transparent; color:var(--fg,#e6edf3);
  border:1px solid var(--border,#30363d); border-radius:999px;
  padding:5px 10px; font-size:12.5px; cursor:pointer; font-family:inherit;
}
#gdChatQuick button:hover{ border-color:var(--accent,#f0b429); color:var(--accent,#f0b429); }

#gdChatForm{ display:flex; gap:8px; padding:10px 12px; border-top:1px solid var(--border,#30363d); }
#gdChatText{
  flex:1; resize:none; min-height:40px; max-height:110px; padding:9px 11px;
  background:rgba(0,0,0,.25); color:var(--fg,#e6edf3);
  border:1px solid var(--border,#30363d); border-radius:10px;
  font:15px/1.45 inherit; outline:none;
}
#gdChatText:focus{ border-color:var(--accent,#f0b429); }
#gdChatSend{
  align-self:flex-end; height:40px; padding:0 15px; border-radius:10px; cursor:pointer;
  border:1px solid var(--accent,#f0b429); background:var(--accent,#f0b429); color:#0d1117;
  font-weight:650; font-family:inherit;
}
#gdChatSend:disabled{ opacity:.45; cursor:default; }

#gdChatFoot{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  padding:8px 12px 11px; border-top:1px solid var(--border,#30363d);
  color:var(--muted,#8b949e); font-size:12px;
}
#gdChatFoot a{ color:var(--muted,#8b949e); text-decoration:none; border-bottom:1px dotted currentColor; cursor:pointer; }
#gdChatFoot a:hover{ color:var(--accent,#f0b429); }

@media (max-width:520px){
  #gdChatPanel{ right:8px; left:8px; width:auto; bottom:78px; height:min(72vh, 560px); }
  #gdChatBtn{ right:14px; bottom:14px; }
}
