.cz-chat { position:fixed; right:24px; bottom:24px; z-index:70; font-family:'Plus Jakarta Sans',system-ui,sans-serif; color:#192332; }
.cz-chat *, .cz-chat *::before, .cz-chat *::after { box-sizing:border-box; }
.cz-chat[hidden], .cz-chat [hidden] { display:none !important; }
.cz-chat-launcher { display:flex; align-items:center; gap:10px; padding:0; border:0; background:none; cursor:pointer; color:#192332; }
.cz-chat-mascot { display:block; width:64px; height:52px; object-fit:contain; filter:drop-shadow(0 3px 2px #fff9) drop-shadow(0 4px 8px #0003); transition:transform 180ms ease-out; }
.cz-chat-invite { background:#fffaf1; color:#263344; font-size:13px; font-weight:800; padding:10px 16px; border:1px solid #d8d6d0; border-radius:18px 18px 4px 18px; box-shadow:0 4px 16px #0001; }
.cz-chat-panel { position:absolute; bottom:76px; right:0; width:380px; max-width:calc(100vw - 32px); height:min(560px,calc(100dvh - 140px)); display:flex; flex-direction:column; background:#faf7f0; border:1px solid #cfd3d7; border-radius:22px; box-shadow:0 20px 70px #0004; overflow:hidden; }
.cz-chat-head { display:flex; align-items:center; gap:12px; background:#101829; color:#fff; padding:18px; flex-shrink:0; }
.cz-chat-avatar { width:48px; height:42px; object-fit:contain; }
.cz-chat-head h2 { font-size:17px; line-height:1.3; font-weight:800; margin:0; color:#fff; }
.cz-chat-head p { font-size:11px; line-height:1.5; margin:3px 0 0; color:#b9c5d6; }
.cz-chat-close { display:flex; align-items:center; justify-content:center; width:44px; height:44px; flex-shrink:0; margin-left:auto; border:1px solid #ffffff30; border-radius:12px; color:#fff; background:transparent; font-size:26px; cursor:pointer; }
.cz-chat-log { min-height:80px; flex:1; overflow-y:auto; padding:18px; overscroll-behavior:contain; }
.cz-chat-message { max-width:94%; margin:0 0 14px; padding:12px 14px; border-radius:14px 14px 14px 4px; background:#fff; border:1px solid #e4e1da; overflow-wrap:anywhere; }
.cz-chat-message p { font-size:13px; line-height:1.7; margin:4px 0 0; color:#334155; }
.cz-chat-speaker { display:block; font-size:10px; font-weight:800; color:#843b13; }
.cz-chat-user { margin-left:auto; border-radius:14px 14px 4px 14px; background:#fbe6d4; border-color:#efc9a9; }
.cz-chat-user .cz-chat-speaker { color:#6e431f; }
.cz-chat-action { display:inline-flex; align-items:center; min-height:44px; margin-top:6px; color:#92390c; font-size:12px; font-weight:800; text-decoration:underline; text-underline-offset:3px; }
.cz-chat-quick { display:flex; flex-wrap:wrap; gap:6px; padding:0 16px 12px; flex-shrink:0; }
.cz-chat-quick button { border:1px solid #c9c6be; border-radius:20px; background:#fff; color:#374151; font-size:11px; font-weight:600; padding:10px 12px; min-height:40px; cursor:pointer; }
.cz-chat-form { display:flex; gap:8px; border-top:1px solid #e1ddd3; padding:12px 14px 6px; flex-shrink:0; }
.cz-chat-form input { width:100%; min-width:0; min-height:44px; border:1px solid #b6bec8; border-radius:11px; padding:10px 12px; font-size:16px; color:#192332; background:#fff; }
.cz-chat-form button { min-height:44px; border:0; border-radius:11px; padding:10px 16px; background:#ff8c38; color:#20150b; font-size:13px; font-weight:800; cursor:pointer; }
.cz-chat-note { font-size:9px; line-height:1.5; color:#5b6572; margin:4px 14px 12px; flex-shrink:0; }
.cz-chat-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.cz-chat :focus-visible { outline:3px solid #bc4b0e !important; outline-offset:3px; }
@media(hover:hover) { .cz-chat-launcher:hover .cz-chat-mascot { transform:translateY(-3px); } .cz-chat-quick button:hover { background:#fff0e2; border-color:#b95a24; } .cz-chat-form button:hover { background:#ffa45e; } }
@media(max-width:767px) { .cz-chat { right:14px; bottom:calc(90px + env(safe-area-inset-bottom)); } .cz-chat-mascot { width:56px; height:46px; } .cz-chat-invite { font-size:12px; padding:9px 13px; } .cz-chat-panel { bottom:66px; width:min(380px,calc(100vw - 28px)); height:min(540px,calc(100dvh - 190px - env(safe-area-inset-bottom))); } .cz-chat-quick button { min-height:44px; } }
@media(prefers-reduced-motion:reduce) { .cz-chat-mascot { transition:none; } .cz-chat-launcher:hover .cz-chat-mascot { transform:none; } }
.cz-chat-launcher-row{display:flex;align-items:center;gap:4px}
.cz-chat-hide{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border:0;border-radius:50%;background:#f8faf2;color:#475569;font-size:22px;line-height:1;cursor:pointer;box-shadow:0 2px 10px #0002}
.cz-chat-hide:hover{background:#ffead9;color:#192332}
@media(max-width:600px){.cz-chat-invite{display:none}}
.cz-chat-reopen{display:inline-flex;align-items:center;min-height:44px;margin:8px 0;color:inherit;font-size:13px;font-weight:650;text-decoration:underline;text-underline-offset:4px}
.cz-chat-reopen:focus-visible{outline:3px solid #ff8a32;outline-offset:3px}

/* Small visible close controls, with a full 44px tap area. */
.cz-chat :is(.cz-chat-close,.cz-chat-hide){position:relative;display:block;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;font-size:0;line-height:0;color:#475569}
.cz-chat .cz-chat-close{color:#e2e8f0}
.cz-chat :is(.cz-chat-close,.cz-chat-hide)::before{content:'';position:absolute;width:28px;height:28px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:50%;background:#f8faf2;box-shadow:0 1px 5px #0002;pointer-events:none}
.cz-chat .cz-chat-close::before{background:#ffffff0a;box-shadow:none;border:1px solid #ffffff26}
.cz-chat :is(.cz-chat-close,.cz-chat-hide)::after{content:'';position:absolute;width:12px;height:12px;left:50%;top:50%;transform:translate(-50%,-50%);background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 4 8 8M12 4l-8 8' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;pointer-events:none}
.cz-chat .cz-chat-hide:hover::before{background:#ffead9}
.cz-chat .cz-chat-close:hover::before{background:#ffffff14}

@media (max-width: 640px) {
  .cz-chat-panel:not([hidden]) {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    z-index: 10000;
  }
  .cz-chat-panel:not([hidden]) .cz-chat-log {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
  }
}

/* Mobile Home Hero Scroll Visibility:
   Smoothly hide floating assistant while the user is viewing the hero header on mobile home page,
   and smoothly animate in as they scroll past the hero header.
   NOTE: Animate .cz-chat-launcher-row (NOT .cz-chat) so that .cz-chat never establishes
   a containing block for fixed descendants (preserving full-screen mobile .cz-chat-panel). */
@media (max-width: 768px) {
  .cz-chat-launcher-row {
    transition: opacity 280ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
                visibility 280ms cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .cz-chat.cz-chat-hero-hidden:not(.cz-chat-open) .cz-chat-launcher-row {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(22px) scale(0.92) !important;
    visibility: hidden !important;
  }
  .cz-chat:not(.cz-chat-hero-hidden) .cz-chat-launcher-row {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    visibility: visible !important;
  }
  .cz-chat,
  .cz-chat.cz-chat-open {
    transform: none !important;
  }
}
