/* GSD Smart Assistant 2.0: independent UI and normal cursor */
#gsd-chatbot,#gsd-chatbot *{box-sizing:border-box;cursor:auto!important}
#gsd-chatbot{position:fixed;right:20px;bottom:105px;z-index:2147483000;font-family:'Plus Jakarta Sans',system-ui,sans-serif;color:#281c16;font-size:14px}
#gsd-chatbot button,#gsd-chatbot a{cursor:pointer!important}
#gsd-chatbot input{cursor:text!important}
#gsd-chatbot .gsd-chat-launch{display:flex;align-items:center;gap:9px;background:#2c211b;color:white;border:1px solid #76513c;border-radius:40px;padding:8px 16px 8px 8px;font:700 13px/1.2 inherit;box-shadow:0 12px 32px #0005}
#gsd-chatbot .gsd-chat-avatar{display:grid;place-items:center;flex:none;width:37px;height:37px;border-radius:50%;background:linear-gradient(145deg,#fff4da,#efbd66);font-size:22px}
#gsd-chatbot .gsd-chat-panel{display:none;position:absolute;right:0;bottom:63px;width:min(385px,calc(100vw - 24px));height:min(570px,calc(100dvh - 185px));min-height:300px;background:#fffaf3;border:1px solid #e7d9c6;border-radius:18px;box-shadow:0 20px 60px #0005;overflow:hidden;flex-direction:column}
#gsd-chatbot.gsd-open .gsd-chat-panel{display:flex}
#gsd-chatbot .gsd-chat-head{display:flex;align-items:center;gap:10px;padding:12px;background:#2c211b;color:white}
#gsd-chatbot .gsd-chat-title{flex:1;min-width:0}
#gsd-chatbot .gsd-chat-title strong{display:block;font-size:14px}
#gsd-chatbot .gsd-chat-title small{display:block;font-size:11px;color:#e8cba3;margin-top:3px}
#gsd-chatbot .gsd-chat-close{border:0;background:transparent;color:#fff;font-size:26px;line-height:1;padding:4px 7px}
#gsd-chatbot .gsd-chat-language{display:flex;gap:7px;padding:9px 12px;border-bottom:1px solid #ecdfd0}
#gsd-chatbot .gsd-chat-language button{border:1px solid #d9c9b7;border-radius:20px;background:white;padding:5px 10px;font-size:12px}
#gsd-chatbot .gsd-chat-language button[aria-pressed=true]{background:#f4d28f;border-color:#e5b85f}
#gsd-chatbot .gsd-chat-messages{flex:1;min-height:0;overflow:auto;padding:13px;display:flex;flex-direction:column;gap:9px;background:#faf5ed}
#gsd-chatbot .gsd-chat-bubble{max-width:92%;padding:11px 12px;border-radius:15px;font-size:13px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
#gsd-chatbot .gsd-chat-bot{align-self:flex-start;background:white;border:1px solid #e8dccc}
#gsd-chatbot .gsd-chat-user{align-self:flex-end;background:#f2d394}
#gsd-chatbot .gsd-chat-bubble a{color:#78511e;text-decoration:underline;font-weight:700}
#gsd-chatbot .gsd-chat-actions{display:flex;flex-wrap:wrap;gap:6px;padding:9px 12px;max-height:96px;overflow:auto;border-top:1px solid #eadcc9}
#gsd-chatbot .gsd-chat-actions button{border:1px solid #d7b989;border-radius:16px;background:white;padding:6px 9px;font-size:11px}
#gsd-chatbot .gsd-chat-actions button:hover{background:#fff0d4}
#gsd-chatbot .gsd-chat-compose{display:flex;gap:8px;padding:10px;border-top:1px solid #eadcc9;background:white}
#gsd-chatbot .gsd-chat-compose input{flex:1;min-width:0;padding:11px;border:1px solid #d8c9b7;border-radius:12px;font:inherit;outline-offset:2px}
#gsd-chatbot .gsd-chat-compose button{width:42px;border:0;border-radius:12px;background:#e5ad43;color:#241a13;font-size:19px;font-weight:bold}
#gsd-chatbot .gsd-chat-footer{padding:7px 12px;background:#fffaf3;text-align:center;font-size:11px}
#gsd-chatbot .gsd-chat-footer a{color:#78511e;font-weight:700;text-decoration:underline}
#gsd-chatbot .gsd-chat-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:600px){
 #gsd-chatbot{right:12px;bottom:90px}
 #gsd-chatbot .gsd-chat-launch{padding-right:12px;font-size:12px}
 #gsd-chatbot .gsd-chat-panel{right:0;bottom:61px;width:min(380px,calc(100vw - 24px));height:min(540px,calc(100dvh - 180px))}
}

