
#ygy-chat-root{--ygy-red:#981a27;--ygy-gold:#c9a15d;--ygy-cream:#fff8ed;position:fixed;right:18px;bottom:16px;z-index:2147482000;color:#3d2b27;font-family:Arial,"Segoe UI",sans-serif;font-size:13px;line-height:1.45;letter-spacing:normal}
#ygy-chat-root *,#ygy-chat-root *:before,#ygy-chat-root *:after{box-sizing:border-box}
#ygy-chat-root button,#ygy-chat-root input,#ygy-chat-root textarea{font-family:Arial,"Segoe UI",sans-serif!important;letter-spacing:normal!important;text-transform:none!important;line-height:1.45!important}
#ygy-chat-root button{cursor:pointer}
#ygy-chat-root .ygy-chat-toggle{display:flex;align-items:center;gap:9px;border:1px solid #dbb576;border-radius:99px;background:linear-gradient(135deg,#a91b2a,#7c1120);color:#fff9ef;padding:9px 14px;box-shadow:0 8px 24px #27080b50;font-size:13px;font-weight:700}
#ygy-chat-root .ygy-chat-toggle>span:first-child{font-size:17px;color:#f5d89f}
#ygy-chat-root .ygy-chat-dot{width:8px;height:8px;border-radius:50%;background:#7de4a1}
#ygy-chat-root .ygy-chat-panel{position:absolute;bottom:53px;right:0;width:min(350px,calc(100vw - 24px));height:min(450px,calc(100dvh - 82px));border:1px solid #cba76b;border-radius:17px;background:#fff8ed;box-shadow:0 18px 60px #230b0e55;overflow:hidden;display:flex;flex-direction:column}
#ygy-chat-root .ygy-chat-panel[hidden]{display:none}
#ygy-chat-root .ygy-chat-header{display:flex;align-items:center;gap:11px;flex-shrink:0;background:linear-gradient(115deg,#80131f,#ae2431);color:#fff;padding:10px 12px;min-height:65px}
#ygy-chat-root .ygy-chat-monogram{width:38px;height:38px;flex:none;border:1px solid #e4c58e;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:#bf2b32}
#ygy-chat-root .ygy-chat-monogram img{display:block;width:100%;height:100%;object-fit:contain}
#ygy-chat-root .ygy-chat-header>div:nth-child(2){min-width:0;flex:1}
#ygy-chat-root .ygy-chat-header strong{display:block;font-size:14px;font-weight:700;letter-spacing:.045em!important;color:#fff;line-height:1.3}
#ygy-chat-root .ygy-chat-header small{display:block;font-size:10px;line-height:1.4;color:#ffead0;margin-top:4px;letter-spacing:0}
#ygy-chat-root #ygy-chat-close{flex:none;margin-left:auto;padding:2px 5px;border:0;background:transparent;color:white;font-size:26px;line-height:1}
#ygy-chat-root .ygy-chat-intro{flex:none;text-align:center;font:italic 12px/1.4 Georgia,serif;color:#8f1420;padding:7px 6px;border-bottom:1px solid #e8dcc8}
#ygy-chat-root .ygy-chat-messages{flex:1;overflow-y:auto;min-height:85px;padding:11px;display:flex;flex-direction:column;gap:9px;scrollbar-width:thin}
#ygy-chat-root .ygy-chat-bubble{max-width:88%;padding:9px 11px;border-radius:12px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.5}
#ygy-chat-root .ygy-chat-bubble.agent{align-self:flex-start;background:#fff;border:1px solid #e6d9c5;border-bottom-left-radius:3px}
#ygy-chat-root .ygy-chat-bubble.visitor{align-self:flex-end;background:#8f1420;color:#fff;border-bottom-right-radius:3px}
#ygy-chat-root .ygy-chat-quick{flex:none;padding:6px 9px;display:flex;gap:5px;flex-wrap:wrap}
#ygy-chat-root .ygy-chat-quick button{font-size:11px;background:#fffaf1;color:#8f1420;border:1px solid #d9bc89;border-radius:20px;padding:5px 9px}
#ygy-chat-root .ygy-chat-form{flex:none;padding:8px 10px 9px;border-top:1px solid #e5d5bd;background:#fffaf3;margin:0}
#ygy-chat-root .ygy-chat-contact{display:flex;gap:7px;margin-bottom:8px}
#ygy-chat-root .ygy-chat-contact input{width:50%;height:35px;min-width:0;padding:8px 10px;border:1px solid #dfcdb4;border-radius:8px;background:#fff;color:#382721;font-size:11px}
#ygy-chat-root .ygy-chat-compose{display:flex;gap:8px;align-items:center}
#ygy-chat-root .ygy-chat-compose textarea{flex:1;width:auto;min-width:0;height:54px;min-height:54px;max-height:54px;resize:none;padding:10px;border:1px solid #dfcdb4;border-radius:9px;background:#fff;color:#382721;font-size:13px}
#ygy-chat-root .ygy-chat-compose button{width:38px;height:38px;flex:none;border:0;border-radius:50%;background:#951724;color:#fff;font-size:18px}
#ygy-chat-root .ygy-chat-feedback{font-size:11px;color:#8f1420}
#ygy-chat-root .ygy-chat-privacy{font:10px/1.4 Arial,sans-serif;color:#827367;margin:5px 0 0}
#ygy-chat-root input:focus,#ygy-chat-root textarea:focus{outline:2px solid #d6ad68;outline-offset:1px}
@media(max-width:480px){#ygy-chat-root{right:12px;bottom:12px}#ygy-chat-root .ygy-chat-panel{bottom:56px;height:min(450px,calc(100dvh - 78px))}#ygy-chat-root .ygy-chat-toggle{padding:10px 13px}#ygy-chat-root .ygy-chat-header strong{font-size:14px}}
@media(max-height:550px){#ygy-chat-root .ygy-chat-panel{height:calc(100dvh - 75px)}#ygy-chat-root .ygy-chat-intro{padding:5px}#ygy-chat-root .ygy-chat-contact input{height:34px}#ygy-chat-root .ygy-chat-compose textarea{height:48px;min-height:48px;max-height:48px}}

#ygy-chat-root .ygy-chat-bubble.system{align-self:flex-start;background:#fff4d9;color:#6d4a25;border:1px solid #e6c48d;border-bottom-left-radius:3px;font-style:italic}

/* V1.5: prevent theme typography/spacing from stretching the compact chat */
#ygy-chat-root .ygy-chat-panel{max-width:calc(100vw - 24px);max-height:calc(100dvh - 76px)}
#ygy-chat-root .ygy-chat-panel p,#ygy-chat-root .ygy-chat-panel small,#ygy-chat-root .ygy-chat-panel strong{letter-spacing:normal!important;text-transform:none!important}
#ygy-chat-root .ygy-chat-header strong{font-family:Arial,"Segoe UI",sans-serif!important;font-weight:700!important;white-space:nowrap}
#ygy-chat-root .ygy-chat-quick button{white-space:nowrap;font-weight:400!important}
#ygy-chat-root .ygy-chat-form input,#ygy-chat-root .ygy-chat-form textarea{box-shadow:none!important;margin:0!important}
@media(max-width:390px){#ygy-chat-root .ygy-chat-panel{width:calc(100vw - 24px)}#ygy-chat-root .ygy-chat-quick button{font-size:10px;padding:5px 7px}}


/* V1.5.1: fix Vietnamese glyph spacing and theme-forced oversized send button */
#ygy-chat-root .ygy-chat-intro{
  font-family:Arial,"Segoe UI",Tahoma,sans-serif!important;
  font-style:normal!important;
  font-weight:400!important;
  font-size:12px!important;
  line-height:1.55!important;
  letter-spacing:0!important;
  word-spacing:normal!important;
  text-transform:none!important;
  font-variant:normal!important;
  font-feature-settings:normal!important;
}
#ygy-chat-root .ygy-chat-panel,
#ygy-chat-root .ygy-chat-panel :is(div,span,p,strong,small,input,textarea,button){
  word-spacing:normal!important;
  font-variant:normal!important;
}
#ygy-chat-root .ygy-chat-compose{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:9px!important;
}
#ygy-chat-root .ygy-chat-compose textarea{
  flex:1 1 0%!important;
  width:0!important;
  min-width:0!important;
}
#ygy-chat-root .ygy-chat-compose button[type="submit"]{
  -webkit-appearance:none!important;
  appearance:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 40px!important;
  width:40px!important;
  min-width:40px!important;
  max-width:40px!important;
  height:40px!important;
  min-height:40px!important;
  max-height:40px!important;
  aspect-ratio:1/1!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:50%!important;
  line-height:1!important;
  text-align:center!important;
  vertical-align:middle!important;
  box-shadow:none!important;
  transform:none!important;
}
#ygy-chat-root .ygy-chat-compose button[type="submit"] svg{
  display:block!important;
  width:19px!important;
  height:19px!important;
  min-width:19px!important;
  min-height:19px!important;
  flex:none!important;
  margin:0!important;
  padding:0!important;
  transform:translateX(1px)!important;
  fill:none!important;
  stroke:none!important;
  color:#fff!important;
}
#ygy-chat-root .ygy-chat-compose button[type="submit"]:hover,
#ygy-chat-root .ygy-chat-compose button[type="submit"]:focus-visible{
  background:#7d1220!important;
}
