.hh-ai-root {
  --hh-ai-brand: #629647;
  --hh-ai-dark: #10271a;
  --hh-ai-soft: #f2f7f3;
  --hh-ai-border: #dce7df;
  --hh-ai-shadow: 0 18px 55px rgba(11, 35, 21, .22);
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999999;
  font-family: Raleway, Arial, Helvetica, sans-serif;
  color: #1d2b22;
  line-height: 1.45;
  box-sizing: border-box;
}
.hh-ai-root *, .hh-ai-root *::before, .hh-ai-root *::after { box-sizing: border-box; }
.hh-ai-root button, .hh-ai-root textarea { font: inherit; }
.hh-ai-launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  max-width: 285px;
  border: 0;
  border-radius: 999px;
  padding: 8px 18px 8px 8px;
  color: #fff;
  background: var(--hh-ai-brand);
  box-shadow: var(--hh-ai-shadow);
  cursor: pointer;
  font-weight: 700;
  transition: transform .2s ease, opacity .2s ease;
}
.hh-ai-launcher:hover { transform: translateY(-2px); }
.hh-ai-launcher.is-hidden { opacity: 0; pointer-events: none; transform: translateY(12px); }
.hh-ai-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
  color: var(--hh-ai-brand);
  border: 2px solid rgba(255,255,255,.45);
}
.hh-ai-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hh-ai-avatar-text { font-family: "Barlow Condensed", Arial, sans-serif; font-size: 21px; font-weight: 800; }
.hh-ai-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(390px, calc(100vw - 28px));
  height: min(650px, calc(100vh - 44px));
  max-height: 650px;
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto auto auto auto;
  overflow: hidden;
  border: 1px solid rgba(19, 55, 33, .12);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--hh-ai-shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px) scale(.98);
  transform-origin: bottom right;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.hh-ai-panel.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.hh-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding: 12px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--hh-ai-dark), var(--hh-ai-brand));
}
.hh-ai-header-identity { display: flex; align-items: center; min-width: 0; gap: 10px; }
.hh-ai-header-identity > div { min-width: 0; }
.hh-ai-header strong { display: block; color: #fff; font-family: "Barlow Condensed", Arial, sans-serif; font-size: 18px; line-height: 1.15; letter-spacing: .2px; }
.hh-ai-header-identity span:not(.hh-ai-avatar) { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11px; opacity: .9; }
.hh-ai-header-identity i { width: 7px; height: 7px; border-radius: 50%; background: #a9ef87; box-shadow: 0 0 0 3px rgba(169,239,135,.16); }
.hh-ai-close { width: 38px; height: 38px; border: 0; border-radius: 50%; color: #fff; background: rgba(255,255,255,.13); cursor: pointer; font-size: 28px; line-height: 1; }
.hh-ai-close:hover { background: rgba(255,255,255,.22); }
.hh-ai-messages { overflow-y: auto; padding: 18px 14px 10px; background: linear-gradient(#fff, #fbfdfb); overscroll-behavior: contain; }
.hh-ai-message-row { display: flex; flex-direction: column; align-items: flex-start; margin: 0 0 12px; }
.hh-ai-message-row.hh-ai-user { align-items: flex-end; }
.hh-ai-bubble { max-width: 86%; padding: 11px 13px; border-radius: 16px 16px 16px 5px; background: var(--hh-ai-soft); color: #253329; font-size: 14px; overflow-wrap: anywhere; box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.hh-ai-user .hh-ai-bubble { border-radius: 16px 16px 5px 16px; color: #fff; background: var(--hh-ai-brand); }
.hh-ai-bubble a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.hh-ai-action { display: inline-flex; align-items: center; justify-content: center; margin-top: 8px; max-width: 92%; min-height: 40px; padding: 8px 14px; border-radius: 10px; background: var(--hh-ai-brand); color: #fff !important; text-decoration: none !important; font-size: 13px; font-weight: 750; box-shadow: 0 5px 15px rgba(50, 105, 70, .16); }
.hh-ai-action:hover { filter: brightness(.94); }
.hh-ai-quick-replies { display: flex; flex-wrap: wrap; gap: 7px; margin: -2px 0 14px; }
.hh-ai-quick-replies button { border: 1px solid var(--hh-ai-border); border-radius: 999px; padding: 7px 10px; background: #fff; color: var(--hh-ai-dark); cursor: pointer; font-size: 12px; font-weight: 650; }
.hh-ai-quick-replies button:hover { border-color: var(--hh-ai-brand); color: var(--hh-ai-brand); }
.hh-ai-typing { display: flex; align-items: center; gap: 4px; padding: 7px 16px; color: #718078; background: #fff; font-size: 11px; }
.hh-ai-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--hh-ai-brand); animation: hhAiBounce 1.1s infinite ease-in-out; }
.hh-ai-typing span:nth-child(2) { animation-delay: .13s; }
.hh-ai-typing span:nth-child(3) { animation-delay: .26s; }
.hh-ai-typing em { margin-left: 5px; font-style: normal; }
.hh-ai-privacy { padding: 7px 14px; border-top: 1px solid #edf2ee; color: #79827c; background: #fff; font-size: 9.5px; line-height: 1.35; }
.hh-ai-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid #edf2ee; background: #fff; }
.hh-ai-form textarea { width: 100%; max-height: 112px; min-height: 42px; resize: none; border: 1px solid var(--hh-ai-border); border-radius: 13px; padding: 10px 12px; outline: none; color: #1d2b22; background: #fff; font-size: 14px; line-height: 1.4; }
.hh-ai-form textarea:focus { border-color: var(--hh-ai-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hh-ai-brand) 18%, transparent); }
.hh-ai-form button { width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--hh-ai-brand); cursor: pointer; }
.hh-ai-form button:disabled { cursor: not-allowed; opacity: .55; }
.hh-ai-form svg { width: 20px; height: 20px; fill: currentColor; }
.hh-ai-footer { padding: 4px 10px 7px; text-align: center; color: #89938c; background: #fff; font-size: 9px; letter-spacing: .25px; }
.hh-ai-root.hh-ai-embedded { position: relative; right: auto; bottom: auto; z-index: 1; width: 100%; min-height: 650px; }
.hh-ai-embedded .hh-ai-panel { position: relative; right: auto; bottom: auto; width: 100%; max-width: 760px; margin: 0 auto; height: 650px; transform: none; transform-origin: center; }
.screen-reader-text { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
@keyframes hhAiBounce { 0%, 70%, 100% { transform: translateY(0); opacity: .5; } 35% { transform: translateY(-4px); opacity: 1; } }
@media (max-width: 600px) {
  .hh-ai-root:not(.hh-ai-embedded) { right: 12px; bottom: 12px; }
  .hh-ai-launcher span:not(.hh-ai-avatar) { display: none; }
  .hh-ai-launcher { width: 58px; padding: 8px; }
  .hh-ai-panel { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-height: none; border: 0; border-radius: 0; transform: translateY(18px); }
  .hh-ai-panel.is-open { transform: translateY(0); }
  .hh-ai-header { min-height: 72px; padding-top: max(12px, env(safe-area-inset-top)); }
  .hh-ai-form { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .hh-ai-root.hh-ai-embedded { min-height: 620px; }
  .hh-ai-embedded .hh-ai-panel { height: 620px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hh-ai-panel, .hh-ai-launcher { transition: none; }
  .hh-ai-typing span { animation: none; }
}
.hh-ai-sources { width: min(94%, 350px); margin-top: 8px; display: grid; gap: 7px; }
.hh-ai-sources-heading { color: #607067; font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.hh-ai-source-card { display: block; padding: 10px 11px; border: 1px solid var(--hh-ai-border); border-radius: 12px; color: #1d2b22 !important; background: #fff; text-decoration: none !important; box-shadow: 0 2px 8px rgba(16,39,26,.04); transition: border-color .18s ease, transform .18s ease; }
.hh-ai-source-card:hover { border-color: var(--hh-ai-brand); transform: translateY(-1px); }
.hh-ai-source-card span { display: block; margin-bottom: 3px; color: var(--hh-ai-brand); font-size: 9px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.hh-ai-source-card strong { display: block; font-size: 13px; line-height: 1.25; }
.hh-ai-source-card p { margin: 5px 0 6px; color: #5d6962; font-size: 11px; line-height: 1.4; }
.hh-ai-source-card em { color: var(--hh-ai-brand); font-size: 10px; font-style: normal; font-weight: 750; }
