/* Haunds AI audit visual update */
.hd-ai-widget[data-hd-ai-open] {
  left: auto; right: 20px; bottom: max(22px, env(safe-area-inset-bottom));
  display: grid; justify-items: end; gap: 10px;
  padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.hd-ai-widget[data-hd-ai-open] img {
  grid-row: 2; width: 90px; height: 90px; object-fit: contain;
  filter: drop-shadow(0 3px 4px #0003);
  animation: hd-ai-nod 6s ease-in-out 2;
  transform-origin: 60% 82%;
}
.hd-ai-widget[data-hd-ai-open] span {
  grid-row: 1; position: relative; margin-right: 10px; padding: 10px 14px;
  max-width: 190px; text-align: left; font-size: 15px; line-height: 1.25;
  border: 1px solid #252525; border-radius: 15px; background: #d3e62c;
}
.hd-ai-widget[data-hd-ai-open] span::after {
  content: ""; position: absolute; right: 20px; bottom: -6px;
  width: 10px; height: 10px; background: inherit; transform: rotate(45deg);
  border-right: 1px solid #252525; border-bottom: 1px solid #252525;
}
@keyframes hd-ai-nod {
  0%, 74%, 100% { transform: rotate(0); }
  81% { transform: translateY(-4px) rotate(-8deg); }
  90% { transform: rotate(5deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hd-ai-widget[data-hd-ai-open] img { animation: none; }
}
.hd-ai-dialog { width: min(94vw, 490px); padding: clamp(18px, 5vw, 30px); }
.hd-ai-dialog form { position: relative; margin: 0; }
.hd-ai-dialog h2 { font-size: clamp(22px, 5vw, 28px); padding-right: 40px; margin: 0 0 12px; }
.hd-ai-dialog [data-hd-ai-step] > p { margin: 0 0 19px; font-size: 14px; color: #555; }
.hd-ai-dialog label { margin: 0 0 15px; font-size: 14px; line-height: 1.4; }
.hd-ai-dialog input:not([type=checkbox]) { min-height: 45px; font-size: 16px; border-color: #9a9a9a; }
.hd-ai-dialog .hd-ai-consent { align-items: flex-start; font-size: 12px; line-height: 1.5; }
.hd-ai-dialog .hd-ai-consent input { flex: 0 0 16px; width: 16px; height: 16px; margin: 2px 0 0; accent-color: #b6c625; }
.hd-ai-dialog .hd-ai-consent a { color: inherit; text-decoration: underline; }
.hd-ai-close { float: none; position: absolute; top: -4px; right: -4px; display: grid; place-items: center; width: 36px; height: 36px; margin: 0; border-radius: 50%; background: #f0f0eb; }
.hd-ai-dialog .hd-ai-cta, #hd-ai-back { min-height: 44px; font-size: 14px; padding: 10px 16px; }
.hd-ai-dialog .hd-ai-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
#hd-ai-back { border: 1px solid #8b8b8b; background: white; color: #181818; font-family: inherit; font-weight: 600; border-radius: 100px; cursor: pointer; }
@media (max-width: 600px) {
  .hd-ai-widget[data-hd-ai-open] { right: 12px; bottom: max(14px, env(safe-area-inset-bottom)); }
  .hd-ai-widget[data-hd-ai-open] img { width: 66px; height: 66px; }
  .hd-ai-widget[data-hd-ai-open] span { font-size: 12px; max-width: 132px; padding: 7px 10px; }
}
@media (max-width: 360px) {
  .hd-ai-dialog .hd-ai-actions { grid-template-columns: 1fr; }
}
