#hh-assistant,
#hh-assistant * {
  box-sizing: border-box;
}

#hh-assistant {
  --hh-assistant-navy: #234237;
  --hh-assistant-accent: #234237;
  --hh-assistant-ink: #26362d;
  --hh-assistant-muted: #66736a;
  --hh-assistant-border: #dee7e1;
  --hh-assistant-surface: #ffffff;
  --hh-assistant-soft: #f6f8f6;
  --hh-assistant-shadow: 0 18px 52px rgba(35, 66, 55, .2);
  color: var(--hh-assistant-ink);
  font: 400 15px/1.45 "Source Sans Pro", Arial, sans-serif;
}

#hh-assistant button,
#hh-assistant input {
  font: inherit;
}

#hh-assistant-launcher {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  left: auto;
  z-index: 2147483000;
  display: inline-grid;
  width: 58px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--hh-assistant-navy);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 9px 26px rgba(35, 66, 55, .24);
  font-weight: 700;
  letter-spacing: .01em;
}

#hh-assistant-launcher[hidden] {
  display: none !important;
}

.hh-assistant-launcher-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#hh-assistant-launcher:hover {
  background: #1a3027;
  transform: translateY(-1px);
}

#hh-assistant-launcher:focus-visible,
#hh-assistant button:focus-visible,
#hh-assistant input:focus-visible {
  outline: 3px solid rgba(35, 66, 55, .55);
  outline-offset: 3px;
}

.hh-assistant-logo {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}

.hh-assistant-chat-icon {
  width: 30px;
  height: 30px;
  color: #fff;
}

#hh-assistant-panel {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right, 0px));
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  left: auto;
  z-index: 2147482999;
  display: flex;
  width: min(410px, calc(100vw - 28px));
  height: min(680px, calc(100dvh - 110px));
  min-height: 440px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(35, 66, 55, .12);
  border-radius: 18px;
  background: var(--hh-assistant-surface);
  box-shadow: var(--hh-assistant-shadow);
}

#hh-assistant-panel[hidden] {
  display: none;
}

.hh-assistant-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 17px 14px;
  background: var(--hh-assistant-navy);
  color: #fff;
}

.hh-assistant-header-copy {
  min-width: 0;
  flex: 1;
}

.hh-assistant-header-title,
.hh-assistant-header-subtitle {
  display: block;
}

.hh-assistant-header-title {
  font: 700 17px/1.15 Montserrat, Arial, sans-serif;
}

.hh-assistant-header-subtitle {
  margin-top: 3px;
  color: rgba(255,255,255,.8);
  font-size: 13px;
}

.hh-assistant-reset-button {
  flex: 0 0 auto;
  padding: 5px 3px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.9);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.hh-assistant-reset-button:hover {
  color: #fff;
}

.hh-assistant-reset-button:disabled {
  cursor: wait;
  opacity: .55;
}

.hh-assistant-icon-button {
  position: relative;
  display: inline-grid;
  width: 34px;
  height: 34px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  appearance: none;
  line-height: 0;
}

.hh-assistant-close-symbol {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
}

.hh-assistant-close-symbol::before,
.hh-assistant-close-symbol::after {
  position: absolute;
  top: 6px;
  left: 0;
  width: 14px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.hh-assistant-close-symbol::before { transform: rotate(45deg); }
.hh-assistant-close-symbol::after { transform: rotate(-45deg); }

.hh-assistant-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 14px 8px;
  background: var(--hh-assistant-soft);
  overscroll-behavior: contain;
}

.hh-assistant-welcome {
  margin: 3px 2px 16px;
  color: var(--hh-assistant-ink);
}

.hh-assistant-welcome p {
  margin: 0 0 6px;
}

.hh-assistant-welcome small {
  color: var(--hh-assistant-muted);
}

.hh-assistant-message {
  max-width: 91%;
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hh-assistant-message.user {
  margin-left: auto;
  background: var(--hh-assistant-navy);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.hh-assistant-message.assistant {
  margin-right: auto;
  border: 1px solid var(--hh-assistant-border);
  background: #fff;
  border-bottom-left-radius: 4px;
}

.hh-assistant-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -3px 0 8px 4px;
  color: var(--hh-assistant-muted);
  font-size: 11px;
}

.hh-assistant-feedback button {
  padding: 1px 5px;
  border: 0;
  border-bottom: 1px solid rgba(35, 66, 55, .35);
  background: transparent;
  color: var(--hh-assistant-accent);
  cursor: pointer;
  font-size: 11px;
}

.hh-assistant-feedback button:disabled {
  cursor: default;
  opacity: .6;
}

.hh-assistant-typing {
  color: var(--hh-assistant-muted);
  font-style: italic;
}

.hh-assistant-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hh-assistant-thinking {
  display: flex;
  width: max-content;
  min-width: 58px;
  height: 38px;
  align-items: center;
  padding: 9px 12px;
}

.hh-assistant-thinking-dots {
  display: inline-flex;
  height: 14px;
  align-items: center;
  gap: 4px;
}

.hh-assistant-thinking-label {
  margin-right: 7px;
  color: var(--hh-assistant-muted);
  font-size: 12px;
  font-style: normal;
}

.hh-assistant-thinking-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hh-assistant-accent);
  opacity: .35;
  animation: hh-assistant-thinking 1.1s ease-in-out infinite;
}

