/* น้องขาม Chatbot — แยกสไตล์เฉพาะส่วน ไม่กระทบองค์ประกอบอื่นของเว็บไซต์ */
.chatbot-launcher{
  position:fixed;right:18px;bottom:14px;z-index:1200;border:0;background:transparent;
  padding:0;display:flex;align-items:center;gap:7px;cursor:pointer;font-family:'Sarabun',sans-serif;
  filter:drop-shadow(0 7px 13px #092c2026);transition:transform .25s ease;
}
.chatbot-launcher:hover{transform:translateY(-5px)}
.chatbot-launcher-greeting{
  position:absolute;right:76px;bottom:91px;width:max-content;max-width:min(270px,calc(100vw - 115px));
  padding:9px 13px;border:1px solid #f2d2a9;border-radius:15px 15px 4px 15px;
  background:#fffaf3;color:#75431d;font:600 13px/1.45 'Sarabun',sans-serif;
  box-shadow:0 5px 18px #552b171f;white-space:normal;text-align:left;
  animation:nongKhamHello .7s ease-out both;
}
.chatbot-launcher-greeting::after{
  content:"";position:absolute;right:13px;bottom:-6px;width:11px;height:11px;
  background:#fffaf3;border-right:1px solid #f2d2a9;border-bottom:1px solid #f2d2a9;
  transform:rotate(45deg);
}
.chatbot-mascot{position:relative;display:inline-grid;place-items:center;flex:0 0 auto;overflow:visible}
.chatbot-mascot-launcher{width:91px;height:108px;align-self:flex-end;transform-origin:bottom center;animation:nongKhamFloat 3s ease-in-out infinite}
.chatbot-mascot-image{display:none;width:100%;height:100%;object-fit:contain;object-position:center bottom;position:relative;z-index:1}
.chatbot-mascot-fallback{
  display:grid;place-items:center;width:67px;height:67px;border-radius:50%;
  background:linear-gradient(145deg,#fff,#e6f4ed);border:2px solid #c5e2d3;
  box-shadow:0 7px 18px #123d2b25;font-size:39px;
}
.chatbot-mascot.has-image .chatbot-mascot-image{display:block}
.chatbot-mascot.has-image .chatbot-mascot-fallback{display:none}
@keyframes nongKhamFloat{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-7px) rotate(2deg)}}
@keyframes nongKhamHello{0%{opacity:0;transform:translateY(8px) scale(.96)}100%{opacity:1;transform:translateY(0) scale(1)}}
.chatbot-launcher-greeting.is-changing{animation:nongKhamHello .35s ease-out both}

.chatbot-launcher:focus-visible,.chatbot-send:focus-visible,.chatbot-close:focus-visible{
  outline:3px solid #f3c969;outline-offset:4px;border-radius:12px
}
.chatbot-panel{
  position:fixed;right:22px;bottom:126px;z-index:1201;width:min(390px,calc(100vw - 28px));
  height:min(570px,calc(100dvh - 155px));display:none;flex-direction:column;background:#fff;
  border:1px solid #dce7e2;border-radius:18px;box-shadow:0 16px 48px #092c2033;
  overflow:hidden;font-family:'Sarabun',sans-serif;color:#20342d
}
.chatbot-panel.is-open{display:flex}
.chatbot-head{background:#145a45;color:#fff;padding:13px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.chatbot-head-title{display:flex;align-items:center;gap:10px;min-width:0}
.chatbot-avatar{width:47px;height:47px;border-radius:50%;background:#ffffff20;overflow:hidden}
.chatbot-avatar .chatbot-mascot-image{width:48px;height:55px;object-position:center bottom}
.chatbot-avatar .chatbot-mascot-fallback{width:38px;height:38px;font-size:24px;border:0;box-shadow:none}
.chatbot-head strong{display:block;font-size:16px}
.chatbot-head small{display:block;font-size:12px;opacity:.88;margin-top:2px}
.chatbot-close{background:transparent;border:0;color:#fff;font-size:26px;line-height:1;cursor:pointer;padding:4px 7px}
.chatbot-messages{padding:15px;overflow-y:auto;flex:1;background:#f6f9f7;display:flex;flex-direction:column;gap:12px}
.chatbot-message{max-width:92%;padding:10px 12px;border-radius:13px;font-size:14px;line-height:1.55;overflow-wrap:anywhere;white-space:pre-line}
.chatbot-message.bot{align-self:flex-start;background:#fff;border:1px solid #e2ebe6;border-top-left-radius:4px}
.chatbot-message.user{align-self:flex-end;background:#dff2e8;border-top-right-radius:4px}
.chatbot-quick{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.chatbot-quick button{border:1px solid #b9d8ca;border-radius:999px;padding:6px 10px;background:#fff;color:#145a45;font:500 12px 'Sarabun',sans-serif;cursor:pointer}
.chatbot-results{display:flex;flex-direction:column;gap:8px;margin-top:9px}
.chatbot-result{display:block;border:1px solid #e1ebe5;background:#fff;border-radius:10px;padding:9px 10px;color:#145a45;text-decoration:none}
.chatbot-result strong{display:block;font-size:13px}
.chatbot-result span{display:block;font-size:11px;color:#687b72;margin-top:2px}
.chatbot-input-row{display:flex;gap:8px;padding:12px;border-top:1px solid #e5ece8;background:#fff}
.chatbot-input{min-width:0;flex:1;border:1px solid #cbd9d1;border-radius:12px;padding:10px 12px;font:14px 'Sarabun',sans-serif;outline:none}
.chatbot-input:focus{border-color:#318368;box-shadow:0 0 0 3px #3183681a}
.chatbot-send{border:0;border-radius:12px;background:#145a45;color:#fff;padding:0 15px;font:600 14px 'Sarabun',sans-serif;cursor:pointer}
.chatbot-send:disabled{opacity:.55;cursor:wait}
.chatbot-note{font-size:11px;color:#75847c;padding:0 13px 9px;background:#fff}

@media(max-width:480px){
  .chatbot-launcher{right:9px;bottom:9px;gap:3px}
  .chatbot-launcher-greeting{right:62px;bottom:78px;max-width:calc(100vw - 100px);font-size:12px}
  .chatbot-mascot-launcher{width:75px;height:91px}
  .chatbot-mascot-fallback{width:58px;height:58px;font-size:34px}
  .chatbot-panel{right:8px;bottom:105px;width:calc(100vw - 16px);height:min(590px,calc(100dvh - 125px));border-radius:16px}
}
@media(prefers-reduced-motion:reduce){.chatbot-launcher,.chatbot-mascot-launcher,.chatbot-launcher-greeting{animation:none;transition:none}}
