/**
 * Housetory Help Assistant / Dottie v0.2.2
 */
.ht-help {
  --ht-help-bg: #fffaf2;
  --ht-help-ink: #2f2a24;
  --ht-help-muted: #72695f;
  --ht-help-line: rgba(80, 62, 42, .18);
  --ht-help-accent: #7a4e2c;
  --ht-help-accent-dark: #55351f;
  position: fixed;
  z-index: 9999;
  bottom: 1rem;
  font-family: inherit;
  color: var(--ht-help-ink);
}
.ht-help--right { right: 1rem; }
.ht-help--left { left: 1rem; }
.ht-help__button {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 0;
  border-radius: 999px;
  background: var(--ht-help-accent);
  color: #fff;
  padding: .72rem 1rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  cursor: pointer;
}
.ht-help__button:hover,
.ht-help__button:focus {
  background: var(--ht-help-accent-dark);
  outline: 3px solid rgba(122, 78, 44, .22);
  outline-offset: 2px;
}
.ht-help__icon,
.ht-help__header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
}
.ht-help__header-icon {
  width: 2.45rem;
  height: 2.45rem;
  background: rgba(122, 78, 44, .12);
}
.ht-help__dottie-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.ht-help__dottie-bg {
  fill: rgba(255,255,255,.16);
}
.ht-help__header-icon .ht-help__dottie-bg {
  fill: #fffaf2;
}
.ht-help__dottie-house {
  fill: rgba(255,255,255,.22);
  stroke: currentColor;
  stroke-width: 3;
  stroke-linejoin: round;
}
.ht-help__dottie-roof,
.ht-help__dottie-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ht-help__dottie-dot {
  fill: currentColor;
}
.ht-help__panel {
  display: none;
  position: absolute;
  bottom: 3.65rem;
  width: min(420px, calc(100vw - 2rem));
  max-height: min(680px, calc(100vh - 6rem));
  background: var(--ht-help-bg);
  border: 1px solid var(--ht-help-line);
  border-radius: 1.1rem;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0,0,0,.24);
}
.ht-help--right .ht-help__panel { right: 0; }
.ht-help--left .ht-help__panel { left: 0; }
.ht-help.is-open .ht-help__panel { display: flex; flex-direction: column; }
.ht-help__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  background: rgba(122, 78, 44, .08);
  border-bottom: 1px solid var(--ht-help-line);
}
.ht-help__header strong { display: block; font-size: 1.03rem; }
.ht-help__header-copy { min-width: 0; }
.ht-help__header small { display: block; color: var(--ht-help-muted); margin-top: .08rem; }
.ht-help__close {
  border: 0;
  background: transparent;
  color: var(--ht-help-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.ht-help__body {
  overflow: auto;
  padding: 1rem;
}

.ht-help__status {
  margin: 0 0 .7rem;
  padding: .48rem .62rem;
  border: 1px solid rgba(53, 93, 78, .22);
  border-radius: .7rem;
  background: rgba(90, 128, 103, .08);
  color: #355d4e;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.35;
}
.ht-help__status[hidden] { display: none !important; }

.ht-help__message {
  margin: 0 0 .7rem;
  padding: .72rem .82rem;
  border-radius: .85rem;
  line-height: 1.42;
  font-size: .95rem;
}
.ht-help__message--assistant {
  background: #fff;
  border: 1px solid var(--ht-help-line);
}
.ht-help__message--user {
  background: rgba(122, 78, 44, .1);
  border: 1px solid rgba(122, 78, 44, .18);
  margin-left: 2rem;
}
.ht-help__message--error {
  background: #fff1f1;
  border: 1px solid rgba(160, 40, 40, .25);
}
.ht-help__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .75rem 0 .85rem;
}
.ht-help__suggestion {
  border: 1px solid var(--ht-help-line);
  border-radius: 999px;
  background: #fff;
  color: var(--ht-help-accent-dark);
  padding: .38rem .62rem;
  font-size: .86rem;
  cursor: pointer;
}
.ht-help__suggestion:hover,
.ht-help__suggestion:focus {
  border-color: rgba(122, 78, 44, .45);
  outline: 2px solid rgba(122, 78, 44, .12);
}
.ht-help__form {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: .75rem;
  border-top: 1px solid var(--ht-help-line);
  background: #fff;
}
.ht-help__composer {
  min-width: 0;
}
.ht-help__input {
  box-sizing: border-box;
  width: 100%;
  min-height: 3rem;
  max-height: 7rem;
  resize: vertical;
  border: 1px solid var(--ht-help-line);
  border-radius: .7rem;
  padding: .65rem .7rem;
  font: inherit;
}
.ht-help__input:focus {
  outline: 3px solid rgba(122, 78, 44, .14);
  border-color: rgba(122, 78, 44, .45);
}
.ht-help__form-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: .55rem;
  min-width: 0;
}
.ht-help__voice {
  position: static;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 1px solid rgba(122, 78, 44, .28);
  border-radius: .7rem;
  background: #fffaf2;
  color: var(--ht-help-accent-dark);
  padding: .68rem .82rem;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.ht-help__voice-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ht-help__voice-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ht-help__voice-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ht-help__voice:hover,
.ht-help__voice:focus {
  border-color: rgba(122, 78, 44, .55);
  outline: 3px solid rgba(122, 78, 44, .12);
}
.ht-help__voice.is-requesting,
.ht-help__voice.is-stopping,
.ht-help__voice.is-transcribing {
  background: #f4eee6;
  color: #5f5145;
}
.ht-help__voice.is-recording {
  background: #8b3028;
  border-color: #8b3028;
  color: #fff;
  animation: htHelpVoicePulse 1.4s infinite;
}
.ht-help__voice.is-transcribing .ht-help__voice-icon {
  animation: htHelpVoiceSpin 1s linear infinite;
}
.ht-help__voice:disabled { opacity: .68; cursor: wait; }
.ht-help__voice[data-phase="unsupported"] { opacity: .52; cursor: not-allowed; }
.ht-help__voice-cancel {
  align-self: flex-start;
  border: 1px solid rgba(139, 48, 40, .32);
  border-radius: 999px;
  background: #fff7f5;
  color: #79312b;
  padding: .38rem .7rem;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}
.ht-help__voice-status {
  margin: 0;
  padding: .45rem .58rem;
  border-radius: .62rem;
  background: rgba(122, 78, 44, .07);
  color: var(--ht-help-muted);
  font-size: .78rem;
  line-height: 1.35;
}
.ht-help__voice-status[data-state="recording"] { color: #7a2823; background: rgba(139, 48, 40, .08); }
.ht-help__voice-status[data-state="success"] { color: #355d4e; background: rgba(90, 128, 103, .1); }
.ht-help__voice-status[data-state="error"] { color: #8b3028; background: #fff1f1; }
@keyframes htHelpVoicePulse {
  0% { box-shadow: 0 0 0 0 rgba(139, 48, 40, .28); }
  70% { box-shadow: 0 0 0 9px rgba(139, 48, 40, 0); }
  100% { box-shadow: 0 0 0 0 rgba(139, 48, 40, 0); }
}
@keyframes htHelpVoiceSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ht-help__send {
  flex: 0 0 auto;
  align-self: stretch;
  min-height: 2.8rem;
  border: 0;
  border-radius: .7rem;
  background: var(--ht-help-accent);
  color: #fff;
  padding: .72rem .95rem;
  font-weight: 700;
  cursor: pointer;
}
.ht-help__send:disabled {
  opacity: .55;
  cursor: wait;
}
.ht-help__typing {
  color: var(--ht-help-muted);
  font-style: italic;
}
.ht-help a { color: var(--ht-help-accent-dark); text-decoration: underline; }
.ht-help ul { margin: .4rem 0 0 1.15rem; padding: 0; }
.ht-help li { margin: .18rem 0; }
.visually-hidden {
  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;
}
@media (max-width: 600px) {
  /* Mobile: keep Dottie available without competing with the homepage hero buttons. */
  .ht-help {
    left: auto;
    right: .85rem;
    bottom: .85rem;
  }
  .ht-help--right,
  .ht-help--left {
    left: auto;
    right: .85rem;
  }
  .ht-help__button {
    width: 3.45rem;
    height: 3.45rem;
    min-width: 3.45rem;
    padding: 0;
    justify-content: center;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
  }
  .ht-help__button > span:not(.ht-help__icon) {
    display: none;
  }
  .ht-help__icon {
    width: 2.25rem;
    height: 2.25rem;
    background: rgba(255,255,255,.22);
  }
  .ht-help__panel {
    width: min(390px, calc(100vw - 1.5rem));
    right: 0;
    left: auto;
    bottom: 4.15rem;
    max-height: calc(100vh - 6rem);
  }
  .ht-help__form-actions {
    gap: .5rem;
  }
  .ht-help__voice,
  .ht-help__send {
    min-height: 2.85rem;
  }
}

@media (max-width: 390px) {
  .ht-help {
    right: .65rem;
    bottom: .65rem;
  }
  .ht-help__button {
    width: 3.15rem;
    height: 3.15rem;
    min-width: 3.15rem;
  }
  .ht-help__icon {
    width: 2.05rem;
    height: 2.05rem;
  }
  .ht-help__panel {
    width: calc(100vw - 1.1rem);
    bottom: 3.85rem;
    max-height: calc(100vh - 5.5rem);
  }
  .ht-help__voice {
    padding-inline: .68rem;
  }
  .ht-help__form-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 330px) {
  .ht-help__voice-label { font-size: .82rem; }
  .ht-help__voice,
  .ht-help__send { padding-inline: .62rem; }
}


