/* ══════════════════════════════════════════════
   NextGen AI Chat — Fortune 500 Premium UI v6
   ══════════════════════════════════════════════ */

#ngai-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Helvetica, sans-serif;
    pointer-events: none;
}
#ngai-widget > * { pointer-events: auto; }

/* ── Launcher ── */
#ngai-launcher {
    width: 62px; height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00b5bd, #0076bd) !important;
    border: none; cursor: pointer;
    box-shadow:
        0 4px 6px rgba(0,0,0,0.12),
        0 10px 28px rgba(0,181,189,0.48);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
                box-shadow 0.3s ease;
    position: relative;
}
#ngai-launcher:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 8px rgba(0,0,0,0.14), 0 14px 34px rgba(0,181,189,0.58);
}
#ngai-launcher:active { transform: scale(0.95); }
#ngai-launcher .icon-message,
#ngai-launcher .icon-close {
    width: 30px; height: 30px;
    position: absolute;
    transition: opacity 0.22s ease, transform 0.22s ease;
}
#ngai-launcher .icon-message { opacity: 1; transform: scale(1) rotate(0deg); }
#ngai-launcher .icon-close   { opacity: 0; transform: scale(0.5) rotate(-45deg); }
#ngai-launcher.open .icon-message { opacity: 0; transform: scale(0.5) rotate(45deg); }
#ngai-launcher.open .icon-close   { opacity: 1; transform: scale(1) rotate(0deg); }

/* ── Unread badge on launcher ── */
#ngai-launcher::after {
    content: '';
    position: absolute; top: 2px; right: 2px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #ff4757;
    border: 2.5px solid #fff;
    display: none;
}

/* ── Chat window ── */
#ngai-window {
    position: absolute;
    bottom: 80px; right: 0;
    width: 400px; height: 620px;
    background: #fff;
    border-radius: 22px;
    box-shadow:
        0 2px 6px rgba(0,0,0,0.06),
        0 10px 30px rgba(0,0,0,0.14),
        0 30px 70px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px) scale(0.95);
    pointer-events: none;
    transition:
        opacity 0.26s ease,
        transform 0.34s cubic-bezier(0.34,1.56,0.64,1);
}
#ngai-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ════════════════════════════════════════
   HEADER — Deep ocean teal (not black)
   Readable + on-brand + premium
   ════════════════════════════════════════ */
.ngai-header,
.ngai-chat-header {
    background: linear-gradient(145deg, #0c3547 0%, #0a5568 55%, #007a8a 100%);
    color: white;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
/* Subtle light stripe for depth */
.ngai-header::before,
.ngai-chat-header::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 60%);
    pointer-events: none;
}

.ngai-header { padding: 22px 20px 20px; display: flex; align-items: center; gap: 14px; }
.ngai-chat-header { padding: 13px 16px; display: flex; align-items: center; gap: 12px; }

.ngai-agent-photo {
    width: 60px; height: 60px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.35);
    box-shadow: 0 0 0 3px rgba(0,181,189,0.3), 0 3px 10px rgba(0,0,0,0.25);
}
.ngai-agent-photo img { width: 100%; height: 100%; object-fit: cover; }
.ngai-agent-photo-small {
    width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 0 0 2px rgba(0,181,189,0.25);
}
.ngai-agent-photo-small img { width: 100%; height: 100%; object-fit: cover; }

.ngai-header-info { flex: 1; min-width: 0; }
.ngai-header-info h3 {
    margin: 0 0 3px;
    font-size: 16px; font-weight: 700;
    letter-spacing: -0.2px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.ngai-chat-header strong {
    display: block;
    font-size: 14px; font-weight: 700;
    color: #fff;
    letter-spacing: -0.1px;
}
.ngai-status {
    margin: 0;
    font-size: 12px; color: #5eeea0;
    display: flex; align-items: center; gap: 5px;
}
.ngai-status-small {
    font-size: 11px; color: #5eeea0;
    display: flex; align-items: center; gap: 4px;
    margin-top: 1px;
}
.status-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #5eeea0;
    box-shadow: 0 0 0 2px rgba(94,238,160,0.25);
    animation: pulse 2.4s infinite;
    flex-shrink: 0;
}
@keyframes pulse {
    0%,100% { box-shadow: 0 0 0 2px rgba(94,238,160,0.25); }
    50%      { box-shadow: 0 0 0 5px rgba(94,238,160,0); }
}