/* V4 hologram visual layer; no external dependencies */
#gsd-chatbot .gsd-chat-avatar{position:relative;width:42px;height:42px;padding:2px;background:linear-gradient(135deg,#55d8ff,#3477ff 55%,#f3c06b);border:2px solid #75e7ff;box-shadow:0 0 0 3px #4ba8ff33,0 0 18px #48bbff88;animation:gsd-holo-float 3.5s ease-in-out infinite;overflow:visible}
#gsd-chatbot .gsd-chat-avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
#gsd-chatbot .gsd-chat-avatar:after{content:'';position:absolute;inset:-5px;border-radius:50%;border:1px solid #79dfff88;animation:gsd-holo-pulse 2.8s ease-in-out infinite;pointer-events:none}
#gsd-chatbot .gsd-chat-launch{background:linear-gradient(105deg,#091a37,#183a78);border:1px solid #5fb8ff;box-shadow:0 8px 30px #0007,0 0 15px #268aff66}
#gsd-chatbot .gsd-chat-launch:hover{filter:brightness(1.12)}
#gsd-chatbot .gsd-chat-panel{border:1px solid #6cc7ff;box-shadow:0 20px 60px #0006,0 0 20px #228bff44}
#gsd-chatbot .gsd-chat-head{background:linear-gradient(110deg,#081833,#173e79);border-bottom:1px solid #53b8ff}
#gsd-chatbot .gsd-chat-title small{color:#b8ddff}
#gsd-chatbot .gsd-online-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#39e69a;box-shadow:0 0 8px #39e69a;margin-right:5px}
#gsd-chatbot .gsd-chat-compose button{background:linear-gradient(130deg,#186cf6,#49bafc);color:white}
#gsd-chatbot .gsd-chat-typing{color:#2676db;letter-spacing:3px;animation:gsd-holo-pulse 1s ease-in-out infinite}
#gsd-chatbot .gsd-chat-bubble a{overflow-wrap:anywhere}
@keyframes gsd-holo-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@keyframes gsd-holo-pulse{0%,100%{opacity:.45;transform:scale(1)}50%{opacity:1;transform:scale(1.07)}}
@media(prefers-reduced-motion:reduce){#gsd-chatbot .gsd-chat-avatar,#gsd-chatbot .gsd-chat-avatar:after,#gsd-chatbot .gsd-chat-typing{animation:none!important}}

/* GSD v4.1: official full-body hologram showcase */
#gsd-chatbot .gsd-chat-launch{font-family:inherit;font-weight:700;font-size:13px;line-height:1.2}
#gsd-chatbot .gsd-chat-panel{height:min(620px,calc(100dvh - 185px))}
#gsd-chatbot .gsd-chat-head .gsd-chat-avatar{width:46px;height:46px;overflow:hidden}
#gsd-chatbot .gsd-chat-head .gsd-chat-avatar img,#gsd-chatbot .gsd-chat-launch .gsd-chat-avatar img{object-fit:cover;object-position:50% 24%}
#gsd-chatbot .gsd-holo-showcase{position:relative;flex:0 0 142px;height:142px;overflow:hidden;background:radial-gradient(ellipse at 50% 100%,#155de0 0%,#0b2451 48%,#071329 100%);border-bottom:1px solid #48baff;isolation:isolate}
#gsd-chatbot .gsd-holo-showcase img{position:absolute;z-index:2;left:50%;bottom:-76px;transform:translateX(-50%);height:230px;width:230px;object-fit:contain;object-position:center;filter:drop-shadow(0 0 14px #00baff88);animation:gsd-holo-person 4s ease-in-out infinite}
#gsd-chatbot .gsd-holo-halo{position:absolute;left:50%;top:45%;width:185px;height:100px;border:1px solid #5ccfff66;border-radius:50%;transform:translate(-50%,-50%) rotate(-18deg);box-shadow:0 0 22px #009cff77,inset 0 0 18px #36d4ff55;animation:gsd-holo-halo 5s linear infinite}
#gsd-chatbot .gsd-holo-caption{position:absolute;z-index:3;right:8px;bottom:7px;padding:4px 8px;border-radius:12px;background:#071a36bb;color:#d5efff;font-size:10px;letter-spacing:.1px}
@keyframes gsd-holo-person{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(-6px)}}
@keyframes gsd-holo-halo{0%,100%{opacity:.55;transform:translate(-50%,-50%) rotate(-18deg) scale(.95)}50%{opacity:1;transform:translate(-50%,-50%) rotate(18deg) scale(1.1)}}
@media(max-width:600px){#gsd-chatbot .gsd-chat-panel{height:min(570px,calc(100dvh - 180px))}#gsd-chatbot .gsd-holo-showcase{flex-basis:104px;height:104px}#gsd-chatbot .gsd-holo-showcase img{height:185px;width:185px;bottom:-69px}}
@media(max-height:650px){#gsd-chatbot .gsd-holo-showcase{display:none}}
@media(prefers-reduced-motion:reduce){#gsd-chatbot .gsd-holo-showcase img,#gsd-chatbot .gsd-holo-halo{animation:none}}

/* V4.2 Compact Hologram: keep avatar, prioritize readable conversation */
#gsd-chatbot .gsd-chat-panel{
  height:min(650px,calc(100dvh - 185px));
  min-height:0;
  display:none;
  flex-direction:column;
}
#gsd-chatbot.gsd-open .gsd-chat-panel{display:flex}
#gsd-chatbot .gsd-chat-head{flex:0 0 auto;padding:9px 11px}
#gsd-chatbot .gsd-chat-head .gsd-chat-avatar{width:38px;height:38px}
#gsd-chatbot .gsd-holo-showcase{
  flex:0 0 76px;height:76px;min-height:0;
  background:radial-gradient(ellipse at 60% 110%,#1d6de3,#0a1d41 65%,#071329);
}
#gsd-chatbot .gsd-holo-showcase img{
  width:152px;height:152px;bottom:-53px;left:50%;
  object-fit:contain;
}
#gsd-chatbot .gsd-holo-halo{width:130px;height:60px;top:58%}
#gsd-chatbot .gsd-holo-caption{font-size:9px;bottom:5px;right:7px;max-width:47%;text-align:right}
#gsd-chatbot .gsd-chat-language{flex:0 0 auto;padding:7px 10px;gap:6px}
#gsd-chatbot .gsd-chat-messages{
  flex:1 1 auto;min-height:100px;overflow-y:auto;overflow-x:hidden;
  overscroll-behavior:contain;padding:12px;
}
#gsd-chatbot .gsd-chat-actions{
  flex:0 0 auto;max-height:53px;overflow-x:auto;overflow-y:hidden;
  flex-wrap:nowrap;white-space:nowrap;padding:7px 10px;
  scrollbar-width:thin;
}
#gsd-chatbot .gsd-chat-actions button{flex:0 0 auto;padding:6px 9px}
#gsd-chatbot .gsd-chat-compose{flex:0 0 auto;padding:8px 9px;align-items:stretch}
#gsd-chatbot .gsd-chat-compose input{min-height:40px;padding:9px 10px}
#gsd-chatbot .gsd-chat-compose button{flex:0 0 40px;width:40px}
#gsd-chatbot .gsd-chat-footer{flex:0 0 auto;padding:5px 9px;font-size:10px}
@media(max-width:600px){
  #gsd-chatbot .gsd-chat-panel{height:min(650px,calc(100dvh - 165px));max-width:calc(100vw - 24px)}
  #gsd-chatbot .gsd-holo-showcase{flex-basis:62px;height:62px}
  #gsd-chatbot .gsd-holo-showcase img{width:128px;height:128px;bottom:-49px}
  #gsd-chatbot .gsd-chat-messages{min-height:85px}
}
@media(max-height:540px){
  #gsd-chatbot .gsd-holo-showcase{display:none}
  #gsd-chatbot .gsd-chat-actions{max-height:43px}
  #gsd-chatbot .gsd-chat-panel{height:calc(100dvh - 150px)}
}

