/* TetőMester / QuotePilot – OpenAI Chatbot widget (v6)
   Floating button + chat panel.
*/

.tm-chatbot-btn{
  position:fixed;
  right:16px;
  bottom:16px;
  width:56px;
  height:56px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(10,12,22,.82);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 48px rgba(0,0,0,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index: 100000;
  user-select:none;
}
.tm-chatbot-btn:hover{ transform: translateY(-1px); }
.tm-chatbot-btn:active{ transform: translateY(0px) scale(.99); }

.tm-chatbot-btn svg{ width:24px; height:24px; opacity:.95; }

.tm-chatbot-panel{
  position:fixed;
  right:16px;
  bottom:84px;
  width: min(420px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 140px));
  border-radius:16px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(10,12,22,.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  overflow:hidden;
  z-index: 100000;
  display:none;
}
.tm-chatbot-panel.tm-open{ display:flex; flex-direction:column; }

.tm-chatbot-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 12px;
  border-bottom:1px solid rgba(255,255,255,.10);
}

.tm-chatbot-title{
  display:flex;
  gap:10px;
  align-items:center;
  min-width:0;
}

.tm-chatbot-badge{
  width:28px;
  height:28px;
  border-radius:10px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  color:rgba(255,255,255,.92);
  flex:0 0 auto;
}

.tm-chatbot-titleText{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}

.tm-chatbot-titleText b{
  font-size:14px;
  color:rgba(255,255,255,.95);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tm-chatbot-titleText span{
  font-size:12px;
  color:rgba(255,255,255,.70);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tm-chatbot-actions{ display:flex; gap:8px; align-items:center; }

.tm-chatbot-icoBtn{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.90);
  padding:6px 8px;
  border-radius:10px;
  cursor:pointer;
  font-size:12px;
}
.tm-chatbot-icoBtn:hover{ background:rgba(255,255,255,.09); }

.tm-chatbot-body{
  padding:12px;
  overflow:auto;
  flex:1 1 auto;
}

.tm-chatbot-msg{
  display:flex;
  gap:8px;
  margin:10px 0;
}

.tm-chatbot-msg.tm-user{ justify-content:flex-end; }

.tm-chatbot-bubble{
  max-width: 85%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.92);
  font-size:13px;
  line-height:1.35;
  white-space:pre-wrap;
  word-wrap:break-word;
}

.tm-chatbot-msg.tm-user .tm-chatbot-bubble{
  background:rgba(99,102,241,.18);
  border-color: rgba(99,102,241,.35);
}

.tm-chatbot-muted{
  font-size:12px;
  color:rgba(255,255,255,.65);
}

.tm-chatbot-foot{
  padding:10px;
  border-top:1px solid rgba(255,255,255,.10);
  display:flex;
  gap:8px;
  align-items:flex-end;
}

.tm-chatbot-input{
  flex:1 1 auto;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.95);
  padding:10px 10px;
  font-size:13px;
  outline:none;
  resize:none;
  min-height:38px;
  max-height:120px;
  line-height:1.25;
}

.tm-chatbot-send{
  flex:0 0 auto;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.10);
  color:rgba(255,255,255,.95);
  padding:10px 12px;
  cursor:pointer;
  font-size:13px;
}

.tm-chatbot-send:hover{ background:rgba(255,255,255,.14); }
.tm-chatbot-send:disabled{ opacity:.55; cursor:not-allowed; }

@media (max-width: 520px){
  .tm-chatbot-panel{
    right:0;
    left:0;
    bottom:0;
    width:100vw;
    height:100vh;
    border-radius:0;
  }
  .tm-chatbot-btn{ right:12px; bottom:12px; }
}

.tm-chatbot-btn, .tm-chatbot-panel { z-index:2147483647 !important; }
