/* HostNest - chat.css: the sticky live chat launcher (assets/js/chat.js, myadmin > Live chat).
   Loaded only on pages where the launcher is shown. Colours follow the website theme unless a colour is set. */

.hnc {
  --hnc-c: var(--g700, #0b7a3e);
  --hnc-c2: var(--g900, #0a4a2b);
  --hnc-x: 20px;
  --hnc-y: 20px;
  --hnc-my: 16px;
  --hnc-lift: 0px;
  position: fixed;
  bottom: calc(var(--hnc-y) + var(--hnc-lift) + env(safe-area-inset-bottom, 0px));
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  max-width: calc(100vw - 24px);
  font-family: var(--font, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  line-height: 1.4;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .35s ease, transform .35s ease, bottom .25s ease;
  pointer-events: none;
}
.hnc--right { right: var(--hnc-x); }
.hnc--left { left: var(--hnc-x); align-items: flex-start; }
@supports (color: color-mix(in srgb, red, blue)) {
  .hnc { --hnc-c2: color-mix(in srgb, var(--hnc-c) 68%, #000); }   /* darker shade of the button colour */
}
.hnc.is-ready { opacity: 1; transform: none; }
.hnc.is-ready > * { pointer-events: auto; }
.hnc.is-away { opacity: 0; transform: translateY(14px) scale(.9); }
.hnc.is-away > * { pointer-events: none; }
.hnc [hidden] { display: none !important; }

/* ---------- button ---------- */
.hnc-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 60px;
  height: 60px;
  padding: 0 17px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--hnc-c), var(--hnc-c2));
  color: #fff;
  font: inherit;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, .38), 0 4px 10px -4px rgba(0, 0, 0, .25);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.hnc-btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 16px 34px -10px rgba(0, 0, 0, .42), 0 6px 12px -4px rgba(0, 0, 0, .25); }
.hnc-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px var(--hnc-c); }
.hnc-btn-ico, .hnc-btn-x { display: grid; place-items: center; transition: transform .25s ease, opacity .2s ease; }
.hnc-btn-x { position: absolute; left: 50%; top: 50%; opacity: 0; transform: translate(-50%, -50%) rotate(-90deg); }
.hnc-svg { display: inline-grid; place-items: center; line-height: 0; }
.hnc-label { display: none; white-space: nowrap; }
.hnc--label .hnc-btn { padding: 0 22px 0 18px; }
.hnc.is-open .hnc-btn-ico, .hnc.is-open .hnc-label { opacity: 0; }
.hnc.is-open .hnc-btn-x { opacity: 1; transform: translate(-50%, -50%) rotate(0); }

