/* ---------- H Byte chat assistant ---------- */
.hc { position: fixed; right: 18px; bottom: 18px; z-index: 60; font-family: var(--f-body); }

.hc-launch {
  width: 58px; height: 58px; border: 0; border-radius: 50%; cursor: pointer; position: relative;
  background: var(--blue); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 26px -8px rgba(22,119,255,.75), 0 0 0 4px rgba(22,119,255,.14);
  transition: transform .25s var(--ease), background .2s;
}
.hc-launch:hover { background: var(--blue-hover); transform: translateY(-2px); }
.hc-launch:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px var(--blue); }
.hc-launch svg { width: 27px; height: 27px; grid-area: 1 / 1; transition: opacity .2s, transform .3s var(--ease); }
.hc-ico-chat { fill: #fff; }
.hc-ico-chat circle { fill: var(--blue); }
.hc-ico-close { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; opacity: 0; transform: rotate(-90deg); }
.hc.is-open .hc-ico-chat { opacity: 0; transform: rotate(90deg) scale(.6); }
.hc.is-open .hc-ico-close { opacity: 1; transform: none; }
.hc-launch::after {             /* soft pulse ring until opened */
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--blue);
  animation: hc-pulse 2.4s var(--ease) infinite;
}
.hc.is-open .hc-launch::after { display: none; }
@keyframes hc-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }

.hc-nudge {
  position: absolute; right: 0; bottom: 72px; width: max-content; max-width: 240px; text-align: left;
  border: 0; cursor: pointer; padding: 12px 16px; border-radius: 16px 16px 4px 16px;
  background: #fff; color: var(--ink); font: 600 14px/1.4 var(--f-body);
  box-shadow: 0 0 0 1px var(--line), 0 14px 30px -12px rgba(7,20,66,.35);
  animation: hc-in .45s var(--ease) both;
}
.hc-nudge.is-out { opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; pointer-events: none; }

.hc-panel {
  position: absolute; right: 0; bottom: 74px; width: 370px; height: min(560px, calc(100svh - 120px));
  display: flex; flex-direction: column; background: var(--paper); border-radius: 20px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(7,20,66,.08), 0 30px 60px -20px rgba(7,20,66,.45);
  transform-origin: bottom right; opacity: 0; transform: translateY(12px) scale(.96);
  transition: opacity .25s var(--ease), transform .3s var(--ease);
}
.hc.is-open .hc-panel { opacity: 1; transform: none; }
.hc-panel[hidden] { display: none; }

.hc-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--navy); color: #fff; }
.hc-avatar { width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; flex: none; }
.hc-avatar img { width: 26px; height: 26px; object-fit: contain; }
.hc-head b { display: block; font-family: var(--f-display); font-size: 15px; }
.hc-head small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,.7); }
.hc-head small i { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61,220,132,.2); }
.hc-close { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255,255,255,.08); cursor: pointer; display: grid; place-items: center; }
.hc-close:hover { background: rgba(255,255,255,.16); }
.hc-close svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }

