/* TempComputing support chat widget (static/js/support-chat.js). Site colours: #5192e1 blue, #23ced5 teal, #26313c dark. */

.tc-chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9990;   /* below the sign-up panel (9999) */
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: #5192e1;
  color: #fff;
  font: 600 15px/1 'Montserrat', sans-serif;
  box-shadow: 0 6px 18px rgba(38, 49, 60, 0.25);
  cursor: pointer;
}
.tc-chat-launcher:hover { background: #3f7fce; }
.tc-chat-launcher:focus-visible,
.tc-chat-panel button:focus-visible,
.tc-chat-input:focus-visible { outline: 3px solid #23ced5; outline-offset: 2px; }

.tc-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 9991;
  display: flex;
  flex-direction: column;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 110px);
  border-radius: 14px;
  background: #fff;
  color: #26313c;
  font: 14px/1.45 'Open Sans', sans-serif;
  box-shadow: 0 12px 36px rgba(38, 49, 60, 0.3);
  overflow: hidden;
}
.tc-chat-panel[hidden] { display: none; }

.tc-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #26313c;
  color: #fff;
}
.tc-chat-title { margin: 0; font: 600 15px/1.3 'Montserrat', sans-serif; }
.tc-chat-subtitle { margin: 2px 0 0; font-size: 12px; opacity: 0.8; }
.tc-chat-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.tc-chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f4f7fb;
}
.tc-chat-msg {
  max-width: 85%;
  margin: 0 0 10px;
  padding: 9px 12px;
  border-radius: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tc-chat-msg--assistant { background: #fff; border: 1px solid #e1e7ef; }
.tc-chat-msg--user { margin-left: auto; background: #5192e1; color: #fff; }
.tc-chat-msg--typing { background: transparent; color: #6b7785; font-style: italic; }

.tc-chat-departments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px 0;
}
.tc-chat-departments[hidden] { display: none; }
.tc-chat-chip {
  padding: 7px 12px;
  border: 1px solid #23ced5;
  border-radius: 999px;
  background: #fff;
  color: #26313c;
  font-size: 13px;
  cursor: pointer;
}
.tc-chat-chip:hover { background: #e8fafb; }

.tc-chat-form {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #e1e7ef;
}
.tc-chat-form[hidden] { display: none; }
.tc-chat-input {
  flex: 1;
  resize: none;
  padding: 8px 10px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  font: inherit;
  color: inherit;
}
.tc-chat-send,
.tc-chat-restart {
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #5192e1;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.tc-chat-send:disabled { background: #a9c6ee; cursor: default; }
.tc-chat-restart { margin: 10px 14px; padding: 10px; }
.tc-chat-restart[hidden] { display: none; }

.tc-chat-footer {
  margin: 0;
  padding: 8px 14px 12px;
  font-size: 11.5px;
  color: #6b7785;
}

@media (max-width: 480px) {
  .tc-chat-panel { right: 16px; left: 16px; width: auto; bottom: 76px; height: calc(100vh - 100px); }
  .tc-chat-launcher { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  .tc-chat-panel { animation: tc-chat-in 160ms ease-out; }
  @keyframes tc-chat-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