/* unread count, online dot, test tag */
.hnc-badge { position: absolute; top: -3px; right: -3px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border: 2px solid #fff; border-radius: 999px; background: #e11d48; color: #fff; font-size: .72rem; font-weight: 800; line-height: 1; }
.hnc--left .hnc-badge { right: auto; left: -3px; }
.hnc-dot { position: absolute; bottom: 4px; right: 4px; display: none; width: 13px; height: 13px; border: 2px solid #fff; border-radius: 50%; background: #94a3b8; }
.hnc--left .hnc-dot { right: auto; left: 4px; }
.hnc[data-status] .hnc-dot { display: block; }
.hnc[data-status="online"] .hnc-dot { background: #22c55e; }
.hnc[data-status="away"] .hnc-dot { background: #f59e0b; }
.hnc-test { position: absolute; top: -10px; left: 50%; padding: 1px 7px; border-radius: 999px; background: #111827; color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; transform: translateX(-50%); }

/* attention ring, new message bump, loading */
.hnc--pulse .hnc-btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 var(--hnc-c); opacity: .55; animation: hnc-ring 2.6s ease-out 1.2s 3; pointer-events: none; }
.hnc.is-open .hnc-btn::after { animation: none; }
@keyframes hnc-ring { 0% { box-shadow: 0 0 0 0 var(--hnc-c); opacity: .55; } 80%, 100% { box-shadow: 0 0 0 18px var(--hnc-c); opacity: 0; } }
.hnc.is-bump .hnc-btn { animation: hnc-bump .7s ease; }
@keyframes hnc-bump { 0%, 100% { transform: none; } 20% { transform: rotate(-10deg) scale(1.06); } 40% { transform: rotate(9deg) scale(1.06); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
.hnc.is-loading .hnc-btn { cursor: progress; }
.hnc.is-loading .hnc-btn-ico { opacity: 0; }
.hnc.is-loading .hnc-btn::before { content: ""; position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; border: 3px solid rgba(255, 255, 255, .35); border-color: #fff rgba(255, 255, 255, .35) rgba(255, 255, 255, .35); border-radius: 50%; animation: hnc-spin .8s linear infinite; }
.hnc--label.is-loading .hnc-btn::before { left: 30px; }
@keyframes hnc-spin { to { transform: rotate(360deg); } }

/* ---------- greeting bubble ---------- */
.hnc-greet { position: relative; max-width: 290px; animation: hnc-in .35s ease both; }
.hnc-greet-body { display: grid; gap: 3px; width: 100%; padding: 14px 18px 14px 16px; border: 1px solid rgba(0, 0, 0, .06); border-radius: 18px; background: #fff; color: var(--ink, #0f1f17); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .35); }
.hnc--right .hnc-greet-body { border-radius: 18px 18px 6px 18px; }
.hnc--left .hnc-greet-body { border-radius: 18px 18px 18px 6px; }
.hnc-greet-name { font-size: .74rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--hnc-c); }
.hnc-greet-text { font-size: .92rem; font-weight: 600; line-height: 1.45; }
.hnc-greet-x { position: absolute; top: -9px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: #1f2937; color: #fff; cursor: pointer; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); z-index: 1; }
.hnc--right .hnc-greet-x { left: -9px; }
.hnc--left .hnc-greet-x { right: -9px; }

/* ---------- menu ---------- */
.hnc-panel { width: 340px; max-width: calc(100vw - 24px); max-height: min(70vh, 560px); overflow: hidden auto; border-radius: 20px; background: #fff; color: var(--ink, #0f1f17); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .05); animation: hnc-in .25s ease both; overscroll-behavior: contain; }
@keyframes hnc-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.hnc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 18px 18px 20px; background: linear-gradient(140deg, var(--hnc-c), var(--hnc-c2)); color: #fff; }
.hnc-title { margin: 0; font-size: 1.08rem; font-weight: 800; line-height: 1.3; }
.hnc-sub { margin: 4px 0 0; font-size: .84rem; opacity: .88; }
.hnc-x { display: grid; flex: none; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; transition: background-color .2s; }
.hnc-x:hover { background: rgba(255, 255, 255, .28); }
.hnc-x:focus-visible, .hnc-item:focus-visible, .hnc-greet-x:focus-visible, .hnc-greet-body:focus-visible { outline: 2px solid var(--hnc-c); outline-offset: 2px; }
.hnc-note { margin: 12px 12px 0; padding: 10px 12px; border-radius: 12px; background: #fff7e6; color: #8a4b00; font-size: .84rem; font-weight: 600; }
.hnc-list { display: grid; gap: 6px; margin: 0; padding: 12px; list-style: none; }
.hnc-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 1px solid var(--line, #e1ede6); border-radius: 14px; background: #fff; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: background-color .2s, border-color .2s, transform .2s; }
.hnc-item:hover { border-color: var(--hnc-c); background: #f7faf9; transform: translateY(-1px); }
.hnc-item-ico { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--hnc-c); color: #fff; }
.hnc-item--whatsapp .hnc-item-ico { background: #25d366; }
.hnc-item--messenger .hnc-item-ico { background: #0a7cff; }
.hnc-item--telegram .hnc-item-ico { background: #229ed9; }
.hnc-item-txt { display: grid; flex: 1 1 auto; min-width: 0; }
.hnc-item-txt b { font-size: .93rem; font-weight: 700; }
.hnc-item-txt small { overflow: hidden; font-size: .78rem; color: var(--muted, #55655c); text-overflow: ellipsis; white-space: nowrap; }
.hnc-item-go { flex: none; color: var(--muted, #55655c); }

/* ---------- phones ---------- */
@media (max-width: 767px) {
  .hnc { bottom: calc(var(--hnc-my) + var(--hnc-lift) + env(safe-area-inset-bottom, 0px)); }
  .hnc--right { right: min(var(--hnc-x), 16px); }
  .hnc--left { left: min(var(--hnc-x), 16px); }
  .hnc-btn { min-width: 56px; height: 56px; padding: 0 15px; }
  .hnc--label .hnc-btn { padding: 0 15px; }
  .hnc-greet { max-width: min(290px, calc(100vw - 32px)); }
}
@media (min-width: 768px) {
  .hnc--label .hnc-label { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .hnc, .hnc-btn, .hnc-btn-ico, .hnc-btn-x, .hnc-item { transition: none; }
  .hnc--pulse .hnc-btn::after, .hnc.is-bump .hnc-btn, .hnc-panel, .hnc-greet { animation: none; }
  .hnc.is-loading .hnc-btn::before { animation-duration: 2s; }
}
@media print {
  .hnc { display: none !important; }
}