/* v4.3 — iPhone Safari visual viewport and keyboard handling */
@media (max-width: 768px) {
  #gsd-chatbot, #gsd-chatbot * { box-sizing: border-box !important; }
  #gsd-chatbot .gsd-chat-panel {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    top: var(--gsd-vv-top, 10px) !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    height: var(--gsd-vv-height, calc(100dvh - 20px)) !important;
    max-height: var(--gsd-vv-height, calc(100dvh - 20px)) !important;
    min-height: 0 !important;
    transform: none !important;
    overflow: hidden !important;
    display: none;
    flex-direction: column !important;
  }
  #gsd-chatbot.gsd-open .gsd-chat-panel { display: flex !important; }
  #gsd-chatbot .gsd-chat-head,
  #gsd-chatbot .gsd-chat-langs,
  #gsd-chatbot .gsd-chat-actions,
  #gsd-chatbot .gsd-chat-compose,
  #gsd-chatbot .gsd-chat-footer { flex-shrink: 0 !important; }
  #gsd-chatbot .gsd-chat-messages {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  #gsd-chatbot .gsd-chat-compose input {
    font-size: 16px !important;
    line-height: 1.35 !important;
    min-width: 0 !important;
  }
  #gsd-chatbot .gsd-holo-showcase { flex: 0 0 58px !important; height: 58px !important; }
  #gsd-chatbot .gsd-holo-showcase img { height: 128px !important; width: 128px !important; bottom: -50px !important; }
  #gsd-chatbot.gsd-keyboard-open .gsd-holo-showcase,
  #gsd-chatbot.gsd-keyboard-open .gsd-chat-footer { display: none !important; }
  #gsd-chatbot.gsd-keyboard-open .gsd-chat-actions { max-height: 39px !important; }
}
