/* Local-only Haoweya website assistant. No external assets or services. */
#hw-assistant, #hw-assistant * { box-sizing: border-box; }
#hw-assistant {
  --hw-forest: #101915;
  --hw-forest-soft: #1b2821;
  --hw-paper: #fffdf7;
  --hw-ink: #18211c;
  --hw-muted: #70776e;
  --hw-copper: #bd8754;
  --hw-line: #e6e1d7;
  position: fixed;
  z-index: 99998;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  color: var(--hw-ink);
  font-family: "DM Sans", "Noto Sans Arabic", Arial, sans-serif;
  line-height: 1.5;
  direction: ltr;
}
#hw-assistant[dir="rtl"] { direction: rtl; font-family: "Noto Sans Arabic", "DM Sans", Arial, sans-serif; }
#hw-assistant button, #hw-assistant input { font: inherit; }
#hw-assistant button:focus-visible, #hw-assistant input:focus-visible, #hw-assistant a:focus-visible { outline: 3px solid #d7aa79; outline-offset: 2px; }
.hw-launcher {
  display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 18px;
  border: 1px solid #d5b28c; border-radius: 999px; background: var(--hw-forest); color: #fffaf0;
  box-shadow: 0 9px 30px #10191535; cursor: pointer; font-size: 14px; font-weight: 650;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.hw-launcher:hover { transform: translateY(-2px); background: var(--hw-forest-soft); box-shadow: 0 12px 34px #10191544; }
.hw-launcher-mark { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #d4a876; border-radius: 50%; color: #e4bd91; font-family: Georgia, serif; font-size: 16px; }
.hw-panel {
  position: absolute; right: 0; left: auto; bottom: 68px; display: flex; width: min(390px, calc(100vw - 40px)); max-width: calc(100vw - 40px); height: min(570px, calc(100dvh - 112px));
  min-height: min(390px, calc(100dvh - 112px)); flex-direction: column; overflow: hidden; border: 1px solid #d8d1c4; border-radius: 18px;
  background: var(--hw-paper); box-shadow: 0 22px 70px #10191535; animation: hw-rise .18s ease-out;
}
#hw-assistant[dir="rtl"] .hw-panel { right: 0; left: auto; }
@keyframes hw-rise { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.hw-panel[hidden] { display: none !important; }
.hw-head { display: flex; align-items: center; gap: 11px; padding: 16px 17px; background: var(--hw-forest); color: #fffaf0; }
.hw-head-mark { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid #bd8754; border-radius: 50%; color: #e4bd91; font-family: Georgia, serif; font-size: 21px; }
.hw-head-copy { min-width: 0; flex: 1; }
.hw-head h2 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; }
.hw-head p { margin: 4px 0 0; color: #c8c9bc; font-size: 11px; }
.hw-close { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid #ffffff3b; border-radius: 50%; color: #fffaf0; cursor: pointer; font-size: 21px; line-height: 1; }
.hw-close:hover { background: #ffffff18; }
.hw-messages { display: flex; flex: 1; flex-direction: column; gap: 11px; overflow-y: auto; padding: 16px; background: #f7f4ed; scroll-behavior: smooth; }
.hw-message { max-width: 91%; padding: 11px 13px; border: 1px solid var(--hw-line); border-radius: 14px 14px 14px 4px; background: #fff; color: #303930; font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.hw-message-user { align-self: flex-end; border-color: #d9c3a8; border-radius: 14px 14px 4px 14px; background: #f0e6d8; }
#hw-assistant[dir="rtl"] .hw-message { border-radius: 14px 14px 4px 14px; }
#hw-assistant[dir="rtl"] .hw-message-user { border-radius: 14px 14px 14px 4px; }
.hw-message a { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; color: #765333; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.hw-suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 12px; background: #f7f4ed; }
.hw-suggestion { padding: 7px 10px; border: 1px solid #d8c6ad; border-radius: 999px; background: #fffdf7; color: #554b3d; cursor: pointer; font-size: 11px !important; transition: background .15s, border-color .15s; }
.hw-suggestion:hover { border-color: var(--hw-copper); background: #f4eadb; }
.hw-form { display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid var(--hw-line); background: #fffdf7; }
.hw-input { width: 100%; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid #ded9cf; border-radius: 10px; background: #fff; color: var(--hw-ink); font-size: 13px !important; }
.hw-input::placeholder { color: #898d83; }
.hw-send { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 10px; background: var(--hw-forest); color: #fffaf0; cursor: pointer; font-size: 18px !important; }
.hw-send:hover { background: #2d4034; }
.hw-privacy { margin: 0; padding: 0 13px 10px; background: #fffdf7; color: var(--hw-muted); font-size: 10px; text-align: center; }
@media (max-width: 600px) {
  #hw-assistant { right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); left: auto; max-width: calc(100vw - 20px); }
  #hw-assistant[dir="rtl"] { right: max(10px, env(safe-area-inset-right)); left: auto; }
  .hw-launcher { min-height: 48px; max-width: calc(100vw - 20px); padding: 0 14px; }
  .hw-panel, #hw-assistant[dir="rtl"] .hw-panel { position: fixed; right: max(10px, env(safe-area-inset-right)); left: auto; bottom: 68px; width: calc(100vw - 20px); max-width: 390px; height: min(560px, calc(100dvh - 88px)); min-height: min(320px, calc(100dvh - 88px)); border-radius: 16px; }
  .hw-head { padding: 13px 14px; }
  .hw-messages { padding: 12px; }
  .hw-message { max-width: 94%; font-size: 12.5px; }
  .hw-suggestions { padding: 0 10px 10px; }
  .hw-form { padding: 10px; }
  .hw-privacy { padding-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .hw-launcher, .hw-panel, .hw-messages { animation: none; transition: none; scroll-behavior: auto; } }

/* Make the home-page contact block visible as part of the site footer. */
body:not(.store-body) footer .hw-contact-info {
  display: flex; width: 100%; flex: 0 0 100%; grid-column: 1 / -1;
  align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 24px;
  padding: 22px clamp(20px, 5vw, 80px); border-top: 1px solid #d4b47b66;
  background: transparent; color: #efe7d5; font-size: 13px;
}
body:not(.store-body) footer .hw-contact-info h2 {
  width: 100%; margin: 0 0 2px; color: #e4bd91; text-align: center;
  font-family: "Noto Sans Arabic", "DM Sans", Arial, sans-serif; font-size: 16px; font-weight: 700;
}
body:not(.store-body) footer .hw-contact-info p { margin: 0; color: #efe7d5; }
body:not(.store-body) footer .hw-contact-info a { color: #e5c38e; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
@media (max-width: 600px) {
  body:not(.store-body) footer .hw-contact-info { gap: 8px 14px; padding: 18px 14px; }
  body:not(.store-body) footer .hw-contact-info p { width: 100%; text-align: center; }
}