/* ── Rate button in chat header — matches X button height ── */
.ngai-rate-btn {
    background: rgba(255,255,255,0.12) !important;
    border: 1px solid rgba(255,255,255,0.18) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 0 10px !important;
    height: 34px !important;
    border-radius: 17px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    transition: background 0.2s !important;
    letter-spacing: 0.2px !important;
}
.ngai-rate-btn:hover { background: rgba(255,255,255,0.26) !important; }

#ngai-close {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: white; cursor: pointer;
    padding: 0; margin: 0;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    flex-shrink: 0;
}
#ngai-close:hover { background: rgba(255,255,255,0.22); }
#ngai-close svg { width: 20px; height: 20px; }

/* ── Welcome screen ── */
#ngai-welcome { display: flex; flex-direction: column; flex: 1; overflow: hidden; }

.ngai-welcome-content {
    padding: 26px 22px 20px;
    flex: 1;
    display: flex; flex-direction: column; justify-content: center;
    background: #fff;
}

/* Trust tagline */
.ngai-welcome-content > p {
    text-align: center;
    font-size: 20px; font-weight: 700;
    color: #0c2d3d;
    margin: 0 0 6px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}
.ngai-welcome-tagline {
    text-align: center;
    font-size: 13px; color: #6b7a8d;
    margin: 0 0 24px;
    line-height: 1.5;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ngai-trust-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: #edfbf4; color: #0a8a4e;
    padding: 3px 9px; border-radius: 20px;
    font-size: 11.5px; font-weight: 600;
}

/* Form label + inputs */
.ngai-field { margin-bottom: 10px; }
.ngai-field label {
    display: block;
    font-size: 11.5px; font-weight: 700;
    color: #5a6475;
    text-transform: uppercase; letter-spacing: 0.6px;
    margin-bottom: 5px;
}
#ngai-welcome input {
    width: 100%;
    padding: 13px 15px;
    border: 1.5px solid #c8d1da;
    border-radius: 10px;
    font-size: 15px;
    box-sizing: border-box;
    background: #f9fbfc;
    color: #0c2d3d;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
#ngai-welcome input::placeholder { color: #a0aab5; }
#ngai-welcome input:focus {
    outline: none;
    border-color: #00b5bd;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,181,189,0.13);
}

#ngai-start {
    width: 100%; margin-top: 6px;
    padding: 15px;
    background: linear-gradient(135deg, #00b5bd, #0076bd);
    color: white; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 700;
    letter-spacing: 0.1px; cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,181,189,0.45);
    transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.22s;
}
#ngai-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0,181,189,0.52);
}
#ngai-start:active { transform: translateY(0); }
#ngai-start:disabled { background: #c0ccd5; box-shadow: none; cursor: not-allowed; transform: none; }

/* Privacy note */
.ngai-privacy {
    text-align: center;
    font-size: 11px; color: #a0aab5;
    margin-top: 12px;
    line-height: 1.5;
}

/* ── Chat view ── */
#ngai-chat { display: none; flex-direction: column; height: 100%; }

/* ── Messages area ── */
#ngai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 16px 12px;
    background: #f5f8fb;
    scroll-behavior: smooth;
}
#ngai-messages::-webkit-scrollbar { width: 4px; }
#ngai-messages::-webkit-scrollbar-thumb { background: #c8d4df; border-radius: 4px; }

/* Message animation */
.ngai-message {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    animation: msgIn 0.32s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ngai-message.customer { align-items: flex-end; }
.ngai-message.ai       { align-items: flex-start; }
.ngai-message.agent    { align-items: flex-start; }
/* Message meta row: sender name + timestamp */
.msg-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    padding: 0 2px;
}
.ngai-message.customer .msg-meta { justify-content: flex-end; }
.ngai-message.ai .msg-meta,
.ngai-message.agent .msg-meta { justify-content: flex-start; }

