/* น้องขนไก่ site assistant (2026-11-17). Requires motion-ui (mascot images). */
.bd-asst{position:fixed;right:18px;bottom:18px;z-index:950;font-size:14px}
.bd-asst-launch{display:block;border:0;background:none;padding:0;cursor:pointer;position:relative;border-radius:50%}
.bd-asst-launch img{width:78px;height:auto;display:block;filter:drop-shadow(0 8px 14px rgba(8,34,70,.28));animation:bdAsstBob 3s ease-in-out infinite}
.bd-asst-launch:focus-visible{outline:3px solid #4fb0ff;outline-offset:4px}
.bd-asst-launch .bd-asst-dot{position:absolute;right:6px;top:8px;width:22px;height:22px;border-radius:50%;background:var(--blue,#1769e0);color:#fff;display:grid;place-items:center;font-size:12px;box-shadow:0 0 0 3px #fff}
@keyframes bdAsstBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
.bd-asst-teaser{position:absolute;right:78px;bottom:46px;width:min(270px,calc(100vw - 110px));background:#fff;color:var(--ink,#17263b);border:1px solid var(--line,#e5ebf2);border-radius:16px 16px 4px 16px;padding:11px 30px 11px 13px;line-height:1.5;box-shadow:0 14px 32px rgba(8,34,70,.18);opacity:0;transform:translateY(12px);transition:opacity .35s,transform .4s cubic-bezier(.34,1.56,.64,1);pointer-events:none;cursor:pointer;font-size:13px}
.bd-asst-teaser.is-open{opacity:1;transform:none;pointer-events:auto}
.bd-asst-teaser b{display:block;color:var(--blue,#1769e0);font-size:12px;margin-bottom:2px}
.bd-asst-teaser small{display:block;color:var(--muted,#65758b);margin-top:4px;font-size:11px}
.bd-asst-x{position:absolute;top:3px;right:5px;border:0;background:none;font-size:18px;line-height:1;color:var(--muted,#65758b);cursor:pointer;padding:4px}
.bd-asst-panel{position:absolute;right:0;bottom:92px;width:min(390px,calc(100vw - 24px));height:min(600px,calc(100vh - 130px));background:#fff;border:1px solid var(--line,#e5ebf2);border-radius:20px;box-shadow:0 24px 60px rgba(8,34,70,.28);display:flex;flex-direction:column;overflow:hidden;opacity:0;transform:translateY(16px) scale(.97);transform-origin:bottom right;transition:opacity .22s,transform .28s cubic-bezier(.2,.7,.2,1);pointer-events:none;visibility:hidden}
.bd-asst.is-open .bd-asst-panel{opacity:1;transform:none;pointer-events:auto;visibility:visible}
.bd-asst.is-open .bd-asst-teaser{display:none}
.bd-asst-head{display:flex;align-items:center;gap:10px;padding:10px 12px;background:linear-gradient(120deg,#071b35,#124a8a);color:#fff}
.bd-asst-head img{width:38px;height:auto}
.bd-asst-head strong{display:block;font-family:'Kanit',sans-serif;font-size:16px;line-height:1.2}
.bd-asst-head span{font-size:11px;color:#cfdef2}
.bd-asst-close{margin-left:auto;border:0;background:#ffffff1f;color:#fff;width:34px;height:34px;border-radius:50%;font-size:20px;cursor:pointer}
.bd-asst-close:focus-visible{outline:2px solid #fff}
.bd-asst-log{flex:1;overflow-y:auto;padding:14px 12px 6px;background:#f6f9fd;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain}
.bd-asst-msg{max-width:88%;padding:9px 12px;border-radius:14px;line-height:1.55;white-space:pre-wrap;word-break:break-word;animation:bdAsstIn .25s ease both}
.bd-asst-msg.bot{background:#fff;border:1px solid var(--line,#e5ebf2);border-bottom-left-radius:4px;align-self:flex-start}
.bd-asst-msg.user{background:var(--blue,#1769e0);color:#fff;border-bottom-right-radius:4px;align-self:flex-end}
.bd-asst-msg .bd-asst-ai{display:inline-block;font-size:10px;color:var(--muted,#65758b);margin-top:4px}
@keyframes bdAsstIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.bd-asst-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 14px;background:#fff;border:1px solid var(--line,#e5ebf2);border-radius:14px}
.bd-asst-typing i{width:7px;height:7px;border-radius:50%;background:#9db3cf;animation:bdAsstDot 1s infinite}
.bd-asst-typing i:nth-child(2){animation-delay:.15s}.bd-asst-typing i:nth-child(3){animation-delay:.3s}
@keyframes bdAsstDot{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-4px)}}
.bd-asst-group{align-self:stretch;background:#fff;border:1px solid var(--line,#e5ebf2);border-radius:14px;padding:8px;animation:bdAsstIn .3s ease both}
.bd-asst-group h4{margin:2px 4px 6px;font-size:12px;color:var(--navy,#071b35);display:flex;justify-content:space-between;align-items:center}
.bd-asst-group h4 a{font-weight:500;color:var(--blue,#1769e0);text-decoration:none;font-size:12px}
.bd-asst-card{display:flex;gap:10px;align-items:center;padding:6px;border-radius:10px;color:inherit;text-decoration:none}
.bd-asst-card:hover,.bd-asst-card:focus-visible{background:#eef5ff;outline:none}
.bd-asst-thumb{width:56px;height:40px;border-radius:8px;flex:none;background:#e8eef6 center/cover no-repeat;display:grid;place-items:center;font-size:18px;overflow:hidden}
.bd-asst-thumb img{width:100%;height:100%;object-fit:cover}
.bd-asst-card b{display:block;font-size:13px;line-height:1.35;font-weight:600;color:var(--ink,#17263b);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bd-asst-card small{display:block;font-size:11px;color:var(--muted,#65758b);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px}
.bd-asst-badge{display:inline-block;font-size:10px;background:var(--sky,#eaf3ff);color:var(--blue,#1769e0);border-radius:6px;padding:1px 6px;margin-right:4px}
.bd-asst-ref{display:inline-block;font-size:10px;font-weight:700;color:#fff;background:var(--navy,#071b35);border-radius:5px;padding:0 5px;margin-right:4px}
.bd-asst-chips{display:flex;flex-wrap:wrap;gap:6px;align-self:stretch}
.bd-asst-chip{border:1px solid #cfe0f5;background:#fff;color:var(--navy,#071b35);border-radius:999px;padding:6px 11px;font-size:12px;cursor:pointer;text-decoration:none;font-family:inherit}
.bd-asst-chip:hover,.bd-asst-chip:focus-visible{background:var(--sky,#eaf3ff);border-color:var(--blue,#1769e0);outline:none}
.bd-asst-form{display:flex;gap:8px;padding:10px;border-top:1px solid var(--line,#e5ebf2);background:#fff}
.bd-asst-form input{flex:1;min-width:0;border:1px solid #cbd8e8;border-radius:12px;padding:10px 12px;font:inherit;font-size:16px}
.bd-asst-form input:focus{outline:2px solid #4fb0ff;border-color:transparent}
.bd-asst-form button{border:0;background:var(--blue,#1769e0);color:#fff;border-radius:12px;padding:0 14px;font:inherit;font-weight:600;cursor:pointer}
.bd-asst-form button[disabled]{opacity:.5;cursor:default}
.bd-asst-foot{font-size:10px;color:var(--muted,#65758b);text-align:center;padding:0 10px 8px;background:#fff}
.bd-asst-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
@media(max-width:680px){
  .bd-asst{right:10px;bottom:10px}
  .bd-asst-launch img{width:60px}
  .bd-asst-teaser{right:62px;bottom:34px;font-size:12px}
  .bd-asst-panel{position:fixed;left:0;right:0;bottom:0;width:100%;height:min(82vh,640px);border-radius:20px 20px 0 0;transform:translateY(100%);transform-origin:bottom center}
  .bd-asst.is-open .bd-asst-launch{visibility:hidden}
  .bd-asst-card small{max-width:60vw}
}
@media (prefers-reduced-motion:reduce){
  .bd-asst-launch img,.bd-asst-msg,.bd-asst-group,.bd-asst-typing i{animation:none!important}
  .bd-asst-panel,.bd-asst-teaser{transition:none!important}
}
@media print{.bd-asst{display:none!important}}
