/* Redzone AI Chat: the site-wide chat button, its pop-up and its list. Loaded on public pages that have no
   chat of their own, from the end of the page (after the theme's stylesheets). Colours follow the Delta
   theme: red #FF3838, page #f7f8fb, navy #0b253b. Stacking: under the theme's fixed top menu (95) and its
   modals (98 and up). */

.rzai-fab-root { position: fixed; right: 16px; bottom: 16px; z-index: 94; font-size: 14px; line-height: 1.4; color: #222; text-align: left; }
.rzai-fab-root, .rzai-fab-root * { box-sizing: border-box; }
.rzai-fab-root [hidden] { display: none !important; }
.rzai-fab-root a, .rzai-fab-root a:hover { text-decoration: none; }

/* ---- button: a pill with a label on wide screens, a round button on phones ---- */
.rzai-fab-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; float: none; width: auto; min-width: 0; height: 50px; margin: 0; padding: 0 20px 0 16px; border: 0; border-radius: 25px; background: #FF3838; color: #fff; font-family: inherit; font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: 0; text-transform: none; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.28); transition: transform .15s, background .15s; -webkit-tap-highlight-color: transparent; }
.rzai-fab-btn:hover { background: #e62a2a; color: #fff; transform: translateY(-1px); }
.rzai-fab-btn:focus-visible { outline: 3px solid rgba(255,56,56,.45); outline-offset: 2px; }
.rzai-fab-ico { position: relative; flex: none; display: block; width: 24px; height: 24px; }
.rzai-fab-ico svg { display: block; width: 24px; height: 24px; }
/* "online" dot on the icon; gone while the chat is paused */
.rzai-fab-ico::after { content: ""; position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: #00c944; box-shadow: 0 0 0 2px #FF3838; }
.rzai-fab-off .rzai-fab-ico::after { display: none; }
.rzai-fab-label { white-space: nowrap; }
.rzai-fab-badge { position: absolute; top: -6px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #0b253b; color: #fff; font-size: 12px; line-height: 22px; font-weight: 700; text-align: center; box-shadow: 0 0 0 2px #fff; }
.rzai-fab-btn.rzai-fab-unread::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: rzai-fab-ring 2s infinite; }
@keyframes rzai-fab-ring { 0% { box-shadow: 0 0 0 0 rgba(255,56,56,.55); } 70% { box-shadow: 0 0 0 14px rgba(255,56,56,0); } 100% { box-shadow: 0 0 0 0 rgba(255,56,56,0); } }

/* ---- shared pieces ---- */
.rzai-fab-pop, .rzai-fab-panel { position: absolute; right: 0; bottom: 62px; background: #fff; border-radius: 12px; box-shadow: 0 0 0 1px rgba(0,0,0,.12), 0 12px 34px rgba(0,0,0,.26); animation: rzai-fab-in .22s ease-out; }
@keyframes rzai-fab-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rzai-fab-x { position: absolute; right: 6px; top: 6px; z-index: 2; float: none; width: 30px; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: none; color: #777; font-family: inherit; font-size: 22px; line-height: 30px; font-weight: 400; text-align: center; cursor: pointer; }
.rzai-fab-x:hover { background: #f0f2f7; color: #111; }
/* The listing photos are portrait (3:4). The picture is pinned to the round box so it is always cut to a
   circle; sized by percentages inside a grid it kept its own proportions and showed as an oval (0.1.18). */
.rzai-fab-ava { position: relative; flex: none; display: block; width: 44px; height: 44px; border-radius: 50%; background: #e0e2e9; box-shadow: 0 0 0 1px rgba(0,0,0,.12); color: #777; font-size: 17px; line-height: 44px; font-weight: 700; text-align: center; }
.rzai-fab-ava img { position: absolute; left: 0; top: 0; display: block; width: 100%; height: 100%; max-width: none; margin: 0; border-radius: 50%; object-fit: cover; object-position: center 20%; }
.rzai-fab-ava::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #00c944; box-shadow: 0 0 0 2px #fff; }
.rzai-fab-off .rzai-fab-ava::after { display: none; }
.rzai-fab-tx { flex: 1; min-width: 0; display: block; }
.rzai-fab-nm { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rzai-fab-nm b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 19px; font-weight: 700; color: #111; }
.rzai-fab-nm i { flex: none; margin-left: auto; font-style: normal; font-size: 11px; line-height: 14px; color: #999; }
.rzai-fab-nd { flex: none; margin-left: auto; width: 9px; height: 9px; border-radius: 50%; background: #FF3838; }
.rzai-fab-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 16px; color: #777; }

/* ---- pop-up: a character "writes" ---- */
.rzai-fab-pop { width: 320px; max-width: calc(100vw - 32px); padding: 12px; }
/* (the theme colours every hovered link blue, with more weight than a single class: hover colours are set here on purpose) */
.rzai-fab-pop-main, .rzai-fab-pop-main:hover { display: flex; align-items: center; gap: 10px; padding-right: 30px; color: inherit; }
.rzai-fab-pop-msg { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; margin: 10px 0 0; padding: 9px 12px; border-radius: 13px; border-bottom-left-radius: 3px; background: #f1f2f6; color: #222; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.rzai-fab-pop-msg:hover { color: #222; background: #eceef3; }
.rzai-fab-pop-msg.rzai-fab-typing { display: inline-flex; gap: 4px; align-items: center; padding: 13px 14px; }
.rzai-fab-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9aa0aa; animation: rzai-fab-blink 1.2s infinite both; }
.rzai-fab-typing i:nth-child(2) { animation-delay: .2s; }
.rzai-fab-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes rzai-fab-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.rzai-fab-cta { display: block; margin: 10px 0 0; padding: 9px 12px; border-radius: 3px; background: #FF3838; color: #fff; font-size: 14px; line-height: 18px; font-weight: 600; text-align: center; }
.rzai-fab-cta:hover { background: #e62a2a; color: #fff; }

/* ---- list ---- */
.rzai-fab-panel { display: flex; flex-direction: column; width: 360px; max-width: calc(100vw - 32px); max-height: min(560px, calc(100vh - 150px)); overflow: hidden; }
.rzai-fab-panel[hidden] { display: none !important; }
.rzai-fab-head { flex: none; position: relative; padding: 13px 44px 12px 14px; border-bottom: 1px solid #e3e5ea; }
.rzai-fab-head b { display: block; font-size: 16px; line-height: 20px; font-weight: 700; color: #111; }
.rzai-fab-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0 8px; }
.rzai-fab-sec { padding: 10px 14px 4px; font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #888; }
.rzai-fab-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: inherit; }
.rzai-fab-row:hover, .rzai-fab-row:focus-visible { background: #f7f8fb; color: inherit; outline: none; }
.rzai-fab-ln { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 18px; color: #666; }
.rzai-fab-new .rzai-fab-ln { color: #111; font-weight: 600; }
.rzai-fab-note { padding: 16px 14px; font-size: 13px; line-height: 18px; color: #777; }
.rzai-fab-foot { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 9px 14px 10px; border-top: 1px solid #e3e5ea; background: #f7f8fb; }
.rzai-fab-all, .rzai-fab-all:hover { font-size: 13px; line-height: 18px; font-weight: 600; color: #111; text-decoration: underline !important; }
.rzai-fab-fine { font-size: 11px; line-height: 15px; color: #777; }

/* ---- the theme's own fixed pieces ---- */
/* "back to top" (desktop only in the theme) sits where the button is: lift it above, and out of the way of the pop-up and the list */
html.rzai-has-fab #scroll-to-top { right: 25px; bottom: 78px; }
html.rzai-fab-busy #scroll-to-top { display: none !important; }

@media (max-width: 767px) {
  .rzai-fab-root { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .rzai-fab-btn { width: 54px; height: 54px; padding: 0; justify-content: center; border-radius: 50%; }
  .rzai-fab-ico, .rzai-fab-ico svg { width: 26px; height: 26px; }
  .rzai-fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .rzai-fab-pop, .rzai-fab-panel { bottom: 64px; max-width: calc(100vw - 24px); }
  .rzai-fab-pop { width: 300px; }
  .rzai-fab-pop-msg { -webkit-line-clamp: 3; }
  .rzai-fab-panel { width: calc(100vw - 24px); max-height: calc(100vh - 170px); }
  /* On a listing page the theme slides a contact bar in along the bottom edge once the visitor scrolls down:
     the button waits above where that bar goes. Browsers that can tell whether the bar is showing keep the
     button in its normal place until it does. */
  body#body-item .rzai-fab-root { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  @supports selector(:has(*)) {
    body#body-item .rzai-fab-root { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transition: bottom .25s; }
    body#body-item:has(#item-summary.shown) .rzai-fab-root { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .rzai-fab-btn, .rzai-fab-btn.rzai-fab-unread::before, .rzai-fab-pop, .rzai-fab-panel, .rzai-fab-typing i { animation: none; transition: none; }
}
@media print {
  .rzai-fab-root { display: none !important; }
}
