/* Tops AI Chat — widget flutuante */

.tac-launcher {
  position: fixed;
  bottom: 65px;
  right: 10px;
  height: 52px;
  padding: 0 20px 0 16px;
  border-radius: 26px;
  background: #25d366;
  color: #fff;
  border: none;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 9998;
}

.tac-launcher i {
  font-size: 20px;
}

.tac-launcher:hover {
  filter: brightness(1.05);
}

.tac-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 340px;
  max-width: calc(100vw - 32px);
  height: 480px;
  max-height: calc(100vh - 140px);
  background: #1a1a1a;
  color: #f1f1f1;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-size: 14px;
}

.tac-panel.tac-open {
  display: flex;
}

.tac-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #111;
  border-bottom: 1px solid #2a2a2a;
}

.tac-header img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #333;
}

.tac-header .tac-title {
  font-weight: 600;
  line-height: 1.2;
}

.tac-header .tac-status {
  font-size: 11px;
  color: #8fe3a7;
}

.tac-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #aaa;
  font-size: 18px;
  cursor: pointer;
}

.tac-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tac-msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  line-height: 1.4;
  word-wrap: break-word;
}

.tac-msg.tac-bot {
  align-self: flex-start;
  background: #2a2a2a;
  border-bottom-left-radius: 2px;
}

.tac-msg.tac-user {
  align-self: flex-end;
  background: #25d366;
  color: #06210f;
  border-bottom-right-radius: 2px;
}

.tac-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tac-menu button {
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  color: #f1f1f1;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.tac-menu button:hover {
  background: #333;
}

.tac-link-btn {
  display: inline-block;
  margin-top: 8px;
  background: #25d366;
  color: #06210f !important;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
}

.tac-footer {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #111;
  border-top: 1px solid #2a2a2a;
}

.tac-footer input {
  flex: 1;
  background: #232323;
  border: 1px solid #3a3a3a;
  color: #f1f1f1;
  border-radius: 20px;
  padding: 8px 14px;
  outline: none;
}

.tac-footer button {
  background: #25d366;
  border: none;
  color: #06210f;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
}

.tac-typing {
  font-size: 12px;
  color: #888;
  align-self: flex-start;
}

.tac-inline-link {
  color: #8fe3a7;
  text-decoration: underline;
  word-break: break-all;
}

.tac-welcome-link-btn {
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  color: #f1f1f1;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 13px;
  text-decoration: none;
  display: inline-block;
}

.tac-welcome-link-btn:hover {
  background: #333;
}