.cubi-chat-root{
  position:fixed;right:24px;bottom:24px;z-index:999999;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  --cubi-ink:#0b2f3a;--cubi-muted:#58737b;--cubi-line:rgba(7,54,66,.12);
  --cubi-a:#12aeb8;--cubi-b:#087e8b;--cubi-c:#e9fbfc;--cubi-bg:#ffffff;
  color:var(--cubi-ink);
}
.cubi-chat-root *{box-sizing:border-box}
.cubi-launcher{
  border:0;background:rgba(255,255,255,.94);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  min-width:214px;height:72px;border-radius:999px;display:flex;align-items:center;gap:12px;padding:10px 16px 10px 10px;
  box-shadow:0 18px 55px rgba(8,47,58,.18),0 0 0 1px rgba(18,174,184,.12) inset;cursor:pointer;position:relative;
  transition:transform .22s ease,box-shadow .22s ease,opacity .2s ease;color:var(--cubi-ink);
}
.cubi-launcher:hover{transform:translateY(-3px);box-shadow:0 24px 70px rgba(8,47,58,.24),0 0 0 1px rgba(18,174,184,.2) inset}.cubi-chat-root:not(.cubi-is-closed) .cubi-launcher{opacity:0;pointer-events:none;transform:translateY(8px) scale(.96)}
.cubi-launcher-orb{width:52px;height:52px;display:grid;place-items:center;border-radius:999px;position:relative;flex:0 0 52px}.cubi-orb-core{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 35% 25%,#ffffff 0 22%,#dffbfc 23% 48%,#13b7c1 49% 72%,#087e8b 100%);box-shadow:0 12px 28px rgba(8,126,139,.28), inset 0 0 0 2px rgba(255,255,255,.8);animation:cubiFloat 3.8s ease-in-out infinite}.cubi-orb-pulse{position:absolute;inset:-5px;border-radius:50%;border:1px solid rgba(18,174,184,.36);animation:cubiPulse 2.6s ease-out infinite}.cubi-orb-face,.cubi-mini-face{width:29px;height:20px;border-radius:13px;background:#06232b;display:block;position:relative;box-shadow:inset 0 -3px 10px rgba(18,174,184,.18)}.cubi-orb-face i,.cubi-mini-face i{position:absolute;top:6px;width:5px;height:5px;border-radius:50%;background:#27f1f7;box-shadow:0 0 8px rgba(39,241,247,.8)}.cubi-orb-face i:first-child,.cubi-mini-face i:first-child{left:8px}.cubi-orb-face i:nth-child(2),.cubi-mini-face i:nth-child(2){right:8px}.cubi-orb-face b,.cubi-mini-face b{position:absolute;left:50%;bottom:5px;width:11px;height:5px;border-bottom:2px solid #27f1f7;border-radius:0 0 12px 12px;transform:translateX(-50%)}.cubi-launcher-copy{text-align:left;line-height:1.1}.cubi-launcher-copy strong{display:block;font-size:15px;letter-spacing:.1px}.cubi-launcher-copy small{display:block;margin-top:4px;color:var(--cubi-muted);font-size:12px;font-weight:500}.cubi-launcher:after{content:"";position:absolute;right:13px;top:12px;width:10px;height:10px;border-radius:50%;background:#22c77a;border:2px solid #fff;box-shadow:0 0 0 5px rgba(34,199,122,.14)}
.cubi-proactive-bubble{position:absolute;right:0;bottom:84px;width:276px;border:1px solid var(--cubi-line);border-radius:20px;background:rgba(255,255,255,.96);box-shadow:0 20px 50px rgba(8,47,58,.16);padding:14px 16px;line-height:1.35;opacity:0;transform:translateY(8px);pointer-events:none;animation:cubiBubble 10s ease 1.1s both}.cubi-chat-root:not(.cubi-is-closed) .cubi-proactive-bubble{display:none}.cubi-proactive-bubble strong{display:block;font-size:13px;color:var(--cubi-ink);margin-bottom:4px}.cubi-proactive-bubble span{font-size:12.5px;color:var(--cubi-muted)}
.cubi-chat-panel{position:absolute;right:0;bottom:0;width:390px;max-width:calc(100vw - 32px);height:610px;max-height:calc(100vh - 48px);background:#fff;border:1px solid var(--cubi-line);border-radius:28px;box-shadow:0 30px 90px rgba(8,47,58,.26);overflow:hidden;display:flex;flex-direction:column;transform-origin:bottom right;animation:cubiPanelIn .22s ease-out}.cubi-chat-panel[hidden]{display:none}.cubi-chat-header{padding:18px 18px 16px;background:linear-gradient(135deg,#f9ffff 0%,#e8fbfc 100%);border-bottom:1px solid rgba(18,174,184,.14);display:flex;align-items:center;justify-content:space-between}.cubi-chat-brand{display:flex;gap:12px;align-items:center;min-width:0}.cubi-brand-orb{width:44px;height:44px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(145deg,#fff,#ddf8fa);box-shadow:0 12px 26px rgba(8,126,139,.15),inset 0 0 0 1px rgba(18,174,184,.12)}.cubi-mini-face{transform:scale(.88)}.cubi-chat-brand strong{display:block;font-size:17px;line-height:1.05;letter-spacing:.15px}.cubi-chat-brand span{display:block;color:var(--cubi-muted);font-size:12px;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cubi-close{border:0;width:38px;height:38px;border-radius:14px;background:rgba(7,54,66,.06);color:var(--cubi-ink);font-size:24px;line-height:36px;cursor:pointer;transition:background .18s ease,transform .18s ease}.cubi-close:hover{background:rgba(7,54,66,.11);transform:rotate(3deg)}
.cubi-chat-messages{flex:1;min-height:0;overflow:auto;padding:16px;background:linear-gradient(180deg,#ffffff 0%,#f8fdfe 100%)}.cubi-concierge-card{border:1px solid rgba(18,174,184,.14);background:linear-gradient(180deg,#ffffff,#f1fbfc);border-radius:22px;padding:18px 17px;box-shadow:0 14px 36px rgba(8,47,58,.08);margin-bottom:12px}.cubi-card-eyebrow{font-size:12px;font-weight:700;color:#087e8b;display:flex;align-items:center;gap:7px;margin-bottom:9px}.cubi-card-eyebrow span{width:8px;height:8px;border-radius:50%;background:#22c77a;box-shadow:0 0 0 5px rgba(34,199,122,.12)}.cubi-concierge-card h3{margin:0 0 8px;font-size:18px;line-height:1.24;color:var(--cubi-ink)}.cubi-concierge-card p{margin:0;color:#4d6a72;font-size:13.5px;line-height:1.55}.cubi-msg{max-width:88%;padding:12px 14px;border-radius:18px;margin:0 0 10px;font-size:14px;line-height:1.5;white-space:pre-wrap;box-sizing:border-box}.cubi-msg-bot{background:#eefbfc;color:#153941;border:1px solid rgba(18,174,184,.12);border-top-left-radius:7px}.cubi-msg-user{background:linear-gradient(135deg,#13aeb8,#087e8b);color:#fff;margin-left:auto;border-top-right-radius:7px;box-shadow:0 8px 20px rgba(8,126,139,.16)}.cubi-msg-system{background:#fff8e8;color:#735105;border:1px solid #ffe2a8;margin-left:auto;margin-right:auto;text-align:center;font-size:12px;padding:8px 11px;border-radius:999px}.cubi-chat-quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:12px 0 0}.cubi-chat-quick-actions button{text-align:left;border:1px solid rgba(18,174,184,.18);background:#fff;color:var(--cubi-ink);border-radius:18px;padding:12px 13px;cursor:pointer;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease;min-height:66px}.cubi-chat-quick-actions button:hover{background:#f4fcfd;border-color:rgba(18,174,184,.38);box-shadow:0 10px 24px rgba(8,47,58,.08);transform:translateY(-1px)}.cubi-chat-quick-actions span{display:block;font-size:12.7px;font-weight:800;margin-bottom:4px;color:#087e8b;line-height:1.25}.cubi-chat-quick-actions small{display:block;font-size:11.5px;line-height:1.25;color:#627b82;font-weight:500}
.cubi-chat-form{padding:14px 16px 13px;background:#fff;border-top:1px solid var(--cubi-line)}.cubi-name-row input,.cubi-chat-input-row input{width:100%;height:42px;border:1px solid rgba(7,54,66,.14);border-radius:14px;padding:0 13px;outline:none;background:#fff;color:var(--cubi-ink);font-size:14px;box-shadow:0 1px 0 rgba(8,47,58,.03)}.cubi-name-row input:focus,.cubi-chat-input-row input:focus{border-color:#13b7c1;box-shadow:0 0 0 4px rgba(18,174,184,.12)}.cubi-name-row{margin-bottom:9px}.cubi-chat-input-row{display:flex;gap:9px;align-items:stretch}.cubi-chat-input-row input{height:48px;min-width:0;flex:1}.cubi-chat-input-row button{height:48px;border:0;border-radius:16px;padding:0 15px;min-width:104px;display:flex;gap:8px;align-items:center;justify-content:center;background:linear-gradient(135deg,#13b7c1,#087e8b);color:#fff;font-weight:800;cursor:pointer;box-shadow:0 12px 24px rgba(8,126,139,.23);transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease}.cubi-chat-input-row button:hover{transform:translateY(-1px);box-shadow:0 16px 30px rgba(8,126,139,.28)}.cubi-chat-input-row button:disabled{opacity:.65;cursor:not-allowed;transform:none}.cubi-chat-input-row svg{width:16px;height:16px}.cubi-chat-footer{padding:0 16px 14px;background:#fff;color:#70888e;font-size:11px;text-align:center;line-height:1.35}
@keyframes cubiFloat{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-3px) rotate(1deg)}}@keyframes cubiPulse{0%{transform:scale(.9);opacity:.75}80%{transform:scale(1.34);opacity:0}100%{transform:scale(1.34);opacity:0}}@keyframes cubiBubble{0%{opacity:0;transform:translateY(8px)}12%,72%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(8px)}}@keyframes cubiPanelIn{from{opacity:0;transform:translateY(12px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@media (max-width:600px){.cubi-chat-root{right:14px;bottom:14px}.cubi-launcher{min-width:64px;width:64px;height:64px;padding:8px}.cubi-launcher-copy{display:none}.cubi-launcher-orb{width:48px;height:48px;flex-basis:48px}.cubi-orb-core{width:46px;height:46px}.cubi-proactive-bubble{right:0;bottom:78px;width:238px}.cubi-chat-panel{right:0;bottom:0;width:calc(100vw - 28px);height:min(604px,calc(100vh - 28px));max-height:calc(100vh - 28px);border-radius:26px}.cubi-chat-header{padding:16px}.cubi-chat-quick-actions{grid-template-columns:1fr}.cubi-chat-input-row button{min-width:52px;width:52px;padding:0}.cubi-chat-input-row button span{display:none}.cubi-chat-input-row svg{width:18px;height:18px}}
@media (max-width:380px){.cubi-chat-panel{width:calc(100vw - 18px);right:-5px}.cubi-proactive-bubble{display:none}.cubi-concierge-card h3{font-size:18px}}

/* v1.5.1 professional launcher and typing refinement */
.cubi-launcher{
  min-width:248px;height:78px;padding:10px 18px 10px 10px;
  background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(235,252,253,.96));
  border:1px solid rgba(18,174,184,.18);
  box-shadow:0 22px 64px rgba(8,47,58,.20),0 0 0 1px rgba(255,255,255,.7) inset;
}
.cubi-launcher:before{
  content:"";position:absolute;inset:-8px;border-radius:999px;z-index:-1;
  background:radial-gradient(circle at 20% 50%,rgba(39,241,247,.28),transparent 42%),radial-gradient(circle at 84% 50%,rgba(8,126,139,.16),transparent 46%);
  filter:blur(10px);opacity:.9;animation:cubiAura 4.8s ease-in-out infinite;
}
.cubi-launcher-orb{width:58px;height:58px;flex-basis:58px;}
.cubi-orb-core{width:56px;height:56px;background:radial-gradient(circle at 32% 24%,#fff 0 19%,#e9ffff 20% 37%,#38eef4 38% 55%,#11aeb9 56% 76%,#065d69 100%);box-shadow:0 14px 34px rgba(8,126,139,.34),inset 0 0 0 3px rgba(255,255,255,.86),inset 0 -10px 24px rgba(6,35,43,.18);}
.cubi-orb-pulse{inset:-8px;border:2px solid rgba(39,241,247,.36);box-shadow:0 0 22px rgba(39,241,247,.22)}
.cubi-orb-face{width:34px;height:23px;border-radius:16px;background:linear-gradient(180deg,#07313a,#04181d);}
.cubi-orb-face i:first-child{left:9px}.cubi-orb-face i:nth-child(2){right:9px}.cubi-orb-face i{top:7px;width:6px;height:6px}.cubi-orb-face b{bottom:6px;width:13px;height:6px}
.cubi-launcher-copy strong{font-size:16px}.cubi-launcher-copy small{font-size:12.2px;color:#4b6e76}.cubi-launcher:after{right:18px;top:14px;width:11px;height:11px;background:#2be589;box-shadow:0 0 0 5px rgba(43,229,137,.16),0 0 16px rgba(43,229,137,.8)}
.cubi-brand-orb{width:50px;height:50px;border-radius:19px;background:radial-gradient(circle at 35% 25%,#fff 0 25%,#ddfbfc 26% 54%,#aaf5f8 55% 100%);box-shadow:0 16px 34px rgba(8,126,139,.18),inset 0 0 0 1px rgba(18,174,184,.16)}
.cubi-mini-face{width:31px;height:22px;border-radius:15px;background:linear-gradient(180deg,#07313a,#04181d);box-shadow:0 0 0 6px rgba(18,174,184,.08)}
.cubi-msg-system.cubi-typing{display:flex;align-items:center;gap:4px;width:max-content;max-width:88%;background:#eefbfc;color:#3f6870;border:1px solid rgba(18,174,184,.16);font-size:12.3px;padding:8px 12px;margin-left:0;margin-right:auto;text-align:left;border-radius:999px;}
.cubi-msg-system.cubi-typing span{margin-right:4px}.cubi-msg-system.cubi-typing i{width:5px;height:5px;border-radius:50%;background:#12aeb8;opacity:.35;animation:cubiTypingDots 1.05s ease-in-out infinite}.cubi-msg-system.cubi-typing i:nth-child(3){animation-delay:.15s}.cubi-msg-system.cubi-typing i:nth-child(4){animation-delay:.3s}
@keyframes cubiAura{0%,100%{opacity:.68;transform:scale(.98)}50%{opacity:1;transform:scale(1.03)}}
@keyframes cubiTypingDots{0%,80%,100%{transform:translateY(0);opacity:.35}40%{transform:translateY(-3px);opacity:1}}
@media (max-width:600px){.cubi-launcher{min-width:70px;width:70px;height:70px;padding:7px}.cubi-launcher-orb{width:56px;height:56px;flex-basis:56px}.cubi-orb-core{width:54px;height:54px}.cubi-launcher:after{right:9px;top:8px}.cubi-brand-orb{width:46px;height:46px}}

/* v1.6.0 conversational contact capture: appears only after intent is clear */
.cubi-contact-card{
  max-width:94%;margin:12px 0 12px;background:linear-gradient(180deg,#ffffff,#f4fdfe);
  border:1px solid rgba(18,174,184,.18);border-radius:22px;padding:15px;
  box-shadow:0 14px 34px rgba(8,47,58,.08);animation:cubiPanelIn .2s ease-out;
}
.cubi-contact-title{font-size:14px;font-weight:800;color:#0b2f3a;margin-bottom:6px;line-height:1.25}
.cubi-contact-card p{margin:0 0 12px;color:#56737a;font-size:13px;line-height:1.45}
.cubi-contact-grid{display:grid;grid-template-columns:1fr;gap:8px;margin-bottom:10px}
.cubi-contact-grid input{width:100%;height:42px;border:1px solid rgba(7,54,66,.14);border-radius:14px;padding:0 13px;outline:none;background:#fff;color:#0b2f3a;font-size:14px;box-shadow:0 1px 0 rgba(8,47,58,.03)}
.cubi-contact-grid input:focus{border-color:#13b7c1;box-shadow:0 0 0 4px rgba(18,174,184,.12)}
.cubi-contact-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.cubi-contact-actions button{border:0;border-radius:14px;height:40px;padding:0 13px;cursor:pointer;font-weight:800;font-size:12.5px;transition:transform .18s ease,opacity .18s ease,box-shadow .18s ease}
.cubi-contact-save{background:linear-gradient(135deg,#13b7c1,#087e8b);color:#fff;box-shadow:0 10px 22px rgba(8,126,139,.2)}
.cubi-contact-save:hover{transform:translateY(-1px);box-shadow:0 14px 28px rgba(8,126,139,.26)}
.cubi-contact-later{background:#eef8f9;color:#4a6b72}
.cubi-contact-actions button:disabled{opacity:.65;cursor:not-allowed;transform:none}
@media (max-width:600px){.cubi-contact-card{max-width:100%;padding:14px}.cubi-contact-actions button{flex:1 1 auto}}

/* v1.8.0 smart patient portal intent */
.cubi-patient-card{
  max-width:94%;margin:12px 0 12px;background:linear-gradient(180deg,#ffffff,#f3fcfd);
  border:1px solid rgba(18,174,184,.20);border-radius:22px;padding:15px;
  box-shadow:0 14px 34px rgba(8,47,58,.08);animation:cubiPanelIn .2s ease-out;
}
.cubi-patient-save{background:linear-gradient(135deg,#13b7c1,#087e8b);color:#fff;box-shadow:0 10px 22px rgba(8,126,139,.2)}
.cubi-patient-later{background:#eef8f9;color:#4a6b72}
.cubi-secure-note{display:block;margin-top:8px;color:#6d858b;font-size:11px;line-height:1.35}
@media (max-width:600px){.cubi-patient-card{max-width:100%;padding:14px}}


.cubi-msg-actions{
  display:flex;
  justify-content:flex-start;
  margin:8px 0 12px;
}
.cubi-portal-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:11px 16px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--cubi-a),var(--cubi-b));
  color:#fff!important;
  text-decoration:none!important;
  font-weight:800;
  font-size:13px;
  box-shadow:0 12px 28px rgba(8,126,139,.24);
  transition:transform .18s ease, box-shadow .18s ease;
}
.cubi-portal-action:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 34px rgba(8,126,139,.30);
}
.cubi-portal-action:after{
  content:'›';
  font-size:18px;
  line-height:1;
  margin-top:-1px;
}

/* v2.6.0 PRO CHAT UI - ChatGPT benzeri profesyonel sohbet alanı */
.cubi-chat-panel{
  width:min(560px, calc(100vw - 36px));
  height:min(760px, calc(100vh - 42px));
  border-radius:30px;
  box-shadow:0 34px 110px rgba(8,47,58,.30);
}
.cubi-chat-header{
  flex:0 0 auto;
  padding:18px 20px;
}
.cubi-chat-messages{
  padding:20px 20px 18px;
  scroll-behavior:smooth;
  background:linear-gradient(180deg,#fbfeff 0%,#f7fcfd 100%);
}
.cubi-msg{
  max-width:92%;
  width:auto;
  padding:14px 16px;
  margin:0 0 13px;
  border-radius:20px;
  font-size:14.5px;
  line-height:1.68;
  white-space:pre-line;
  overflow-wrap:anywhere;
  word-break:normal;
}
.cubi-msg-bot{
  background:#f1fbfc;
  color:#153941;
  border:1px solid rgba(18,174,184,.16);
  border-top-left-radius:9px;
  box-shadow:0 8px 24px rgba(8,47,58,.06);
}
.cubi-msg-user{
  max-width:84%;
  border-top-right-radius:9px;
  line-height:1.5;
}
.cubi-msg-system.cubi-typing{
  padding:10px 14px;
  font-size:12.5px;
}
.cubi-concierge-card{
  margin-bottom:14px;
}
.cubi-chat-quick-actions{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.cubi-chat-form{
  flex:0 0 auto;
  padding:14px 18px 12px;
  background:rgba(255,255,255,.98);
}
.cubi-chat-input-row{
  align-items:flex-end;
  gap:10px;
}
.cubi-chat-input-row textarea#cubi-chat-input{
  width:100%;
  min-height:50px;
  max-height:132px;
  resize:none;
  overflow:auto;
  border:1px solid rgba(7,54,66,.14);
  border-radius:18px;
  padding:14px 15px;
  outline:none;
  background:#fff;
  color:var(--cubi-ink);
  font-family:inherit;
  font-size:14.5px;
  line-height:1.45;
  box-shadow:0 1px 0 rgba(8,47,58,.03);
}
.cubi-chat-input-row textarea#cubi-chat-input:focus{
  border-color:#13b7c1;
  box-shadow:0 0 0 4px rgba(18,174,184,.12);
}
.cubi-chat-input-row button{
  height:50px;
  min-width:112px;
  border-radius:18px;
  flex:0 0 auto;
}
.cubi-chat-footer{
  padding:0 18px 16px;
}
.cubi-msg-actions{
  gap:8px;
  flex-wrap:wrap;
  margin:4px 0 14px;
}
.cubi-portal-action{
  min-height:44px;
  padding:11px 17px;
  font-size:13.2px;
}
.cubi-contact-card,.cubi-patient-card{
  max-width:92%;
  padding:17px;
  border-radius:22px;
}
@media (max-width:760px){
  .cubi-chat-root{right:12px;bottom:12px;left:12px;}
  .cubi-chat-panel{
    right:0;
    bottom:0;
    width:100%;
    max-width:100%;
    height:min(720px, calc(100dvh - 24px));
    max-height:calc(100dvh - 24px);
    border-radius:28px;
  }
}
@media (max-width:600px){
  .cubi-chat-root{right:0;bottom:0;left:0;}
  .cubi-chat-panel{
    width:100vw;
    height:100dvh;
    max-height:100dvh;
    border-radius:0;
    border-left:0;border-right:0;border-bottom:0;
  }
  .cubi-chat-messages{padding:16px 14px 14px;}
  .cubi-msg{max-width:94%;font-size:14px;line-height:1.62;padding:13px 14px;}
  .cubi-msg-user{max-width:88%;}
  .cubi-chat-header{padding:15px 16px;}
  .cubi-chat-form{padding:12px 12px 10px;}
  .cubi-chat-input-row textarea#cubi-chat-input{min-height:48px;max-height:118px;border-radius:16px;padding:13px 14px;}
  .cubi-chat-input-row button{height:48px;min-width:54px;width:54px;padding:0;border-radius:16px;}
  .cubi-chat-input-row button span{display:none;}
  .cubi-chat-footer{padding:0 12px 12px;font-size:10.7px;}
}


/* v2.7.0 input polish */
.cubi-chat-input-row textarea#cubi-chat-input{overflow-y:auto;scrollbar-width:none;}
.cubi-chat-input-row textarea#cubi-chat-input::-webkit-scrollbar{width:0;height:0;}
.cubi-msg-actions .cubi-portal-action{white-space:normal;text-align:center;}

/* v2.8.1 RESPONSIVE UI HOTFIX - tüm cihazlarda stabil chat paneli */
html.cubi-chat-lock,
body.cubi-chat-lock{
  overflow:hidden!important;
  overscroll-behavior:none!important;
  touch-action:none;
}
.cubi-chat-root{
  max-width:none!important;
}
.cubi-chat-panel,
.cubi-chat-panel *{
  -webkit-tap-highlight-color:transparent;
}
.cubi-chat-messages{
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
}
.cubi-msg{
  overflow-wrap:break-word;
  word-break:normal;
  hyphens:auto;
}
.cubi-concierge-card h3{
  word-spacing:normal!important;
  letter-spacing:-.01em;
}
.cubi-chat-input-row textarea#cubi-chat-input{
  display:block;
  flex:1 1 auto;
  min-width:0;
  appearance:none;
  -webkit-appearance:none;
}
.cubi-chat-input-row button{
  flex:0 0 auto;
}

@media (min-width: 761px){
  .cubi-chat-root{right:24px!important;bottom:24px!important;left:auto!important;top:auto!important;}
  .cubi-chat-panel{width:min(560px, calc(100vw - 48px));height:min(760px, calc(100vh - 56px));}
}

@media (max-width: 760px){
  .cubi-chat-root.cubi-is-open{
    top:0!important;
    right:0!important;
    bottom:0!important;
    left:0!important;
    width:100vw!important;
    height:100vh!important;
    height:100svh!important;
    pointer-events:none;
  }
  .cubi-chat-root.cubi-is-open .cubi-chat-panel,
  .cubi-chat-root.cubi-is-open .cubi-close,
  .cubi-chat-root.cubi-is-closed .cubi-launcher,
  .cubi-chat-root.cubi-is-closed .cubi-proactive-bubble{
    pointer-events:auto;
  }
  .cubi-chat-root.cubi-is-closed{
    left:auto!important;
    top:auto!important;
    right:max(14px, env(safe-area-inset-right))!important;
    bottom:max(14px, env(safe-area-inset-bottom))!important;
    width:auto!important;
    height:auto!important;
  }
  .cubi-chat-panel{
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    max-width:100vw!important;
    height:100vh!important;
    height:100svh!important;
    max-height:100svh!important;
    border-radius:0!important;
    border:0!important;
    box-shadow:none!important;
    display:flex!important;
    flex-direction:column!important;
  }
  @supports (height: 100dvh){
    .cubi-chat-panel,
    .cubi-chat-root.cubi-is-open{
      height:100dvh!important;
      max-height:100dvh!important;
    }
  }
  .cubi-chat-header{
    padding:calc(12px + env(safe-area-inset-top)) 14px 12px!important;
    min-height:72px;
  }
  .cubi-chat-brand{gap:10px;}
  .cubi-chat-brand strong{font-size:16px;}
  .cubi-chat-brand span{font-size:11.5px;max-width:calc(100vw - 150px);}
  .cubi-brand-orb{width:44px!important;height:44px!important;border-radius:16px!important;}
  .cubi-close{width:42px!important;height:42px!important;border-radius:16px!important;line-height:40px!important;}
  .cubi-chat-messages{
    flex:1 1 auto!important;
    min-height:0!important;
    padding:14px 12px 12px!important;
  }
  .cubi-concierge-card{
    padding:14px!important;
    border-radius:18px!important;
    margin-bottom:10px!important;
  }
  .cubi-card-eyebrow{font-size:11.5px;margin-bottom:7px;}
  .cubi-concierge-card h3{font-size:16px!important;line-height:1.32!important;margin-bottom:6px!important;}
  .cubi-concierge-card p{font-size:13px!important;line-height:1.48!important;}
  .cubi-chat-quick-actions{
    grid-template-columns:1fr!important;
    gap:8px!important;
    margin-top:10px!important;
  }
  .cubi-chat-quick-actions button{
    min-height:54px!important;
    border-radius:16px!important;
    padding:10px 12px!important;
    display:grid!important;
    grid-template-columns:1fr auto!important;
    column-gap:10px!important;
    align-items:center!important;
  }
  .cubi-chat-quick-actions span{font-size:12.5px!important;margin:0!important;line-height:1.25!important;}
  .cubi-chat-quick-actions small{font-size:11.2px!important;line-height:1.25!important;text-align:right!important;max-width:142px;}
  .cubi-msg{
    max-width:94%!important;
    padding:12px 13px!important;
    margin-bottom:10px!important;
    border-radius:17px!important;
    font-size:13.6px!important;
    line-height:1.58!important;
  }
  .cubi-msg-user{max-width:88%!important;}
  .cubi-msg-actions{margin:2px 0 12px!important;}
  .cubi-portal-action{min-height:40px!important;padding:10px 14px!important;font-size:12.7px!important;}
  .cubi-contact-card,.cubi-patient-card{max-width:100%!important;border-radius:18px!important;padding:14px!important;}
  .cubi-chat-form{
    padding:10px 10px calc(8px + env(safe-area-inset-bottom))!important;
    border-top:1px solid rgba(7,54,66,.10)!important;
  }
  .cubi-chat-input-row{gap:8px!important;align-items:flex-end!important;}
  .cubi-chat-input-row textarea#cubi-chat-input{
    min-height:46px!important;
    max-height:96px!important;
    padding:12px 13px!important;
    border-radius:16px!important;
    font-size:16px!important; /* iOS zoom engeli */
    line-height:1.35!important;
  }
  .cubi-chat-input-row button{
    width:50px!important;
    min-width:50px!important;
    height:46px!important;
    border-radius:16px!important;
    padding:0!important;
  }
  .cubi-chat-input-row button span{display:none!important;}
  .cubi-chat-input-row button svg{width:18px!important;height:18px!important;}
  .cubi-chat-footer{
    padding:0 12px calc(10px + env(safe-area-inset-bottom))!important;
    font-size:10.5px!important;
    line-height:1.35!important;
  }
  .cubi-proactive-bubble{
    right:0!important;
    left:auto!important;
    bottom:76px!important;
    width:min(292px, calc(100vw - 92px))!important;
    border-radius:18px!important;
    padding:12px 14px!important;
  }
}

@media (max-width: 380px){
  .cubi-chat-brand span{display:none!important;}
  .cubi-chat-quick-actions button{
    grid-template-columns:1fr!important;
    min-height:58px!important;
  }
  .cubi-chat-quick-actions small{text-align:left!important;max-width:none!important;margin-top:3px;}
  .cubi-msg{max-width:96%!important;font-size:13.3px!important;}
  .cubi-msg-user{max-width:92%!important;}
}

@media (orientation: landscape) and (max-height: 520px){
  .cubi-chat-header{min-height:58px!important;padding:8px 12px!important;}
  .cubi-brand-orb{width:38px!important;height:38px!important;}
  .cubi-chat-brand span{display:none!important;}
  .cubi-concierge-card{display:none!important;}
  .cubi-chat-quick-actions{display:none!important;}
  .cubi-chat-messages{padding:10px!important;}
  .cubi-chat-form{padding:8px 10px!important;}
  .cubi-chat-footer{display:none!important;}
}
@media (max-width: 760px){
  .cubi-chat-root.cubi-is-open,
  .cubi-chat-panel{
    height:var(--cubi-vh, 100svh)!important;
    max-height:var(--cubi-vh, 100svh)!important;
  }
}


/* v2.8.2 MOBILE OPEN/CLOSE + RESPONSIVE BOTTOM SHEET FIX
   - Panel site açılışında otomatik açılmaz.
   - Mobilde konuşma paneli tüm ekranı kaba şekilde kaplamaz; kontrollü alt panel olur.
   - X kapatma butonu her cihazda dokunulabilir kalır.
   - Mobilde proaktif konuşma balonu gizlenir; sadece CUBİ launcher görünür. */
.cubi-chat-panel[hidden]{display:none!important;visibility:hidden!important;pointer-events:none!important;}
.cubi-chat-root.cubi-is-closed .cubi-chat-panel{display:none!important;}
.cubi-chat-root.cubi-is-closed .cubi-launcher{opacity:1!important;pointer-events:auto!important;transform:none!important;}
.cubi-close{position:relative!important;z-index:30!important;pointer-events:auto!important;touch-action:manipulation!important;-webkit-user-select:none;user-select:none;}
.cubi-chat-header{position:relative!important;z-index:20!important;}
.cubi-chat-input-row{min-width:0!important;}
.cubi-chat-input-row textarea#cubi-chat-input{min-width:0!important;}

@media (max-width:760px){
  html.cubi-chat-lock,body.cubi-chat-lock{overflow:hidden!important;touch-action:auto!important;}
  .cubi-chat-root{z-index:2147483000!important;}
  .cubi-chat-root.cubi-is-closed{
    position:fixed!important;
    left:auto!important;
    top:auto!important;
    right:max(14px,env(safe-area-inset-right))!important;
    bottom:max(14px,env(safe-area-inset-bottom))!important;
    width:auto!important;
    height:auto!important;
    pointer-events:none!important;
  }
  .cubi-chat-root.cubi-is-closed .cubi-launcher{pointer-events:auto!important;}
  .cubi-chat-root.cubi-is-closed .cubi-proactive-bubble{display:none!important;}

  .cubi-chat-root.cubi-is-open{
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    height:100svh!important;
    pointer-events:none!important;
    display:block!important;
  }
  .cubi-chat-root.cubi-is-open .cubi-chat-panel{
    pointer-events:auto!important;
    position:fixed!important;
    left:10px!important;
    right:10px!important;
    bottom:max(10px,env(safe-area-inset-bottom))!important;
    top:auto!important;
    width:calc(100vw - 20px)!important;
    max-width:calc(100vw - 20px)!important;
    height:82svh!important;
    max-height:calc(var(--cubi-vh,100svh) - 22px)!important;
    min-height:520px!important;
    border-radius:26px!important;
    border:1px solid rgba(7,54,66,.10)!important;
    box-shadow:0 28px 90px rgba(8,47,58,.30)!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    background:#fff!important;
  }
  @supports (height:100dvh){
    .cubi-chat-root.cubi-is-open{height:100dvh!important;}
    .cubi-chat-root.cubi-is-open .cubi-chat-panel{height:82dvh!important;max-height:calc(100dvh - 22px)!important;}
  }
  .cubi-chat-header{
    flex:0 0 auto!important;
    min-height:70px!important;
    padding:12px 14px!important;
    border-radius:26px 26px 0 0!important;
  }
  .cubi-chat-brand span{max-width:calc(100vw - 156px)!important;}
  .cubi-close{
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    min-height:44px!important;
    line-height:42px!important;
    font-size:24px!important;
    background:rgba(7,54,66,.08)!important;
  }
  .cubi-chat-messages{
    flex:1 1 auto!important;
    min-height:0!important;
    padding:14px 12px!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .cubi-concierge-card{padding:13px!important;border-radius:18px!important;margin-bottom:10px!important;}
  .cubi-concierge-card h3{font-size:16px!important;line-height:1.35!important;}
  .cubi-concierge-card p{font-size:13px!important;line-height:1.45!important;}
  .cubi-chat-quick-actions{grid-template-columns:1fr!important;gap:8px!important;}
  .cubi-chat-quick-actions button{min-height:48px!important;padding:10px 12px!important;border-radius:15px!important;}
  .cubi-chat-quick-actions span{font-size:12.7px!important;}
  .cubi-chat-quick-actions small{font-size:11.2px!important;}
  .cubi-msg{max-width:94%!important;font-size:13.7px!important;line-height:1.58!important;padding:12px 13px!important;}
  .cubi-msg-user{max-width:88%!important;}
  .cubi-chat-form{
    flex:0 0 auto!important;
    padding:10px 10px 8px!important;
    border-top:1px solid rgba(7,54,66,.10)!important;
    background:#fff!important;
  }
  .cubi-chat-input-row{display:flex!important;gap:8px!important;align-items:flex-end!important;}
  .cubi-chat-input-row textarea#cubi-chat-input{
    min-height:46px!important;
    max-height:92px!important;
    padding:12px 13px!important;
    border-radius:16px!important;
    font-size:16px!important;
    line-height:1.35!important;
    overflow-y:auto!important;
  }
  .cubi-chat-input-row button{
    width:50px!important;
    min-width:50px!important;
    height:46px!important;
    border-radius:16px!important;
    padding:0!important;
  }
  .cubi-chat-input-row button span{display:none!important;}
  .cubi-chat-footer{
    flex:0 0 auto!important;
    padding:0 12px 10px!important;
    font-size:10.4px!important;
    line-height:1.35!important;
  }
}

@media (max-width:760px) and (max-height:620px){
  .cubi-chat-root.cubi-is-open .cubi-chat-panel{height:calc(var(--cubi-vh,100svh) - 18px)!important;min-height:0!important;}
  .cubi-concierge-card{display:none!important;}
  .cubi-chat-quick-actions{display:none!important;}
  .cubi-chat-footer{display:none!important;}
}

@media (max-width:390px){
  .cubi-chat-root.cubi-is-open .cubi-chat-panel{left:8px!important;right:8px!important;width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;border-radius:24px!important;}
  .cubi-chat-header{border-radius:24px 24px 0 0!important;}
  .cubi-chat-brand span{display:none!important;}
  .cubi-msg{max-width:96%!important;font-size:13.3px!important;}
  .cubi-msg-user{max-width:92%!important;}
}