.hc-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; overscroll-behavior: contain; }
.hc-msg { max-width: 86%; animation: hc-in .3s var(--ease) both; }
.hc-msg p { margin: 0; padding: 10px 13px; font-size: 14.5px; line-height: 1.5; border-radius: 16px; overflow-wrap: anywhere; }
.hc-bot { align-self: flex-start; }
.hc-bot p { background: #fff; color: var(--ink); border-bottom-left-radius: 5px; box-shadow: 0 0 0 1px var(--line); }
.hc-user { align-self: flex-end; }
.hc-user p { background: var(--blue); color: #fff; border-bottom-right-radius: 5px; }
@keyframes hc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hc-typing { display: flex; gap: 4px; padding: 13px 14px; background: #fff; border-radius: 16px 16px 16px 5px; box-shadow: 0 0 0 1px var(--line); }
.hc-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9aa6bd; animation: hc-dot 1s infinite; }
.hc-typing span:nth-child(2) { animation-delay: .15s; }
.hc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes hc-dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.hc-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hc-links a { font-size: 13px; font-weight: 600; color: var(--blue); background: var(--blue-soft); padding: 6px 10px; border-radius: 8px; text-decoration: none; }
.hc-links a:hover { background: #d6e5ff; }
a.hc-wa { background: #25d366; color: #fff; }
a.hc-wa:hover { background: #1ebe5a; }

.hc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 4px; animation: hc-in .3s var(--ease) both; }
.hc-chip {
  border: 1.5px solid var(--blue); background: #fff; color: var(--blue); cursor: pointer;
  font: 600 13px/1 var(--f-body); padding: 8px 12px; border-radius: 999px; transition: background .15s, color .15s;
}
.hc-chip:hover, .hc-chip:focus-visible { background: var(--blue); color: #fff; outline: none; }

.hc-summary { margin-top: 6px; background: #fff; border-radius: 14px; padding: 12px 13px; box-shadow: 0 0 0 1px var(--line); display: grid; gap: 4px; font-size: 13.5px; }
.hc-summary p { padding: 0; box-shadow: none; border-radius: 0; font-size: 13.5px; }
.hc-summary small { color: var(--ink-2); font-size: 12px; line-height: 1.4; }
a.hc-wa--big { display: block; text-align: center; margin: 8px 0 2px; padding: 11px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; text-decoration: none; }

.hc-form { display: flex; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); }
.hc-form input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; font: 15px var(--f-body); color: var(--ink); background: var(--paper); }
.hc-form input:focus { outline: none; border-color: var(--blue); background: #fff; }
.hc-form button { width: 44px; border: 0; border-radius: 12px; background: var(--blue); cursor: pointer; display: grid; place-items: center; flex: none; }
.hc-form button:hover { background: var(--blue-hover); }
.hc-form button svg { width: 20px; height: 20px; fill: #fff; }
.hc-foot { display: block; text-align: center; padding: 8px 12px 10px; background: #fff; font-size: 12px; color: var(--ink-2); text-decoration: none; }
.hc-foot:hover { color: #1a9e4b; }

@media (max-width: 520px) {
  .hc { right: 14px; bottom: 14px; }
  .hc.is-open .hc-launch { opacity: 0; pointer-events: none; }
  .hc-panel { position: fixed; inset: 0; width: auto; height: 100svh; border-radius: 0; bottom: 0; }
  .hc-form input { font-size: 16px; }   /* stops iPhone zooming in */
}
@media (prefers-reduced-motion: reduce) {
  .hc-launch::after { animation: none; display: none; }
  .hc-msg, .hc-chips, .hc-nudge { animation: none; }
  .hc-typing span { animation: none; }
}

/* quote sent from the chat: status line, book button, WhatsApp link */
.hc-summary .hc-status { margin-top: 8px; padding: 9px 11px !important; border-radius: 10px !important; font-size: 13px; font-weight: 600; line-height: 1.4; }
.hc-status.is-busy { background: var(--paper); color: var(--ink-2); }
.hc-status.is-busy::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 8px; vertical-align: -1px; border-radius: 50%; border: 2px solid var(--blue-soft); border-top-color: var(--blue); animation: hcSpin .8s linear infinite; }
@keyframes hcSpin { to { transform: rotate(360deg); } }
.hc-status.is-done { background: #e8f8ee; color: #15803d; }
.hc-status.is-done::before { content: "✓ "; font-weight: 800; }
.hc-status.is-error { background: #fff4e5; color: #9a5b00; }
a.hc-book { display: block; text-align: center; margin: 8px 0 0; padding: 11px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; text-decoration: none; color: #fff; background: var(--blue); }
a.hc-book:hover { background: var(--blue-hover); }
a.hc-wa-link { display: block; text-align: center; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: #15803d; }
