/* FindTheLawyers AI Assistant — floating chat widget */
#ftl-chat-launcher {
  position: fixed;
  right: 22px;
  bottom: 90px; /* offset above Tawk.to's own bubble so they don't overlap */
  z-index: 99997;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-primary, #2a78d6);
  color: #fff;
  border: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 26px;
}
#ftl-chat-launcher:hover { filter: brightness(1.08); }

#ftl-chat-panel {
  position: fixed;
  right: 22px;
  bottom: 162px;
  z-index: 99998;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 200px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: inherit;
}
#ftl-chat-panel.open { display: flex; }

#ftl-chat-header {
  background: var(--color-primary, #2a78d6);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#ftl-chat-header .title { font-size: 17px; font-weight: 700; margin: 0; }
#ftl-chat-header .subtitle { font-size: 13px; opacity: .95; margin: 3px 0 0; }
#ftl-chat-close { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; }

#ftl-chat-disclaimer {
  font-size: 13px;
  line-height: 1.5;
  color: #3f3f3f;
  background: #fdf3e2;
  border-bottom: 1px solid #f0dfb8;
  padding: 10px 14px;
}

#ftl-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #fafafa;
}

.ftl-msg { margin-bottom: 14px; display: flex; }
.ftl-msg.user { justify-content: flex-end; }
.ftl-msg .bubble {
  max-width: 85%;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.ftl-msg.user .bubble { background: var(--color-primary, #2a78d6); color: #fff; border-bottom-right-radius: 3px; }
.ftl-msg.bot .bubble { background: #fff; border: 1px solid #dcdfe3; color: #111827; border-bottom-left-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }

.ftl-quick-replies { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.ftl-quick-reply {
  background: #fff;
  border: 1.5px solid var(--color-primary, #2a78d6);
  color: var(--color-primary, #2a78d6);
  font-weight: 600;
  border-radius: 16px;
  padding: 8px 15px;
  font-size: 14px;
  cursor: pointer;
}
.ftl-quick-reply:hover { background: var(--color-primary, #2a78d6); color: #fff; }

.ftl-attorney-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}
.ftl-attorney-card .name { font-size: 15.5px; font-weight: 700; color: #111827; margin: 0 0 4px; }
.ftl-attorney-card .meta { font-size: 13px; color: #4b5563; margin: 0 0 8px; }
.ftl-attorney-card .badges { margin-bottom: 8px; }
.ftl-attorney-card .badge-verified,
.ftl-attorney-card .badge-featured {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  margin-right: 6px;
}
.ftl-attorney-card .badge-verified { background: #dcfce7; color: #166534; }
.ftl-attorney-card .badge-featured { background: #fef3c7; color: #92400e; }
.ftl-attorney-card .actions { display: flex; gap: 8px; }
.ftl-attorney-card .actions a,
.ftl-attorney-card .actions button {
  flex: 1;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 8px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}
.ftl-attorney-card .btn-view { background: #f3f4f6; color: #111827; border: 1px solid #d1d5db; }
.ftl-attorney-card .btn-contact { background: var(--color-primary, #2a78d6); color: #fff; border: none; }

#ftl-chat-typing { font-size: 13px; color: #6b7280; padding: 0 14px 8px; }

.ftl-capture-form {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}
.ftl-capture-form label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #374151;
  margin: 10px 0 4px;
}
.ftl-capture-form label:first-child { margin-top: 0; }
.ftl-capture-form input,
.ftl-capture-form select,
.ftl-capture-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14.5px;
  color: #111827;
  font-family: inherit;
  background: #fff;
  outline: none;
}
.ftl-capture-form input::placeholder,
.ftl-capture-form textarea::placeholder { color: #9ca3af; }
.ftl-capture-form textarea { resize: vertical; }
.ftl-cf-hint { font-size: 11.5px; color: #6b7280; margin-top: 3px; }
.ftl-cf-error { color: #dc2626; font-size: 12.5px; font-weight: 600; margin-top: 10px; }
.ftl-cf-submit {
  width: 100%;
  margin-top: 14px;
  background: var(--color-primary, #2a78d6);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}
.ftl-cf-submit:hover { filter: brightness(1.06); }
.ftl-cf-submit:disabled { opacity: .65; cursor: default; }

#ftl-chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #eef0f2;
  background: #fff;
}
#ftl-chat-input {
  flex: 1;
  border: 1.5px solid #d1d5db;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 15px;
  color: #111827;
  outline: none;
}
#ftl-chat-input::placeholder { color: #8a8f98; }
#ftl-chat-send {
  background: var(--color-primary, #2a78d6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 14px;
}

@media (max-width: 480px) {
  #ftl-chat-panel {
    width: calc(100vw - 20px);
    height: calc(100vh - 140px);
    right: 10px;
    bottom: 82px;
  }
  #ftl-chat-launcher { right: 14px; bottom: 76px; }
}
