/* Happy Star product enquiry chat — preview widget */
.hs-chat { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 80; font-family: inherit; }
.hs-chat-launch {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--oxblood-deep);
  box-shadow: 0 10px 24px rgba(16, 3, 3, .45), inset 0 1px 0 rgba(255,244,220,.22);
  color: var(--gold-light);
  cursor: pointer; display: grid; place-items: center; padding: 0;
}
.hs-chat-launch img { width: 28px; height: 32px; display: block; pointer-events: none; }
.hs-chat-launch:hover { background: var(--oxblood-rich); }
.hs-chat-launch:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.hs-chat.is-open .hs-chat-launch,
.hs-chat.is-open .hs-chat-hint,
.hs-chat.is-open .hs-chat-dock { display: none; }

.hs-chat-dock {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

/* "Ask Happy Star" slide-out, to the left of the bubble */
.hs-chat-hint {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translate(14px, -50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  margin: 0;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 74, .7);
  background: rgba(86, 20, 17, .94);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--gold-light);
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(16, 3, 3, .4), inset 0 1px 0 rgba(255, 244, 220, .22);
  transition: transform .38s ease, opacity .32s ease, visibility .32s ease;
  z-index: 1;
}
.hs-chat-hint:hover { background: rgba(122, 34, 28, .86); }
.hs-chat-hint:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.hs-chat.is-hint .hs-chat-hint {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(0, -50%);
}

/* Keep slideshow dots clear of the closed bubble; lift/shift when the label is out */
.show-dots { transition: right .35s ease, bottom .35s ease; }
@media (min-width: 900px) {
  .show-dots { right: 84px; }
  html.hs-chat-hint-on .show-dots { right: 240px; }
}
@media (max-width: 899px) {
  .show-dots { right: 72px; }
  html.hs-chat-hint-on .show-dots { right: 12px; bottom: 86px; }
}

.hs-chat-panel {
  display: none;
  width: min(380px, calc(100vw - 24px));
  height: min(520px, calc(100dvh - 120px));
  flex-direction: column;
  background: #FFF8F0;
  color: #1a0c0c;
  border: 1px solid rgba(201, 162, 74, .55);
  border-radius: 16px;
  box-shadow: 0 22px 48px rgba(12, 2, 2, .5);
  overflow: hidden;
  margin-bottom: 8px;
}
.hs-chat.is-open .hs-chat-panel { display: flex; }

.hs-chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 14px;
  background: var(--oxblood-deep);
  color: var(--gold-light);
  border-bottom: 1px solid rgba(201, 162, 74, .4);
}
.hs-chat-head img { width: 22px; height: 26px; flex-shrink: 0; }
.hs-chat-head strong { display: block; font-size: .92rem; letter-spacing: .02em; }
.hs-chat-head span { display: block; font-size: .68rem; color: rgba(243, 217, 139, .8); font-weight: 500; }
.hs-chat-head-text { flex: 1; min-width: 0; }
.hs-chat-close {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(201, 162, 74, .45);
  background: transparent; color: var(--gold-light);
  cursor: pointer; font-size: 1.15rem; line-height: 1;
}
.hs-chat-close:hover { background: rgba(255,255,255,.08); }
.hs-chat-close:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }

.hs-chat-log {
  flex: 1; overflow-y: auto; padding: 14px 12px;
  display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(180deg, #FFF8F0, #F7EFE6);
}
.hs-chat-msg {
  max-width: 92%; padding: 8px 11px; border-radius: 12px;
  font-size: .88rem; line-height: 1.45; word-wrap: break-word;
}
.hs-chat-msg a { color: var(--oxblood); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.hs-chat-msg.bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(94, 25, 20, .16);
  color: #1a0c0c;
  border-top-left-radius: 4px;
}
.hs-chat-msg.user {
  align-self: flex-end;
  background: var(--oxblood);
  color: #FFF7EC;
  border: 1px solid rgba(201, 162, 74, .35);
  border-top-right-radius: 4px;
}
.hs-chat-msg.user a { color: var(--gold-light); }
.hs-chat-msg[dir="rtl"] { text-align: right; }
.hs-chat-msg.err { background: #f8ece9; color: var(--oxblood-deep); }
.hs-chat-typing { font-size: .8rem; color: #7a4a44; font-style: italic; align-self: flex-start; }

.hs-chat-form {
  display: flex; gap: 8px; padding: 10px;
  border-top: 1px solid rgba(94, 25, 20, .12);
  background: #FFFBF6;
}
.hs-chat-form input {
  flex: 1; min-width: 0;
  border: 1px solid rgba(94, 25, 20, .28);
  border-radius: 999px;
  padding: 9px 14px;
  font: inherit; font-size: .88rem;
  background: #fff; color: #1a0c0c;
}
.hs-chat-form input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.hs-chat-form button[type="submit"] {
  flex-shrink: 0;
  border: 0; border-radius: 999px;
  padding: 9px 14px;
  font: inherit; font-size: .82rem; font-weight: 700;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--oxblood-deep);
  cursor: pointer;
}
.hs-chat-form button[type="submit"]:hover { filter: brightness(1.05); }
.hs-chat-form button[type="submit"]:disabled { opacity: .55; cursor: wait; }

@media (max-width: 640px) {
  .hs-chat { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .hs-chat-panel {
    width: calc(100vw - 24px);
    height: min(70dvh, calc(100dvh - 96px));
  }
  .hs-chat-hint {
    font-size: .74rem;
    padding: 6px 11px;
    right: calc(100% + 6px);
  }
  /* header/search stay clear: panel is bottom-anchored and capped */
}
@media (prefers-reduced-motion: reduce) {
  .hs-chat-launch, .hs-chat-panel, .hs-chat-hint, .show-dots { transition: none; }
}
