/* TIG Relevance AI chat — isolated component. */
.tig-chatbot{
  --tig-chat-primary:var(--tig-primary,#183c2b);
  --tig-chat-accent:var(--tig-accent,#d97742);
  --tig-chat-surface:var(--tig-surface,#fffdf8);
  --tig-chat-background:var(--tig-background,#f3e6cf);
  --tig-chat-text:var(--tig-text,#28332d);
  --tig-chat-heading:var(--tig-heading,#102a22);
  --tig-chat-muted:var(--tig-muted,#66716a);
  --tig-chat-border:var(--tig-border,#e6dccd);
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:999980;
  font-family:var(--tig-font,"Noto Sans Georgian",system-ui,sans-serif);
}
.tig-chatbot *{box-sizing:border-box}
.tig-chatbot button,.tig-chatbot textarea{font:inherit}

/* TIG headset launcher — direct image asset, isolated from chat logic. */
.tig-chatbot__launcher{
  position:relative;
  display:grid;
  place-items:center;
  width:82px;
  height:78px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  cursor:pointer;
  overflow:visible;
  -webkit-tap-highlight-color:transparent;
  transition:transform .18s ease,filter .18s ease;
}
.tig-chatbot__launcher:hover{transform:translateY(-2px);filter:drop-shadow(0 7px 12px rgb(12 35 28 / 13%))}
.tig-chatbot__launcher:active{transform:translateY(0) scale(.985)}
.tig-chatbot__launcher:focus-visible{outline:2px solid color-mix(in srgb,var(--tig-chat-accent) 72%,white);outline-offset:4px;border-radius:18px}
.tig-chatbot__launcher-icon{display:grid;place-items:center;width:100%;height:100%;pointer-events:none}
.tig-chatbot__launcher-image{grid-area:1/1;display:block;width:100%;height:100%;object-fit:contain;object-position:center;filter:drop-shadow(0 5px 10px rgb(12 35 28 / 10%));transition:opacity .15s ease}
.tig-chatbot__launcher-image--dark{opacity:0}
html[data-tig-theme="dark"] .tig-chatbot__launcher-image--light{opacity:0}
html[data-tig-theme="dark"] .tig-chatbot__launcher-image--dark{opacity:1;filter:drop-shadow(0 6px 12px rgb(0 0 0 / 25%))}
html[data-tig-theme="dark"] .tig-chatbot__launcher:hover{filter:drop-shadow(0 8px 14px rgb(0 0 0 / 28%))}

.tig-chatbot__panel{
  position:absolute;
  right:0;
  bottom:78px;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto auto auto;
  width:min(420px,calc(100vw - 32px));
  height:min(660px,calc(100vh - 118px));
  overflow:hidden;
  border:1px solid var(--tig-chat-border);
  border-radius:18px;
  background:var(--tig-chat-surface);
  color:var(--tig-chat-text);
  box-shadow:0 24px 70px rgb(12 35 28 / 26%);
  transform-origin:bottom right;
  animation:tig-chat-in .18s ease-out both;
}
.tig-chatbot__panel[hidden]{display:none!important}
@keyframes tig-chat-in{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}

.tig-chatbot__header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 15px;background:linear-gradient(135deg,var(--tig-chat-primary),color-mix(in srgb,var(--tig-chat-primary) 88%,black));color:#fff}
.tig-chatbot__identity{display:flex;align-items:center;gap:10px;min-width:0}
.tig-chatbot__brandmark{display:grid;place-items:center;flex:0 0 52px;width:52px;height:52px;padding:3px;border:1px solid rgb(255 255 255 / 28%);border-radius:13px;background:rgb(255 255 255 / 11%);overflow:hidden}
.tig-chatbot__brandmark img{width:44px;height:44px;object-fit:contain;border-radius:10px}
.tig-chatbot__identity strong{display:block;color:#fff;font-size:14px;line-height:1.35}
.tig-chatbot__identity small{display:flex;align-items:center;gap:6px;margin-top:4px;color:rgb(255 255 255 / 78%);font-size:11px}
.tig-chatbot__identity small i{width:7px;height:7px;border-radius:50%;background:#61d895;box-shadow:0 0 0 3px rgb(97 216 149 / 14%)}
.tig-chatbot__header-actions{display:flex;gap:6px}
.tig-chatbot__icon-button{display:grid;place-items:center;width:34px;height:34px;padding:0;border:1px solid rgb(255 255 255 / 18%);border-radius:10px;background:rgb(255 255 255 / 9%);color:#fff;font-size:20px;line-height:1;cursor:pointer}
.tig-chatbot__icon-button:hover{background:rgb(255 255 255 / 16%)}

.tig-chatbot__messages{min-height:0;overflow-y:auto;padding:16px 14px 10px;background:linear-gradient(180deg,color-mix(in srgb,var(--tig-chat-background) 22%,var(--tig-chat-surface)),var(--tig-chat-surface) 40%);scroll-behavior:smooth}
.tig-chatbot__message{display:flex;align-items:flex-end;gap:8px;margin:0 0 12px}
.tig-chatbot__message--user{justify-content:flex-end}
.tig-chatbot__message-content{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;max-width:82%}
.tig-chatbot__message-name{padding-left:2px;color:var(--tig-chat-muted);font-size:10px;font-weight:750;line-height:1.25}
.tig-chatbot__message-avatar{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:0;border-radius:50%;background:color-mix(in srgb,var(--tig-chat-primary) 9%,var(--tig-chat-surface));border:1px solid color-mix(in srgb,var(--tig-chat-primary) 16%,var(--tig-chat-border));overflow:hidden;box-shadow:0 3px 8px rgb(20 48 39 / 8%)}
.tig-chatbot__message-avatar img{width:44px;height:44px;object-fit:cover;border-radius:50%}
.tig-chatbot__message-avatar--brand{border-radius:12px;padding:0;background:var(--tig-chat-surface)}
.tig-chatbot__message-avatar--brand img{width:44px;height:44px;border-radius:10px;object-fit:contain}
.tig-chatbot__bubble{width:fit-content;max-width:100%;padding:10px 12px;border:1px solid var(--tig-chat-border);border-radius:14px 14px 14px 4px;background:var(--tig-chat-surface);color:var(--tig-chat-text);font-size:13px;line-height:1.6;box-shadow:0 5px 16px rgb(20 48 39 / 5%);white-space:pre-wrap;overflow-wrap:anywhere}
.tig-chatbot__bubble strong{color:var(--tig-chat-heading)}
.tig-chatbot__bubble p{margin:5px 0 0;color:inherit}
.tig-chatbot__bubble a{color:var(--tig-chat-accent)!important;font-weight:700;text-decoration:underline!important;text-underline-offset:2px;overflow-wrap:anywhere}
.tig-chatbot__message--user .tig-chatbot__bubble{max-width:82%;border-color:transparent;border-radius:14px 14px 4px 14px;background:var(--tig-chat-primary);color:#fff;box-shadow:none;white-space:pre-wrap}

.tig-chatbot__handover-note{display:flex;align-items:center;gap:8px;width:fit-content;max-width:calc(100% - 36px);margin:0 0 11px 39px;padding:6px 9px 6px 6px;border:1px solid color-mix(in srgb,var(--tig-chat-accent) 22%,var(--tig-chat-border));border-radius:999px;background:color-mix(in srgb,var(--tig-chat-accent) 5%,var(--tig-chat-surface));color:var(--tig-chat-muted);font-size:10.5px;line-height:1.35}
.tig-chatbot__handover-note img{width:24px;height:24px;border-radius:50%;object-fit:cover;border:1px solid color-mix(in srgb,var(--tig-chat-primary) 15%,var(--tig-chat-border))}

.tig-chatbot__quick-actions{display:grid;grid-template-columns:1fr;gap:8px;margin:6px 0 15px 52px}
.tig-chatbot__quick-actions-title{margin:0 0 2px;color:var(--tig-chat-heading);font-size:12px;font-weight:800;line-height:1.35}
.tig-chatbot__quick-actions button{display:flex;align-items:center;gap:11px;width:100%;min-height:60px;padding:7px 10px 7px 8px;border:1px solid var(--tig-chat-border);border-radius:12px;background:color-mix(in srgb,var(--tig-chat-background) 22%,var(--tig-chat-surface));color:var(--tig-chat-heading);text-align:left;cursor:pointer;transition:border-color .15s ease,transform .15s ease,background .15s ease,box-shadow .15s ease}
.tig-chatbot__quick-actions button:hover{border-color:color-mix(in srgb,var(--tig-chat-accent) 55%,var(--tig-chat-border));background:color-mix(in srgb,var(--tig-chat-accent) 7%,var(--tig-chat-surface));transform:translateY(-1px);box-shadow:0 6px 14px rgb(20 48 39 / 6%)}
.tig-chatbot__quick-actions button img{flex:0 0 44px;width:44px;height:44px;border-radius:50%;object-fit:cover;border:1px solid color-mix(in srgb,var(--tig-chat-primary) 16%,var(--tig-chat-border))}
.tig-chatbot__quick-actions button span{display:block;min-width:0}
.tig-chatbot__quick-actions button strong{display:block;color:var(--tig-chat-heading);font-size:11.5px;font-weight:800;line-height:1.4}

.tig-chatbot__status{display:flex;align-items:center;gap:8px;padding:7px 15px;color:var(--tig-chat-muted);font-size:11px;border-top:1px solid color-mix(in srgb,var(--tig-chat-border) 72%,transparent)}
.tig-chatbot__status[hidden]{display:none!important}
.tig-chatbot__typing{display:flex;gap:3px;align-items:center}
.tig-chatbot__typing i{width:4px;height:4px;border-radius:50%;background:var(--tig-chat-accent);animation:tig-chat-dot 1s infinite ease-in-out}
.tig-chatbot__typing i:nth-child(2){animation-delay:.12s}.tig-chatbot__typing i:nth-child(3){animation-delay:.24s}
@keyframes tig-chat-dot{0%,70%,100%{transform:translateY(0);opacity:.35}35%{transform:translateY(-3px);opacity:1}}

.tig-chatbot__composer{display:grid;grid-template-columns:minmax(0,1fr) 42px;gap:8px;padding:10px 12px 8px;border-top:1px solid var(--tig-chat-border);background:var(--tig-chat-surface)}
.tig-chatbot__composer textarea{width:100%;min-height:42px;max-height:104px;resize:none;padding:10px 12px;border:1px solid var(--tig-chat-border);border-radius:12px;background:var(--tig-chat-surface);color:var(--tig-chat-text);font-size:13px;line-height:1.5;outline:none}
.tig-chatbot__composer textarea:focus{border-color:color-mix(in srgb,var(--tig-chat-accent) 62%,var(--tig-chat-border));box-shadow:0 0 0 3px color-mix(in srgb,var(--tig-chat-accent) 10%,transparent)}
.tig-chatbot__composer textarea::placeholder{color:var(--tig-chat-muted)}
.tig-chatbot__composer button{display:grid;place-items:center;width:42px;height:42px;padding:0;border:0;border-radius:12px;background:var(--tig-chat-accent);color:#fff;cursor:pointer;box-shadow:0 8px 18px color-mix(in srgb,var(--tig-chat-accent) 25%,transparent)}
.tig-chatbot__composer button:disabled,.tig-chatbot__composer textarea:disabled{opacity:.55;cursor:not-allowed}
.tig-chatbot__composer svg{width:19px;height:19px;fill:currentColor}
.tig-chatbot__privacy{margin:0;padding:0 12px 10px;color:var(--tig-chat-muted);font-size:9.5px;line-height:1.4;text-align:center;background:var(--tig-chat-surface)}
.tig-chatbot__error .tig-chatbot__bubble{border-color:color-mix(in srgb,#b42318 35%,var(--tig-chat-border));background:color-mix(in srgb,#b42318 4%,var(--tig-chat-surface))}

@media(max-width:760px){
  .tig-chatbot{right:max(14px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom))}
  .tig-chatbot__launcher{width:70px;height:70px}
  .tig-chatbot__launcher-ornament--band{left:10px;top:4px;width:50px;height:27px}
  .tig-chatbot__launcher-ornament--ear{top:25px;width:16px;height:24px}
  .tig-chatbot__launcher-ornament--ear-left{left:6px}
  .tig-chatbot__launcher-ornament--ear-right{right:6px}
  .tig-chatbot__launcher-icon{width:52px;height:52px}
  .tig-chatbot__launcher-mark{width:52px;height:52px}
  .tig-chatbot__launcher-pulse{right:10px;bottom:10px}
}
@media(max-width:560px){
  .tig-chatbot{right:max(10px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom))}
  .tig-chatbot__launcher{width:66px;height:66px}
  .tig-chatbot__launcher::before{inset:5px}
  .tig-chatbot__launcher::after{left:13px;right:13px;bottom:6px;height:13px}
  .tig-chatbot__launcher-ornament--band{left:9px;top:4px;width:48px;height:25px;border-width:2.8px}
  .tig-chatbot__launcher-ornament--ear{top:24px;width:15px;height:22px}
  .tig-chatbot__launcher-ornament--ear-left{left:6px}
  .tig-chatbot__launcher-ornament--ear-right{right:6px}
  .tig-chatbot__launcher-ornament--mic{right:8px;bottom:14px;width:15px;height:15px;border-right-width:2.8px;border-bottom-width:2.8px}
  .tig-chatbot__launcher-icon{width:50px;height:50px}
  .tig-chatbot__launcher-mark{width:50px;height:50px}
  .tig-chatbot__launcher-pulse{right:9px;bottom:9px;width:10px;height:10px}
  .tig-chatbot__panel{position:fixed;left:8px;right:8px;bottom:78px;width:auto;height:min(74svh,650px);border-radius:16px}
  .tig-chatbot__quick-actions{margin-left:52px}
}
@media(max-width:380px){
  .tig-chatbot__launcher{width:62px;height:62px}
  .tig-chatbot__launcher-ornament--band{left:8px;top:4px;width:45px;height:22px;border-width:2.6px}
  .tig-chatbot__launcher-ornament--ear{top:23px;width:14px;height:20px}
  .tig-chatbot__launcher-ornament--ear-left{left:5px}
  .tig-chatbot__launcher-ornament--ear-right{right:5px}
  .tig-chatbot__launcher-ornament--mic{right:7px;bottom:13px;width:14px;height:14px;border-right-width:2.6px;border-bottom-width:2.6px}
  .tig-chatbot__launcher-icon{width:46px;height:46px}
  .tig-chatbot__launcher-mark{width:46px;height:46px}
  .tig-chatbot__launcher-pulse{right:8px;bottom:8px;width:9px;height:9px}
  .tig-chatbot__panel{left:6px;right:6px;bottom:72px;height:min(76svh,620px)}
}
@media(prefers-reduced-motion:reduce){.tig-chatbot__panel,.tig-chatbot__launcher,.tig-chatbot__quick-actions button,.tig-chatbot__typing i{animation:none!important;transition:none!important}}

/* Stage 5 accessibility hardening. */
.tig-chatbot__icon-button:focus-visible,.tig-chatbot__quick-actions button:focus-visible,.tig-chatbot__composer button:focus-visible{outline:3px solid color-mix(in srgb,var(--tig-chat-accent) 70%,white);outline-offset:3px}
@media(prefers-reduced-motion:reduce){.tig-chatbot__messages{scroll-behavior:auto!important}}
@media(forced-colors:active){.tig-chatbot__launcher,.tig-chatbot__panel,.tig-chatbot__icon-button,.tig-chatbot__quick-actions button,.tig-chatbot__composer textarea,.tig-chatbot__composer button{forced-color-adjust:auto;border:1px solid CanvasText}.tig-chatbot__launcher:focus-visible,.tig-chatbot__icon-button:focus-visible,.tig-chatbot__quick-actions button:focus-visible,.tig-chatbot__composer button:focus-visible,.tig-chatbot__composer textarea:focus-visible{outline:3px solid Highlight}}
@media(max-width:560px){
  .tig-chatbot{bottom:max(5.25rem,calc(4.75rem + env(safe-area-inset-bottom)))}
  .tig-chatbot__panel{bottom:max(9.75rem,calc(9.25rem + env(safe-area-inset-bottom)));height:min(68svh,620px)}
}