.msg-sender-name {
    font-size: 10px;
    font-weight: 700;
    color: #7a8fa0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.ngai-message.customer .msg-sender-name { color: #5a9dbd; }
.ngai-message.agent .msg-sender-name    { color: #7a8fa0; }

.msg-timestamp {
    font-size: 9.5px;
    color: #b0bec8;
    font-weight: 400;
}

/* Bubbles */
.bubble {
    padding: 11px 15px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.55;
    font-size: 14.5px;
}
.ngai-message.customer .bubble {
    background: linear-gradient(135deg, #00b5bd, #0076bd);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,181,189,0.32);
}
.ngai-message.ai .bubble {
    background: white;
    color: #1a2632;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(0,0,0,0.07);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.ngai-message.agent .bubble {
    background: linear-gradient(145deg, #0c3547, #0a4f62);
    color: #fff;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.22);
}
.bubble a { color: inherit; text-decoration: underline; opacity: 0.9; }
.bubble .chat-img {
    max-width: 100%; border-radius: 10px; margin-top: 6px;
    cursor: pointer; display: block;
    transition: opacity 0.2s;
}
.bubble .chat-img:hover { opacity: 0.88; }

/* Typing indicator */
.bubble.typing {
    display: inline-flex; gap: 6px; padding: 14px 18px;
    background: white; align-items: center;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.bubble.typing span {
    width: 8px; height: 8px; border-radius: 50%; background: #c0ccd5;
    animation: typingBounce 1.4s ease-in-out infinite;
    display: inline-block;
}
.bubble.typing span:nth-child(2) { animation-delay: 0.18s; }
.bubble.typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typingBounce {
    0%,60%,100% { transform: translateY(0); background: #c0ccd5; }
    30%          { transform: translateY(-7px); background: #00b5bd; }
}

/* ── Rating ── */
#ngai-rating {
    padding: 14px 16px;
    background: white;
    border-top: 1px solid #eef1f5;
    text-align: center;
    animation: msgIn 0.3s ease both;
}
.rating-prompt { font-size: 13px; color: #5a6475; margin-bottom: 10px; font-weight: 600; }
.rating-buttons { display: flex; justify-content: center; gap: 14px; }
.rating-btn {
    background: #f5f8fb; border: 1.5px solid #dde4ec;
    border-radius: 50%; width: 52px; height: 52px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
    color: #b0bec5;
}
.rating-btn svg { width: 26px; height: 26px; }
.rating-btn:hover { border-color: #00b5bd; transform: scale(1.15); background: #eaf9f9; color: #00b5bd; }
.rating-btn:hover svg { color: #00b5bd; }
.rating-btn.selected { border-color: #00b5bd; background: #eaf9f9; transform: scale(1.1); color: #00b5bd; }
.rating-later-btn {
    display: block; margin: 8px auto 0;
    background: none; border: none; color: #b0bec5;
    font-size: 12px; cursor: pointer; text-decoration: underline;
}
.rating-later-btn:hover { color: #778899; }

/* ── Call icon button in toolbar ── */
#ngai-widget .ngai-call-icon-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
    max-width: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    color: #5a7080 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease !important;
    outline: none !important;
}
#ngai-widget .ngai-call-icon-btn:hover {
    background: #e8f7f8 !important;
    color: #007a87 !important;
    transform: scale(1.1) !important;
}
#ngai-widget .ngai-call-icon-btn:active { transform: scale(0.95) !important; }
#ngai-widget .ngai-call-icon-btn svg {
    width: 20px !important; height: 20px !important;
    display: block !important; flex-shrink: 0 !important;
}

/* ── After-hours form ── */
#ngai-after-hours { animation: msgIn 0.3s ease both; }
.after-hours-wrap {
    padding: 16px 18px;
    background: #fffbf0;
    border-top: 2px solid #f5c842;
}
.after-hours-title { font-weight: 700; font-size: 14.5px; margin-bottom: 5px; color: #2d2d2d; }
.after-hours-sub { font-size: 12.5px; color: #6b7a8d; margin-bottom: 12px; line-height: 1.55; }
.after-hours-wrap input,
.after-hours-wrap textarea {
    width: 100%; padding: 10px 13px;
    border: 1.5px solid #c8d1da;
    border-radius: 9px; font-size: 13.5px; font-family: inherit;
    box-sizing: border-box; margin-bottom: 7px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.after-hours-wrap input:focus,
.after-hours-wrap textarea:focus {
    outline: none; border-color: #f5c842;
    box-shadow: 0 0 0 3px rgba(245,200,66,0.15);
}
.after-hours-wrap textarea { resize: none; }
#ngai-ah-submit {
    width: 100%; padding: 12px;
    background: linear-gradient(135deg, #00b5bd, #0076bd);
    color: #fff; border: none; border-radius: 9px;
    font-size: 13.5px; font-weight: 700; cursor: pointer;
    box-shadow: 0 3px 12px rgba(0,181,189,0.38);
    transition: transform 0.2s, box-shadow 0.2s;
}
#ngai-ah-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,181,189,0.48);
}

/* ── Emoji panel ── */
.emoji-panel {
    padding: 10px 12px 8px;
    background: white;
    border-top: 1px solid #eef1f5;
    display: flex; flex-wrap: wrap; gap: 2px;
    max-height: 152px; overflow-y: auto;
    animation: slideUp 0.18s ease both;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.emoji-panel button {
    width: 36px; height: 36px;
    font-size: 22px;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    background: none; border: none;
    cursor: pointer; border-radius: 8px;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.12s, transform 0.12s;
    /* Force emoji rendering */
    font-style: normal; font-variant: normal; font-weight: normal;
}
.emoji-panel button:hover { background: #eaf9f9; transform: scale(1.25); }

/* ══════════════════════════════════════════════
   TOOL ROW — SVG icons, fully scoped, no font
   conflicts possible. New IDs, new class names.
   ══════════════════════════════════════════════ */
#ngai-widget #ngai-toolrow {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 6px 14px 4px !important;
    background: #ffffff !important;
    border-top: 1px solid #eef1f5 !important;
    box-sizing: border-box !important;
}

/* Both tool buttons share this base */
#ngai-widget #ngai-emoji-trigger,
#ngai-widget #ngai-photo-trigger {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
    max-width: 25px !important;
    min-height: 25px !important;
    max-height: 25px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    color: #5a7080 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease !important;
    outline: none !important;
}
#ngai-widget #ngai-emoji-trigger:hover,
#ngai-widget #ngai-photo-trigger:hover {
    background: #e8f7f8 !important;
    color: #007a87 !important;
    transform: scale(1.1) !important;
}
#ngai-widget #ngai-emoji-trigger:active,
#ngai-widget #ngai-photo-trigger:active {
    transform: scale(0.95) !important;
}

/* SVGs inside the buttons */
#ngai-widget #ngai-emoji-trigger svg,
#ngai-widget #ngai-photo-trigger svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    flex-shrink: 0 !important;
    stroke: currentColor !important;
    fill: none !important;
}

/* Hint text */
#ngai-widget #ngai-toolrow-hint {
    flex: 1 !important;
    text-align: right !important;
    font-size: 10.5px !important;
    color: #a8b5be !important;
    padding-right: 2px !important;
    white-space: nowrap !important;
    /* Override any theme font styles */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

/* ── Input row ── */
.ngai-input {
    padding: 4px 14px 14px;
    background: white;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}
#ngai-text {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid #c0ccd8;
    border-radius: 22px;
    resize: none;
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.45;
    max-height: 100px;
    background: #f8fafb;
    color: #1a2632;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
#ngai-text::placeholder { color: #9daab5; }
#ngai-text:focus {
    outline: none;
    border-color: #00b5bd;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,181,189,0.12);
}

#ngai-send {
    width: 50px; height: 50px; min-width: 50px;
    background: linear-gradient(135deg, #00b5bd, #0076bd);
    border: none; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0,181,189,0.45);
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
}
#ngai-send:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,181,189,0.55);
}
#ngai-send:active { transform: scale(0.94); }
#ngai-send:disabled { background: #c8d4df; box-shadow: none; cursor: not-allowed; transform: scale(1); }
#ngai-send svg { width: 26px; height: 26px; margin-left: 2px; }

/* ── Call modal ── */
#ngai-call-modal {
    position: fixed; inset: 0; z-index: 1000000;
    display: flex; align-items: center; justify-content: center;
    animation: fadeInModal 0.2s ease;
}
@keyframes fadeInModal { from { opacity: 0; } to { opacity: 1; } }
.modal-overlay {
    position: absolute; inset: 0;
    background: rgba(10,30,50,0.55);
    backdrop-filter: blur(5px);
}
.modal-content {
    position: relative; background: white;
    padding: 32px 28px; border-radius: 22px;
    width: 90%; max-width: 380px; text-align: center;
    box-shadow: 0 24px 70px rgba(0,0,0,0.35);
    animation: modalSlideIn 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes modalSlideIn {
    from { transform: translateY(28px) scale(0.94); opacity: 0; }
    to   { transform: none; opacity: 1; }
}
.modal-content h3 { margin: 0 0 8px; font-size: 20px; font-weight: 800; color: #0c2d3d; letter-spacing: -0.3px; }
.modal-content p { margin: 0 0 22px; color: #6b7a8d; font-size: 14px; line-height: 1.5; }
.modal-content input {
    width: 100%; padding: 14px 16px;
    border: 1.5px solid #c0ccd8;
    border-radius: 11px; font-size: 16px;
    box-sizing: border-box; margin-bottom: 18px;
    background: #f8fafb; color: #1a2632;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.modal-content input::placeholder { color: #9daab5; }
.modal-content input:focus {
    outline: none; border-color: #00b5bd; background: #fff;
    box-shadow: 0 0 0 3px rgba(0,181,189,0.13);
}
.modal-buttons { display: flex; gap: 10px; }
.button-primary {
    flex: 1; padding: 14px;
    background: linear-gradient(135deg, #00b5bd, #0076bd);
    color: white; border: none; border-radius: 12px;
    font-weight: 800; font-size: 14.5px; cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,181,189,0.42);
    transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.22s;
}
.button-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,181,189,0.52); }
.button-secondary {
    flex: 1; padding: 14px;
    background: #f2f5f8;
    border: 1.5px solid #d8e0e8;
    border-radius: 12px; font-weight: 600; font-size: 14.5px;
    cursor: pointer; color: #5a6475;
    transition: background 0.2s;
}
.button-secondary:hover { background: #e8eef4; }


/* ── Hello pill ── */
.ngai-hello-pill {
    position: absolute;
    bottom: 74px;
    right: 0;
    background: #111;
    color: #fff;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.45;
    padding: 9px 15px;
    border-radius: 22px;
    width: 220px;
    text-align: center;
    box-shadow: 0 4px 18px rgba(0,0,0,0.28);
    cursor: pointer;
    pointer-events: auto;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
    animation: pillSlideIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
.ngai-hello-pill::after {
    content: '';
    position: absolute;
    bottom: -7px;
    right: 22px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid #111;
}
.ngai-pill-hide {
    opacity: 0 !important;
    transform: translateY(8px) !important;
}
@keyframes pillSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px) {
    .ngai-hello-pill { bottom: 80px; right: 0; }
}

/* ── Launcher bounce (2s on every page load) ── */
@keyframes launcherBounceAnim {
    0%   { transform: translateY(0) scale(1); }
    20%  { transform: translateY(-12px) scale(1.06); }
    40%  { transform: translateY(0) scale(1); }
    60%  { transform: translateY(-7px) scale(1.03); }
    80%  { transform: translateY(0) scale(1); }
    100% { transform: translateY(0) scale(1); }
}
#ngai-launcher.launcher-bounce {
    animation: launcherBounceAnim 1s ease-in-out 2;
}

/* ── New message notification ── */
@keyframes launcherPulse {
    0%   { transform: scale(1); box-shadow: 0 4px 6px rgba(0,0,0,0.12), 0 10px 28px rgba(0,181,189,0.48); }
    40%  { transform: scale(1.18); box-shadow: 0 6px 8px rgba(0,0,0,0.14), 0 14px 34px rgba(0,118,189,0.65); }
    100% { transform: scale(1); box-shadow: 0 4px 6px rgba(0,0,0,0.12), 0 10px 28px rgba(0,181,189,0.48); }
}
#ngai-launcher.pulse-notify {
    animation: launcherPulse 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
#ngai-launcher.has-unread::after { display: block; }

/* ── Mobile full-screen ── */
@media (max-width: 768px) {
    #ngai-widget { width: 0; height: 0; overflow: visible; bottom: 0; right: 0; }
    #ngai-launcher { position: fixed; bottom: 22px; right: 22px; }
    #ngai-window {
        position: fixed; inset: 0;
        width: 100%; height: 100%; height: 100dvh;
        border-radius: 0;
        transform: translateY(100%);
        opacity: 1;
    }
    #ngai-window.open {
        transform: translateY(0);
        transition: transform 0.34s cubic-bezier(0.34,1.56,0.64,1);
    }
    .ngai-header { padding-top: max(22px, env(safe-area-inset-top)); }
    .ngai-input { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}