.hh-assistant-thinking-dot:nth-child(2) { animation-delay: .15s; }
.hh-assistant-thinking-dot:nth-child(3) { animation-delay: .3s; }

@keyframes hh-assistant-thinking {
  0%, 60%, 100% { transform: translateY(0); opacity: .35; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.hh-assistant-rich-reveal {
  animation: hh-assistant-rich-reveal .2s ease-out both;
}

@keyframes hh-assistant-rich-reveal {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.hh-assistant-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.hh-assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 10px 4px;
}

.hh-assistant-suggestions-label {
  width: 100%;
  color: var(--hh-assistant-muted);
  font-size: 11px;
}

.hh-assistant-starter,
.hh-assistant-suggestion,
.hh-assistant-resource,
.hh-assistant-capture-trigger {
  border: 1px solid rgba(35, 66, 55, .38);
  border-radius: 999px;
  background: #fff;
  color: var(--hh-assistant-accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.hh-assistant-starter {
  padding: 7px 10px;
}

.hh-assistant-suggestion {
  padding: 7px 10px;
}

.hh-assistant-suggestion.is-selected {
  background: var(--hh-assistant-navy);
  color: #fff;
}

.hh-assistant-suggestion-confirm:disabled {
  cursor: default;
  opacity: .5;
}

.hh-assistant-listings {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.hh-assistant-listing-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--hh-assistant-border);
  border-radius: 12px;
  background: #fff;
}

.hh-assistant-listing-card img {
  width: 74px;
  height: 64px;
  border-radius: 8px;
  background: #e7eee9;
  object-fit: cover;
}

.hh-assistant-listing-card strong,
.hh-assistant-listing-card span {
  display: block;
}

.hh-assistant-listing-card strong {
  overflow: hidden;
  color: var(--hh-assistant-navy);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hh-assistant-listing-card span {
  color: var(--hh-assistant-muted);
  font-size: 12px;
}

.hh-assistant-listing-card a {
  display: inline-block;
  margin-top: 3px;
  color: var(--hh-assistant-accent);
  font-size: 12px;
  font-weight: 700;
}

.hh-assistant-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
}

.hh-assistant-resource {
  display: inline-block;
  padding: 7px 10px;
  text-decoration: none;
}

.hh-assistant-capture {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(35, 66, 55, .35);
  border-radius: 12px;
  background: #f1f7f4;
}

.hh-assistant-capture p {
  margin: 0 0 8px;
  font-weight: 700;
}

.hh-assistant-capture-field {
  display: grid;
  gap: 4px;
  color: var(--hh-assistant-muted);
  font-size: 12px;
  font-weight: 700;
}

.hh-assistant-capture-form {
  display: grid;
  gap: 8px;
}

.hh-assistant-capture-form[hidden] {
  display: none;
}

.hh-assistant-capture-form input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #bfd0c4;
  border-radius: 8px;
  background: #fff;
  color: var(--hh-assistant-ink);
}

.hh-assistant-capture-form select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #bfd0c4;
  border-radius: 8px;
  background: #fff;
  color: var(--hh-assistant-ink);
}

.hh-assistant-capture-form input:read-only {
  background: #edf4ef;
}

.hh-assistant-capture-hint,
.hh-assistant-capture-error {
  color: var(--hh-assistant-muted);
  font-size: 12px;
  font-weight: 400;
}

.hh-assistant-capture-error {
  color: #a43b2f;
}

.hh-assistant-consent {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  color: var(--hh-assistant-muted);
  font-size: 12px;
}

.hh-assistant-consent input {
  width: auto;
  min-height: 0;
  margin-top: 3px;
}

.hh-assistant-capture-form button {
  min-height: 39px;
  border: 0;
  border-radius: 8px;
  background: var(--hh-assistant-accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.hh-assistant-capture-trigger {
  padding: 7px 10px;
}

.hh-assistant-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + max(0px, env(safe-area-inset-bottom)));
  border-top: 1px solid var(--hh-assistant-border);
  background: #fff;
}

.hh-assistant-input-row input {
  min-width: 0;
  flex: 1 1 auto;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #bfd0c4;
  border-radius: 10px;
  color: var(--hh-assistant-ink);
}

.hh-assistant-input-row button {
  min-width: 60px;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--hh-assistant-accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.hh-assistant-input-row button:disabled {
  cursor: wait;
  opacity: .55;
}

@media (max-width: 560px) {
  #hh-assistant-launcher {
    right: calc(14px + env(safe-area-inset-right, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    left: auto;
    width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
  }

  #hh-assistant-panel {
    right: calc(10px + env(safe-area-inset-right, 0px));
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: auto;
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    height: min(720px, calc(100dvh - 16px));
    min-height: 0;
    border-radius: 14px;
  }

  #hh-assistant-panel.open-above-launcher {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  #hh-assistant-launcher,
  .hh-assistant-rich-reveal,
  .hh-assistant-thinking-dot { animation: none; transition: none; opacity: .75; }
}
