#yhsa-chat-root,#yhsa-chat-root *{box-sizing:border-box}
#yhsa-chat-root{--yhsa-main:#e86c12;position:fixed;right:22px;bottom:24px;z-index:2147483645;font-family:inherit;color:#20212a}
#yhsa-chat-root button,#yhsa-chat-root textarea{font:inherit}
#yhsa-chat-root .yhsa-launch{width:64px;height:64px;border-radius:50%;background:var(--yhsa-main);border:2px solid #fff;box-shadow:0 7px 24px #0003;color:#fff;cursor:pointer;font-weight:700;font-size:27px;display:flex;align-items:center;justify-content:center}
#yhsa-chat-root .yhsa-launch:focus-visible,#yhsa-chat-root button:focus-visible,#yhsa-chat-root textarea:focus-visible{outline:3px solid #1265cd;outline-offset:2px}
#yhsa-chat-root .yhsa-panel{width:min(390px,calc(100vw - 24px));max-height:calc(100dvh - 130px);background:#fff;border:1px solid #e5e5e5;border-radius:18px;box-shadow:0 15px 48px #0004;display:flex;flex-direction:column;overflow:hidden;position:absolute;bottom:75px;right:0}
#yhsa-chat-root .yhsa-panel[hidden]{display:none!important}
#yhsa-chat-root .yhsa-head{background:linear-gradient(115deg,#c65e18,#332a32);padding:14px 14px;color:#fff;display:flex;align-items:center;gap:9px;flex-shrink:0}
#yhsa-chat-root .yhsa-avatar{height:39px;width:39px;border-radius:12px;background:#fff4db;display:flex;align-items:center;justify-content:center;color:#bd4d12;font-size:22px}
#yhsa-chat-root .yhsa-title{font-weight:800;font-size:15px;line-height:1.35}
#yhsa-chat-root .yhsa-sub{opacity:.86;font-size:11px;margin-top:3px}
#yhsa-chat-root .yhsa-close{margin-left:auto;cursor:pointer;background:#ffffff30;border:0;border-radius:50%;color:#fff;font-size:20px;width:34px;height:34px}
#yhsa-chat-root .yhsa-log{background:#f6f7f9;overflow-y:auto;min-height:95px;max-height:320px;padding:13px;display:flex;flex-direction:column;gap:11px;scrollbar-width:thin}
#yhsa-chat-root .yhsa-bubble{padding:10px 12px;border-radius:14px;max-width:93%;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid #e5e7eb;background:#fff;align-self:flex-start}
#yhsa-chat-root .yhsa-bubble.yhsa-user{background:var(--yhsa-main);color:#fff;border-color:transparent;align-self:flex-end}
#yhsa-chat-root .yhsa-quick{display:flex;flex-wrap:wrap;gap:7px;padding:0 12px 11px;background:#f6f7f9}
#yhsa-chat-root .yhsa-quick button{background:#fff;border:1px solid #e5e5e5;padding:8px 11px;border-radius:25px;cursor:pointer;font-size:11px;color:#252525}
#yhsa-chat-root .yhsa-products{display:grid;gap:9px;max-width:97%}
#yhsa-chat-root .yhsa-product{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid #e1e4e8;border-radius:12px;padding:9px;text-decoration:none;color:#222}
#yhsa-chat-root .yhsa-product img{width:58px;height:58px;object-fit:contain;border-radius:6px;flex-shrink:0}
#yhsa-chat-root .yhsa-product strong{display:block;font-size:12px;line-height:1.3}
#yhsa-chat-root .yhsa-product small{display:block;color:#333;font-size:11px;margin-top:5px}
#yhsa-chat-root .yhsa-product .yhsa-price{color:#cb5d12;font-weight:700}
#yhsa-chat-root .yhsa-link{background:#fff4e7;color:#98400d;text-decoration:none;display:inline-flex;padding:6px 9px;border-radius:9px;font-weight:650;font-size:11px;max-width:95%;overflow-wrap:anywhere;border:1px solid #f3d5b9}
#yhsa-chat-root .yhsa-foot{display:flex;gap:7px;align-items:flex-end;padding:10px;background:#fff;border-top:1px solid #ececec}
#yhsa-chat-root .yhsa-input{resize:none;width:100%;min-height:39px;max-height:84px;border:1px solid #ddd;border-radius:23px;padding:9px 12px;font-size:13px;background:#fff;color:#111;outline:none}
#yhsa-chat-root .yhsa-send{border:0;background:var(--yhsa-main);color:#fff;border-radius:22px;padding:10px 13px;min-height:39px;cursor:pointer;font-size:13px;font-weight:700}
#yhsa-chat-root .yhsa-send:disabled{opacity:.55;cursor:wait}
#yhsa-chat-root .yhsa-note{background:#fff;color:#777;font-size:10px;padding:0 12px 8px}
@media(max-width:782px){#yhsa-chat-root{right:15px;bottom:89px}#yhsa-chat-root .yhsa-launch{width:55px;height:55px}#yhsa-chat-root .yhsa-panel{bottom:66px;width:min(385px,calc(100vw - 20px));max-height:calc(100dvh - 180px)}#yhsa-chat-root .yhsa-log{max-height:calc(100dvh - 380px)}}
@media(max-height:550px){#yhsa-chat-root .yhsa-panel{max-height:calc(100dvh - 90px)}#yhsa-chat-root .yhsa-log{max-height:calc(100dvh - 245px)}}
@media(prefers-reduced-motion:no-preference){#yhsa-chat-root .yhsa-launch{transition:transform .15s}#yhsa-chat-root .yhsa-launch:hover{transform:scale(1.05)}}

/* Yılmaz Asistan 1.5: non-overlapping and compact responsive layout. */
#yhsa-chat-root{right:22px;bottom:106px}
#yhsa-chat-root .yhsa-launch{width:56px;height:56px}
#yhsa-chat-root .yhsa-panel{
  bottom:66px;width:min(365px,calc(100vw - 42px));
  max-height:min(490px,calc(100dvh - 190px));overscroll-behavior:contain;
}
#yhsa-chat-root .yhsa-log{min-height:55px;max-height:290px;flex:1 1 auto;overscroll-behavior:contain}
#yhsa-chat-root .yhsa-quick{max-height:90px;flex:0 1 auto;overflow-y:auto}
#yhsa-chat-root .yhsa-head,#yhsa-chat-root .yhsa-foot,#yhsa-chat-root .yhsa-note{flex-shrink:0}
#yhsa-chat-root .yhsa-input{
  font-size:16px!important;line-height:1.35!important;min-width:0;
  -webkit-text-size-adjust:100%;text-size-adjust:100%;
}
#yhsa-chat-root .yhsa-send{flex:0 0 auto}
@media(max-width:782px){
  /* Bottom nav height 52px; up arrow covers 70–112px from bottom. */
  #yhsa-chat-root{bottom:calc(132px + env(safe-area-inset-bottom,0px))!important;right:16px!important}
  #yhsa-chat-root .yhsa-launch{width:50px;height:50px;font-size:23px}
  #yhsa-chat-root .yhsa-panel{
    bottom:61px;right:0;width:min(340px,calc(100vw - 42px));
    max-height:min(380px,calc(100dvh - 214px - env(safe-area-inset-bottom,0px)));
    border-radius:16px;
  }
  #yhsa-chat-root .yhsa-log{min-height:48px;max-height:215px;padding:10px}
  #yhsa-chat-root .yhsa-quick{max-height:70px;gap:5px;padding:0 9px 8px}
  #yhsa-chat-root .yhsa-quick button{padding:6px 9px}
  #yhsa-chat-root .yhsa-head{padding:10px}
  #yhsa-chat-root .yhsa-avatar{height:34px;width:34px;font-size:20px}
  #yhsa-chat-root .yhsa-foot{padding:8px}
  #yhsa-chat-root .yhsa-note{font-size:9px;padding:0 9px 7px}
  #yhsa-chat-root .yhsa-input{font-size:16px!important;min-height:42px}
}
@media(max-width:782px) and (max-height:560px){
  #yhsa-chat-root{bottom:calc(119px + env(safe-area-inset-bottom,0px))!important}
  #yhsa-chat-root .yhsa-panel{max-height:calc(100dvh - 186px - env(safe-area-inset-bottom,0px))}
  #yhsa-chat-root .yhsa-quick{max-height:48px}
}


