/* Hector Home Services Marketing — brand + chat widget styles */

:root {
  --ink: #0b2e40;
  --ink-2: #153d54;
  --ink-3: #1d4c65;
  --paper: #f9f6f0;
  --paper-2: #efe8db;
  --accent: #e85221;
  --accent-2: #e8a628;
  --leaf: #2e7d5b;
  --leaf-2: #3d9c72;
  --muted: #6b7b87;
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* ============ HECTOR LOGO MARK ============ */
.hct-logo-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--accent);
  flex-shrink: 0;
}
.hct-logo-mark svg { width: 22px; height: 22px; }
.hct-logo-mark .hct-arrow {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  color: var(--accent-2);
}

/* ============ FLOATING ACTION BUTTON ============ */
.hct-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  width: 60px;
  height: 60px;
  border-radius: 9999px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(232, 82, 33, 0.45), 0 4px 10px rgba(11, 46, 64, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.hct-fab:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 18px 36px rgba(232, 82, 33, 0.55), 0 6px 14px rgba(11, 46, 64, 0.25);
}
.hct-fab svg { width: 26px; height: 26px; stroke-width: 2; }
.hct-fab[data-open="true"] { background: var(--ink); }

/* ============ CHAT PANEL ============ */
.hct-panel {
  position: fixed;
  right: 24px;
  bottom: 100px;
  z-index: 79;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: min(640px, calc(100vh - 140px));
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(11, 46, 64, 0.3), 0 8px 20px rgba(11, 46, 64, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  border: 1px solid rgba(11, 46, 64, 0.1);
}
.hct-panel[data-open="true"] {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

@media (max-width: 520px) {
  .hct-panel {
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    border-radius: 20px 20px 0 0;
  }
  .hct-fab { right: 16px; bottom: 16px; }
}

/* Header */
.hct-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--paper);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.hct-header-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(232, 82, 33, 0.2);
  border: 1px solid rgba(249, 246, 240, 0.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.hct-header-logo svg { width: 18px; height: 18px; }
.hct-header-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.hct-header-sub {
  font-size: 11px;
  color: rgba(249, 246, 240, 0.7);
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.hct-header-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--paper);
  cursor: pointer;
  width: 32px; height: 32px;
  border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}
.hct-header-close:hover { background: rgba(249, 246, 240, 0.1); }
.hct-header-close svg { width: 18px; height: 18px; }

/* Message log */
.hct-log {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 16px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.hct-log::-webkit-scrollbar { width: 6px; }
.hct-log::-webkit-scrollbar-track { background: transparent; }
.hct-log::-webkit-scrollbar-thumb { background: rgba(11, 46, 64, 0.15); border-radius: 3px; }

/* Messages */
.hct-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.hct-msg-assistant {
  align-self: flex-start;
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(11, 46, 64, 0.08);
  border-top-left-radius: 4px;
}
.hct-msg-user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--paper);
  border-top-right-radius: 4px;
}

/* Suggested chips */
.hct-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.hct-chip {
  background: #fff;
  border: 1px solid rgba(11, 46, 64, 0.15);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.hct-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 82, 33, 0.05);
}

/* Typing indicator */
.hct-typing {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(11, 46, 64, 0.08);
  border-top-left-radius: 4px;
  border-radius: 14px;
  padding: 12px 16px;
  display: inline-flex;
  gap: 4px;
}
.hct-typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.35;
  animation: hct-pulse 1.2s infinite ease-in-out;
}
.hct-typing span:nth-child(2) { animation-delay: 0.15s; }
.hct-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes hct-pulse {
  0%, 80%, 100% { transform: scale(0.85); opacity: 0.35; }
  40% { transform: scale(1.1); opacity: 1; }
}

/* Tool call cards */
.hct-tool {
  align-self: flex-start;
  max-width: 90%;
  background: #fff;
  border: 1px solid rgba(11, 46, 64, 0.12);
  border-radius: 12px;
  overflow: hidden;
  font-size: 12.5px;
}
.hct-tool-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 500;
  background: rgba(239, 232, 219, 0.6);
  user-select: none;
}
.hct-tool-head:hover { background: rgba(232, 166, 40, 0.18); }
.hct-tool-head svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--leaf); }
.hct-tool-name { font-weight: 600; font-family: "Inter", sans-serif; }
.hct-tool-duration { margin-left: auto; font-size: 11px; color: rgba(11, 46, 64, 0.55); font-variant-numeric: tabular-nums; }
.hct-tool-body {
  display: none;
  padding: 10px 12px;
  border-top: 1px solid rgba(11, 46, 64, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: rgba(11, 46, 64, 0.8);
  white-space: pre-wrap;
  word-break: break-word;
  background: #fdfdfb;
  max-height: 200px;
  overflow-y: auto;
}
.hct-tool[data-open="true"] .hct-tool-body { display: block; }
.hct-tool[data-open="true"] .hct-tool-chevron { transform: rotate(180deg); }
.hct-tool-chevron { transition: transform 0.15s ease; }

/* Input */
.hct-input-row {
  padding: 12px;
  background: #fff;
  border-top: 1px solid rgba(11, 46, 64, 0.08);
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
}
.hct-input {
  flex: 1 1 auto;
  border: 1px solid rgba(11, 46, 64, 0.15);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14.5px;
  font-family: inherit;
  resize: none;
  max-height: 140px;
  min-height: 44px;
  line-height: 1.4;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hct-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 82, 33, 0.15);
}
.hct-send {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.1s ease;
}
.hct-send:hover:not(:disabled) { background: #d14519; }
.hct-send:active:not(:disabled) { transform: scale(0.95); }
.hct-send:disabled { background: rgba(11, 46, 64, 0.25); cursor: not-allowed; }
.hct-send svg { width: 18px; height: 18px; }

/* ============ INDUSTRY PILLS ============ */
.hct-industry-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(11, 46, 64, 0.12);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.hct-industry-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(232, 82, 33, 0.15);
}
