/* LatinoTax AI Chatbot Widget — Primary Floating Assistant CTA (latinotax.ca) */
#lt-chatbot-root,
#lt-chatbot-root *,
#lt-chatbot-root *::before,
#lt-chatbot-root *::after {
  box-sizing: border-box;
  font-family: Helvetica, Arial, sans-serif;
}

.lt-chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10001;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  background: linear-gradient(135deg, #1b2838 0%, #314870 55%, #485e88 100%);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  padding: 12px 22px 12px 14px;
  cursor: pointer;
  box-shadow:
    0 14px 34px rgba(21, 32, 46, 0.42),
    0 0 0 4px rgba(255, 122, 89, 0.24);
  animation: ltLauncherPulse 2.8s infinite ease-in-out;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.lt-chat-launcher:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow:
    0 18px 40px rgba(21, 32, 46, 0.5),
    0 0 0 6px rgba(255, 122, 89, 0.34);
  animation-play-state: paused;
}
.lt-chat-launcher:focus-visible {
  outline: 3px solid #ff7a59;
  outline-offset: 4px;
}
@keyframes ltLauncherPulse {
  0%, 100% {
    box-shadow:
      0 14px 34px rgba(21, 32, 46, 0.42),
      0 0 0 4px rgba(255, 122, 89, 0.22);
  }
  50% {
    box-shadow:
      0 16px 38px rgba(21, 32, 46, 0.48),
      0 0 0 9px rgba(255, 122, 89, 0.34);
  }
}
@media (prefers-reduced-motion: reduce) {
  .lt-chat-launcher {
    animation: none;
  }
}
.lt-chat-launcher-icon {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7a59 0%, #ff5c35 100%);
  box-shadow: 0 4px 12px rgba(255, 92, 53, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lt-chat-launcher-icon svg {
  width: 23px;
  height: 23px;
  fill: #ffffff;
}
.lt-chat-launcher-status {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #22c55e;
  border: 2.5px solid #1b2838;
}
.lt-chat-launcher-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.18;
}
.lt-chat-launcher-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #86efac;
  margin-bottom: 2px;
}
.lt-chat-launcher-title {
  font-family: Montserrat, Helvetica, Arial, sans-serif;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.lt-chat-launcher-sub {
  font-size: 12px;
  font-weight: 500;
  color: #e2ecf9;
  margin-top: 2px;
}

.lt-chat-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 404px;
  max-width: calc(100vw - 28px);
  height: 630px;
  max-height: calc(100dvh - 48px);
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #d5dde7;
  box-shadow: 0 22px 54px rgba(21, 32, 46, 0.32);
  z-index: 10002;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.lt-chat-panel.is-open {
  display: flex;
  animation: ltChatFadeUp 0.2s ease-out;
}
@keyframes ltChatFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lt-chat-header {
  background: linear-gradient(135deg, #212d3a 0%, #33475b 100%);
  color: #ffffff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}
.lt-chat-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.lt-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ff7a59;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lt-chat-brand-text {
  min-width: 0;
}
.lt-chat-brand-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lt-chat-brand-sub {
  font-size: 11px;
  color: #cbd5e1;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.lt-chat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}
.lt-chat-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.lt-chat-head-btn {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.lt-chat-head-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lt-chat-trustbar {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 6px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #475569;
  flex-shrink: 0;
}
.lt-chat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
}
.lt-chat-pill-verified {
  background: #ecfdf5;
  color: #0d7a47;
  border: 1px solid #a7f3d0;
}
.lt-chat-pill-pgp {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.lt-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f5f8fa;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lt-chat-msg {
  max-width: 87%;
  padding: 10px 13px;
  border-radius: 13px;
  font-size: 14px;
  line-height: 1.46;
  word-wrap: break-word;
}
.lt-chat-msg p {
  margin: 0 0 8px;
}
.lt-chat-msg p:last-child {
  margin-bottom: 0;
}
.lt-chat-msg ul {
  margin: 6px 0;
  padding-left: 18px;
}
.lt-chat-msg li {
  margin-bottom: 4px;
}
.lt-chat-msg a {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
}
.lt-chat-msg-bot {
  align-self: flex-start;
  background: #ffffff;
  color: #212d3a;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.lt-chat-msg-user {
  align-self: flex-end;
  background: #212d3a;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.lt-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}
.lt-chat-chip {
  background: #ffffff;
  color: #33475b;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.lt-chat-chip:hover {
  background: #fff5f2;
  border-color: #ff7a59;
  color: #212d3a;
}

.lt-chat-typing {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  padding: 10px 14px;
  display: none;
  align-items: center;
  gap: 5px;
}
.lt-chat-typing.is-visible {
  display: inline-flex;
}
.lt-chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
  animation: ltTypingBounce 1.2s infinite ease-in-out;
}
.lt-chat-typing span:nth-child(2) {
  animation-delay: 0.16s;
}
.lt-chat-typing span:nth-child(3) {
  animation-delay: 0.32s;
}
@keyframes ltTypingBounce {
  0%, 80%, 100% {
    transform: scale(0.65);
    opacity: 0.45;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Inline OTP & PGP SIN Cards */
.lt-chat-drawer-card {
  display: none;
  background: #ffffff;
  border-top: 2px solid #485e88;
  padding: 11px 13px;
  flex-shrink: 0;
}
.lt-chat-drawer-card.is-visible {
  display: block;
}
.lt-chat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.lt-chat-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #212d3a;
}
.lt-chat-card-close {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
}
.lt-chat-card-sub {
  font-size: 11.5px;
  color: #516383;
  margin: 0 0 8px;
  line-height: 1.35;
}
.lt-chat-card-row {
  display: flex;
  gap: 7px;
  align-items: center;
}
.lt-chat-card-input {
  flex: 1;
  background: #f5f8fa;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  color: #212d3a;
  min-width: 0;
}
.lt-chat-card-input:focus {
  outline: none;
  border-color: #485e88;
  background: #ffffff;
}
.lt-chat-card-btn {
  background: #ff7a59;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 13px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.lt-chat-card-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
.lt-chat-card-err {
  display: none;
  font-size: 11.5px;
  color: #dc2626;
  font-weight: 600;
  margin-top: 6px;
}

.lt-chat-composer {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 10px 12px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.lt-chat-sin-trigger {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  height: 38px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.lt-chat-sin-trigger:hover {
  background: #dbeafe;
}
.lt-chat-input {
  flex: 1;
  background: #f5f8fa;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 14px;
  line-height: 1.35;
  color: #212d3a;
  max-height: 92px;
  min-height: 38px;
  resize: none;
}
.lt-chat-input:focus {
  outline: none;
  border-color: #485e88;
  background: #ffffff;
}
.lt-chat-send {
  background: #ff7a59;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  width: 40px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}
.lt-chat-send:hover {
  opacity: 0.92;
}
.lt-chat-send:disabled {
  opacity: 0.55;
  cursor: wait;
}
.lt-chat-send svg {
  width: 17px;
  height: 17px;
  fill: #ffffff;
}

@media (max-width: 540px) {
  .lt-chat-launcher {
    right: 14px;
    bottom: 16px;
    gap: 10px;
    padding: 10px 17px 10px 11px;
  }
  .lt-chat-launcher-icon {
    width: 40px;
    height: 40px;
  }
  .lt-chat-launcher-icon svg {
    width: 20px;
    height: 20px;
  }
  .lt-chat-launcher-title {
    font-size: 14px;
  }
  .lt-chat-launcher-sub {
    display: none;
  }
  .lt-chat-panel {
    right: 10px;
    left: 10px;
    bottom: 10px;
    width: auto;
    max-width: none;
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
  }
}
