/* Global Help + Chat widget styles (TetőMester) */

#globalHelpLink.btn{ white-space:nowrap; }

/* Old help FAB (kept for backward compatibility) */
#helpFab{
  position:fixed;
  right:16px;
  bottom:16px;
  z-index:9999;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  font-size:13px;
  line-height:1;
  border:1px solid rgba(15,23,42,.12);
  box-shadow:0 10px 30px rgba(2,6,23,.12);
  background: var(--primary, #2563EB);
  color: #fff;
}
#helpFab:hover{ background: var(--primary-2, #1D4ED8); }
#helpFab:active{ transform: translateY(1px); }
#helpFab svg{ width:16px; height:16px; fill: currentColor; }
@media (max-width: 480px){
  #helpFab{ right:12px; bottom:12px; padding:10px 11px; }
  #helpFab span{ display:none; }
}

/* =========================
   TetőMester – Chat widget
   ========================= */
#tmChatFab{
  position: fixed;
  right: 16px;
  bottom: 16px; /* JS recalculates for fixed footer */
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(15,23,42,.80);
  color: #fff;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2147483647; /* always on top */
  backdrop-filter: blur(10px);
}
#tmChatFab:hover{ background: rgba(15,23,42,.92); }
#tmChatFab:active{ transform: translateY(1px); }
#tmChatFab svg{ width: 22px; height: 22px; fill: currentColor; }

.tm-chat-panel{
  position: fixed;
  right: 16px;
  bottom: 84px; /* JS recalculates for fixed footer */
  width: 360px;
  max-width: calc(100vw - 24px);
  height: 520px;
  max-height: calc(100vh - 140px);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(2,6,23,.88);
  color: rgba(255,255,255,.92);
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
  backdrop-filter: blur(14px);
  z-index: 2147483647;
  display: none;
  overflow: hidden;
}
.tm-chat-panel.is-open{ display: flex; flex-direction: column; }

.tm-chat-head{
  padding: 14px 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.tm-chat-brand{ display:flex; align-items:center; gap: 10px; min-width: 0; }
.tm-chat-avatar{
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  letter-spacing: .5px;
  background: rgba(99,102,241,.20);
  border: 1px solid rgba(99,102,241,.35);
}
.tm-chat-brandtext{ min-width: 0; }
.tm-chat-title{
  font-weight: 900;
  font-size: 14px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tm-chat-status{ display:flex; align-items:center; gap: 6px; font-size: 12px; opacity: .85; margin-top: 2px;}
.tm-chat-dot{
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.18);
}

.tm-chat-actions{ display:flex; align-items:center; gap: 8px; }
.tm-chat-action{
  appearance: none;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.tm-chat-action:hover{ background: rgba(255,255,255,.10); }
.tm-chat-action:active{ transform: translateY(1px); }

.tm-chat-body{
  padding: 12px;
  flex: 1;
  overflow: auto;
}
.tm-chat-msg{ display:flex; margin: 10px 0; }
.tm-chat-msg.is-bot{ justify-content: flex-start; }
.tm-chat-msg.is-user{ justify-content: flex-end; }
.tm-chat-bubble{
  max-width: 84%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.35;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  white-space: normal;
}
.tm-chat-msg.is-user .tm-chat-bubble{
  background: rgba(99,102,241,.20);
  border-color: rgba(99,102,241,.28);
}

.tm-chat-compose{
  padding: 12px;
  display:flex;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(2,6,23,.55);
}
#tmChatInput{
  flex: 1;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  padding: 0 12px;
  outline: none;
}
#tmChatInput::placeholder{ color: rgba(255,255,255,.55); }
#tmChatInput:focus{ border-color: rgba(99,102,241,.45); }

.tm-chat-send{
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
  font-weight: 900;
  cursor: pointer;
}
.tm-chat-send:hover{ background: rgba(255,255,255,.14); }
.tm-chat-send:active{ transform: translateY(1px); }

@media (max-width: 480px){
  #tmChatFab{ right: 12px; width: 50px; height: 50px; border-radius: 16px; }
  .tm-chat-panel{
    right: 12px;
    width: calc(100vw - 24px);
    height: 70vh;
    max-height: calc(100vh - 130px);
  }
}