/* 1.5.1 final mobile sizing: deliberately compact even on small phones. */
@media(max-width:782px){
 #yhsa-chat-root .yhsa-panel{
   max-height:min(340px,calc(100dvh - 214px - env(safe-area-inset-bottom,0px)));
 }
}
@media(max-width:782px) and (max-height:560px){
 #yhsa-chat-root{bottom:calc(132px + env(safe-area-inset-bottom,0px))!important}
 #yhsa-chat-root .yhsa-panel{
   max-height:min(300px,calc(100dvh - 210px - env(safe-area-inset-bottom,0px)));
 }
}
/* While assistant is open, park the theme back-to-top button; restore on close. */
@supports selector(body:has(#yhsa-chat-root .yhsa-panel:not([hidden]))){
 body:has(#yhsa-chat-root .yhsa-panel:not([hidden])) #yh-mobile-up-button-v2,
 body:has(#yhsa-chat-root .yhsa-panel:not([hidden])) .scroll-top{
   opacity:0!important;visibility:hidden!important;pointer-events:none!important;
 }
}

/* v1.5.2: compact, viewport-anchored mobile conversation.
   The theme bottom navigation is 52px high; keep it and its scroll-up button intact. */
#yhsa-chat-root.yhsa-is-open .yhsa-launch{display:none!important}
@media(max-width:782px){
 html body #yhsa-chat-root .yhsa-input{font-size:16px!important}
 html body #yhsa-chat-root.yhsa-is-open .yhsa-panel{
   position:fixed!important;left:12px!important;right:12px!important;
   bottom:calc(62px + env(safe-area-inset-bottom,0px))!important;
   width:calc(100vw - 24px)!important;
   max-width:355px!important;margin:0 auto!important;
   max-height:min(330px,calc(100dvh - 158px - env(safe-area-inset-bottom,0px)))!important;
   height:auto!important;min-height:0!important;overflow:hidden!important;
   border-radius:16px!important;
 }
 html body #yhsa-chat-root.yhsa-is-open .yhsa-log{min-height:0!important;max-height:none!important;flex:1 1 auto!important}
 html body #yhsa-chat-root.yhsa-is-open .yhsa-head{flex-shrink:0!important}
 html body #yhsa-chat-root.yhsa-is-open .yhsa-foot{flex-shrink:0!important}
 html body #yhsa-chat-root.yhsa-is-open .yhsa-note{flex-shrink:0!important}
 html body #yhsa-chat-root.yhsa-is-open .yhsa-quick{max-height:55px!important;overflow-y:auto!important}
}
@media(max-width:782px) and (max-height:480px){
 html body #yhsa-chat-root.yhsa-is-open .yhsa-panel{
  max-height:max(170px,calc(100dvh - 125px - env(safe-area-inset-bottom,0px)))!important;
  bottom:calc(56px + env(safe-area-inset-bottom,0px))!important;
 }
}

/* VisualViewport fallback when CSS viewport and visible viewport disagree. */
html body #yhsa-chat-root.yhsa-mobile.yhsa-is-open .yhsa-panel{
 position:fixed!important;left:12px!important;right:12px!important;
 bottom:calc(62px + env(safe-area-inset-bottom,0px))!important;
 width:calc(100vw - 24px)!important;max-width:355px!important;
 margin:0 auto!important;
 max-height:min(330px,calc(100dvh - 158px - env(safe-area-inset-bottom,0px)))!important;
 overflow:hidden!important;
}
html body #yhsa-chat-root.yhsa-mobile.yhsa-is-open .yhsa-log{
 min-height:0!important;max-height:none!important;flex:1 1 auto!important
}
