.zeni-system-chat {
    --zc-lilac: var(--brand-lilac, #7654a8);
    --zc-green: var(--brand-green, #4f8b69);
    --zc-dark: var(--brand-dark, #111827);
    --zc-surface: var(--brand-surface, #fff);
    --zc-muted: var(--brand-muted, #64748b);
    position: relative;
    z-index: 2147480000;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.zeni-chat-launcher {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 2147480000;
    display: inline-flex;
    min-height: 4rem;
    max-width: min(19rem, calc(100vw - 2rem));
    align-items: center;
    gap: .75rem;
    border: 0;
    border-radius: 999px;
    padding: .6rem 1rem .6rem .62rem;
    color: #fff;
    background: linear-gradient(135deg, var(--zc-lilac), var(--zc-green));
    box-shadow: 0 1.1rem 2.8rem rgba(40, 31, 67, .34), inset 0 1px 0 rgba(255, 255, 255, .2);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.zeni-chat-launcher:hover,
.zeni-chat-launcher:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 1.35rem 3.2rem rgba(40, 31, 67, .4), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.zeni-chat-launcher:focus-visible { outline: 3px solid rgba(118, 84, 168, .25); outline-offset: 4px; }
.zeni-system-chat.is-open .zeni-chat-launcher { opacity: 0; pointer-events: none; transform: translateY(10px) scale(.92); }

.zeni-chat-launcher__icon {
    display: grid;
    width: 2.8rem;
    height: 2.8rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    font-size: 1.2rem;
}

.zeni-chat-launcher__copy { display: grid; min-width: 0; text-align: left; line-height: 1.15; }
.zeni-chat-launcher__copy strong { font-size: .98rem; white-space: nowrap; }
.zeni-chat-launcher__copy small { margin-top: .28rem; color: rgba(255, 255, 255, .8); font-size: .72rem; white-space: nowrap; }
.zeni-chat-launcher__pulse { position: absolute; right: .65rem; top: .3rem; width: .65rem; height: .65rem; border-radius: 50%; background: #cbd5e1; border: 2px solid #fff; }
.zeni-system-chat.is-team-online .zeni-chat-launcher__pulse { background: #38e37e; box-shadow: 0 0 0 .3rem rgba(56, 227, 126, .18); }
.zeni-chat-unread { position: absolute; top: -.35rem; right: -.25rem; display: grid; min-width: 1.55rem; height: 1.55rem; padding: 0 .35rem; place-items: center; border-radius: 999px; background: #ef4444; color: #fff; border: 2px solid #fff; font-size: .72rem; font-weight: 900; }

.zeni-chat-panel {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 2147480001;
    display: flex;
    width: min(25rem, calc(100vw - 2rem));
    height: min(43rem, calc(100dvh - 2rem));
    max-height: 760px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(118, 84, 168, .14);
    border-radius: 1.5rem;
    background: #fff;
    box-shadow: 0 1.8rem 5rem rgba(22, 18, 35, .35);
    transform-origin: bottom right;
    animation: zeniChatOpen .22s ease both;
}

@keyframes zeniChatOpen { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }

.zeni-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.05rem;
    color: #fff;
    background: linear-gradient(135deg, var(--zc-lilac), #675198 48%, var(--zc-green));
}

.zeni-chat-brand { display: flex; min-width: 0; align-items: center; gap: .75rem; }
.zeni-chat-brand__mark { display: grid; width: 2.55rem; height: 2.55rem; flex: 0 0 auto; place-items: center; border-radius: .9rem; background: rgba(255, 255, 255, .18); font-size: 1.15rem; }
.zeni-chat-brand > span:last-child { display: grid; min-width: 0; }
.zeni-chat-brand strong { overflow: hidden; font-size: .98rem; text-overflow: ellipsis; white-space: nowrap; }
.zeni-chat-brand small { margin-top: .2rem; color: rgba(255, 255, 255, .78); font-size: .72rem; white-space: nowrap; }
.zeni-chat-header__actions { display: flex; gap: .25rem; }
.zeni-chat-icon-btn { display: grid; width: 2.1rem; height: 2.1rem; place-items: center; border: 0; border-radius: 50%; color: #fff; background: transparent; cursor: pointer; }
.zeni-chat-icon-btn:hover, .zeni-chat-icon-btn:focus-visible { background: rgba(255, 255, 255, .16); outline: 0; }

.zeni-chat-connection { padding: .6rem .9rem; color: #5f3c00; background: #fff4d6; border-bottom: 1px solid #f4d68d; font-size: .78rem; font-weight: 700; text-align: center; }
.zeni-chat-connection.is-error { color: #991b1b; background: #fef2f2; border-color: #fecaca; }

.zeni-chat-welcome { flex: 1 1 auto; overflow: auto; padding: 1.25rem; background: radial-gradient(circle at top right, rgba(118, 84, 168, .12), transparent 35%), linear-gradient(180deg, #fbfaff, #fff); }
.zeni-chat-welcome__art { display: grid; width: 3.8rem; height: 3.8rem; place-items: center; margin-bottom: 1rem; border-radius: 1.15rem; color: #fff; background: linear-gradient(145deg, var(--zc-lilac), var(--zc-green)); font-size: 1.45rem; box-shadow: 0 .8rem 2rem rgba(118, 84, 168, .22); }
.zeni-chat-welcome h2 { margin: 0 0 .45rem; color: var(--zc-dark); font-size: 1.35rem; font-weight: 850; letter-spacing: -.025em; }
.zeni-chat-welcome > p { margin: 0 0 1rem; color: var(--zc-muted); line-height: 1.6; font-size: .9rem; }
.zeni-chat-offline-copy { padding: .75rem; border-radius: .85rem; color: #664d03 !important; background: #fff8df; border: 1px solid #f4df9c; }

.zeni-chat-prechat { display: grid; gap: .82rem; }
.zeni-chat-field { display: grid; gap: .35rem; }
.zeni-chat-field label { color: #334155; font-size: .78rem; font-weight: 800; }
.zeni-chat-field label span { color: #94a3b8; font-weight: 500; }
.zeni-chat-field input, .zeni-chat-field textarea, .zeni-chat-rating textarea { width: 100%; border: 1px solid #dbe1e8; border-radius: .85rem; padding: .75rem .85rem; color: #111827; background: #fff; font: inherit; font-size: .9rem; outline: 0; transition: border-color .18s ease, box-shadow .18s ease; resize: none; }
.zeni-chat-field input:focus, .zeni-chat-field textarea:focus, .zeni-chat-rating textarea:focus { border-color: var(--zc-lilac); box-shadow: 0 0 0 .22rem rgba(118, 84, 168, .12); }
.zeni-chat-consent { display: flex; align-items: flex-start; gap: .55rem; color: #64748b; font-size: .72rem; line-height: 1.45; }
.zeni-chat-consent input { margin-top: .18rem; accent-color: var(--zc-lilac); }
.zeni-chat-consent a { color: var(--zc-lilac); font-weight: 700; }
.zeni-chat-consent.has-error { padding: .55rem .65rem; border: 1px solid #fca5a5; border-radius: .75rem; color: #991b1b; background: #fff7f7; }
.zeni-chat-consent.has-error input { outline: .18rem solid rgba(220, 38, 38, .16); outline-offset: .12rem; }
.zeni-chat-primary { position: relative; display: inline-flex; min-height: 2.9rem; align-items: center; justify-content: center; gap: .6rem; border: 0; border-radius: .9rem; padding: .7rem 1rem; color: #fff; background: linear-gradient(135deg, var(--zc-lilac), var(--zc-green)); font-weight: 850; cursor: pointer; box-shadow: 0 .7rem 1.5rem rgba(89, 67, 132, .2); }
.zeni-chat-primary:disabled, .zeni-chat-prechat.is-busy .zeni-chat-primary { opacity: .72; cursor: wait; }
.zeni-chat-form-error { margin: 0; scroll-margin: .75rem; padding: .65rem .75rem; border: 1px solid #fecaca; border-radius: .75rem; color: #991b1b; background: #fef2f2; font-size: .78rem; font-weight: 700; line-height: 1.45; }
.zeni-chat-form-error:not([hidden]) { animation: zeniChatErrorIn .18s ease both; }
@keyframes zeniChatErrorIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.zeni-chat-conversation { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; background: #f8fafc; }
.zeni-chat-context { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .8rem; color: #64748b; background: #fff; border-bottom: 1px solid #edf0f4; font-size: .68rem; font-weight: 700; }
.zeni-chat-context button { border: 0; padding: .25rem .45rem; color: var(--zc-lilac); background: transparent; font: inherit; cursor: pointer; }
.zeni-chat-messages { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 1rem .85rem .5rem; scroll-behavior: smooth; }
.zeni-chat-message { display: grid; justify-items: start; margin-bottom: .9rem; }
.zeni-chat-message.is-outgoing { justify-items: end; }
.zeni-chat-message.is-system { justify-items: center; }
.zeni-chat-message__meta { display: flex; align-items: center; gap: .45rem; margin: 0 .35rem .25rem; color: #7c8798; font-size: .66rem; }
.zeni-chat-message__meta strong { color: #475569; font-weight: 800; }
.zeni-chat-message.is-outgoing .zeni-chat-message__meta { flex-direction: row-reverse; }
.zeni-chat-bubble { max-width: 86%; overflow: hidden; border-radius: .35rem 1rem 1rem 1rem; padding: .7rem .8rem; color: #263044; background: #fff; border: 1px solid #e7ebf0; box-shadow: 0 .25rem .7rem rgba(15, 23, 42, .05); font-size: .86rem; line-height: 1.55; word-break: break-word; }
.zeni-chat-message.is-outgoing .zeni-chat-bubble { border: 0; border-radius: 1rem .35rem 1rem 1rem; color: #fff; background: linear-gradient(135deg, var(--zc-lilac), #66508f); }
.zeni-chat-message.is-system .zeni-chat-bubble { max-width: 92%; border: 0; border-radius: .8rem; color: #5b4b7a; background: #f0ebf8; text-align: center; font-size: .78rem; box-shadow: none; }
.zeni-chat-message__text + .zeni-chat-file-attachment, .zeni-chat-message__text + .zeni-chat-image-attachment { margin-top: .55rem; }
.zeni-chat-message__actions { display: flex; align-items: center; gap: .4rem; min-height: 1.25rem; padding: .2rem .25rem 0; }
.zeni-chat-message__actions button { border: 0; padding: .1rem .2rem; color: #94a3b8; background: transparent; font-size: .64rem; cursor: pointer; opacity: 0; transition: opacity .15s ease; }
.zeni-chat-message:hover .zeni-chat-message__actions button, .zeni-chat-message__actions button:focus-visible { opacity: 1; }
.zeni-chat-receipt { color: #7c6fa0; font-size: .76rem; }
.zeni-chat-message.is-outgoing .zeni-chat-message__actions { justify-content: flex-end; }
.zeni-chat-quoted { margin-bottom: .5rem; padding: .45rem .55rem; border-left: 3px solid currentColor; border-radius: .45rem; background: rgba(15, 23, 42, .07); opacity: .8; font-size: .72rem; }
.zeni-chat-quoted small { display: block; margin-bottom: .12rem; font-weight: 850; }
.zeni-chat-image-attachment { display: block; overflow: hidden; border-radius: .7rem; }
.zeni-chat-image-attachment img { display: block; width: 100%; max-height: 13rem; object-fit: cover; }
.zeni-chat-file-attachment { display: flex; align-items: center; gap: .55rem; min-width: 12rem; padding: .55rem; border-radius: .65rem; color: inherit; background: rgba(15, 23, 42, .06); text-decoration: none; }
.zeni-chat-file-attachment > i { font-size: 1.25rem; }
.zeni-chat-file-attachment span { display: grid; min-width: 0; }
.zeni-chat-file-attachment strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
.zeni-chat-file-attachment small { opacity: .7; font-size: .65rem; }

.zeni-chat-typing { display: flex; align-items: center; gap: .25rem; padding: 0 .95rem .45rem; color: #64748b; font-size: .68rem; }
.zeni-chat-typing > span { width: .36rem; height: .36rem; border-radius: 50%; background: #8b7cac; animation: zeniTyping 1s infinite ease-in-out; }
.zeni-chat-typing > span:nth-child(2) { animation-delay: .15s; }
.zeni-chat-typing > span:nth-child(3) { animation-delay: .3s; }
.zeni-chat-typing small { margin-left: .25rem; }
@keyframes zeniTyping { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

.zeni-chat-reply-preview, .zeni-chat-upload-preview { padding: .5rem .75rem; border-top: 1px solid #edf0f4; background: #fff; }
.zeni-chat-reply-preview { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.zeni-chat-reply-preview > div { display: grid; min-width: 0; border-left: 3px solid var(--zc-lilac); padding-left: .55rem; }
.zeni-chat-reply-preview small { color: #7c6fa0; font-size: .62rem; font-weight: 850; }
.zeni-chat-reply-preview strong { overflow: hidden; color: #475569; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.zeni-chat-reply-preview button, .zeni-chat-upload-preview button { border: 0; color: #64748b; background: transparent; cursor: pointer; }
.zeni-chat-upload-preview > div { display: flex; align-items: center; gap: .55rem; padding: .45rem .55rem; border-radius: .7rem; background: #f4f1f9; }
.zeni-chat-upload-preview span { display: grid; min-width: 0; flex: 1; }
.zeni-chat-upload-preview strong { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.zeni-chat-upload-preview small { color: #64748b; font-size: .63rem; }

.zeni-chat-composer { position: relative; flex: 0 0 auto; border-top: 1px solid #e7ebf0; padding: .55rem .65rem .5rem; background: #fff; }
.zeni-chat-composer__tools { display: flex; gap: .15rem; margin-bottom: .35rem; }
.zeni-chat-tool { display: grid; width: 2rem; height: 2rem; place-items: center; border: 0; border-radius: .55rem; color: #64748b; background: transparent; cursor: pointer; }
.zeni-chat-tool:hover, .zeni-chat-tool:focus-visible { color: var(--zc-lilac); background: #f1edf7; outline: 0; }
.zeni-chat-composer__row { display: flex; align-items: flex-end; gap: .45rem; padding: .38rem .38rem .38rem .72rem; border: 1px solid #dfe4ea; border-radius: 1rem; background: #f9fafb; }
.zeni-chat-composer textarea { min-height: 2.15rem; max-height: 7.5rem; flex: 1; border: 0; padding: .45rem 0; color: #1f2937; background: transparent; font: inherit; font-size: .86rem; line-height: 1.45; outline: 0; resize: none; }
.zeni-chat-send { position: relative; display: grid; width: 2.3rem; height: 2.3rem; flex: 0 0 auto; place-items: center; overflow: hidden; border: 0; border-radius: .8rem; color: #fff; background: linear-gradient(135deg, var(--zc-lilac), var(--zc-green)); cursor: pointer; font-size: 0; white-space: nowrap; }
.zeni-chat-send > i { font-size: 1rem; line-height: 1; }
.zeni-chat-send:disabled { opacity: .72; cursor: wait; }
.zeni-chat-primary.is-loading > *, .zeni-chat-send.is-loading > * { visibility: hidden; }
.zeni-chat-primary.is-loading::after, .zeni-chat-send.is-loading::after { position: absolute; width: 1rem; height: 1rem; border: .14rem solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; content: ''; animation: zeni-chat-spin .7s linear infinite; }
@keyframes zeni-chat-spin { to { transform: rotate(360deg); } }
.zeni-chat-composer__hint { display: block; margin-top: .35rem; color: #a0a9b6; font-size: .58rem; text-align: center; }
.zeni-chat-emoji-picker { position: absolute; left: .65rem; bottom: 6.3rem; display: grid; width: 15rem; grid-template-columns: repeat(5, 1fr); gap: .2rem; padding: .55rem; border: 1px solid #e3e7ed; border-radius: .9rem; background: #fff; box-shadow: 0 1rem 2rem rgba(15, 23, 42, .18); }
.zeni-chat-emoji-picker button { border: 0; border-radius: .45rem; padding: .35rem; background: transparent; font-size: 1.05rem; cursor: pointer; }
.zeni-chat-emoji-picker button:hover { background: #f1edf7; }

.zeni-chat-rating { display: grid; gap: .65rem; padding: 1rem; border-top: 1px solid #e7ebf0; background: #fff; }
.zeni-chat-rating > strong { color: #334155; font-size: .82rem; text-align: center; }
.zeni-chat-stars { display: flex; justify-content: center; gap: .35rem; }
.zeni-chat-stars button { border: 0; padding: .2rem; color: #d4d9e0; background: transparent; font-size: 1.35rem; cursor: pointer; }
.zeni-chat-stars button.is-active { color: #f5b301; }
.zeni-chat-rating textarea { font-size: .78rem; }
.zeni-chat-thanks { display: grid; justify-items: center; gap: .45rem; color: #4f8b69; text-align: center; }
.zeni-chat-thanks i { font-size: 1.5rem; }

.zeni-chat-footer { flex: 0 0 auto; padding: .38rem .75rem; color: #9aa3af; background: #fff; border-top: 1px solid #f0f2f5; font-size: .58rem; text-align: center; }
.zeni-chat-footer i { margin-right: .2rem; }

[hidden] { display: none !important; }

@media (max-width: 575.98px) {
    .zeni-chat-launcher { right: max(.75rem, env(safe-area-inset-right)); bottom: max(.75rem, env(safe-area-inset-bottom)); min-width: 3.7rem; width: 3.7rem; padding: .45rem; justify-content: center; }
    .zeni-chat-launcher__copy { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .zeni-chat-launcher__pulse { right: .1rem; top: .1rem; }
    .zeni-chat-panel { inset: 0; width: 100%; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
    .zeni-chat-header { padding-top: max(1rem, env(safe-area-inset-top)); }
    .zeni-chat-footer { padding-bottom: max(.38rem, env(safe-area-inset-bottom)); }
    .zeni-chat-message__actions button { opacity: .85; }
}

@media (prefers-reduced-motion: reduce) {
    .zeni-chat-panel, .zeni-chat-launcher, .zeni-chat-typing > span { animation: none; transition: none; }
}

/* Voice notes */
.zeni-chat-tool.is-recording{color:#be123c;background:#fff1f2;animation:zeniVoicePulse 1s infinite}
.zeni-chat-recording{display:flex;align-items:center;gap:.5rem;margin:.15rem 0 .45rem;padding:.5rem .65rem;border:1px solid #fecdd3;border-radius:.75rem;color:#be123c;background:#fff1f2;font-size:.7rem}
.zeni-chat-recording-dot{width:.5rem;height:.5rem;border-radius:50%;background:#e11d48;animation:zeniVoicePulse 1s infinite}
.zeni-chat-recording time{font-variant-numeric:tabular-nums}.zeni-chat-recording button{margin-left:auto;border:0;color:#be123c;background:transparent}
.zeni-chat-audio-attachment{display:grid;gap:.25rem;min-width:14rem}.zeni-chat-audio-attachment audio{display:block;width:100%;max-width:18rem;height:2.4rem}.zeni-chat-audio-attachment small{font-size:.62rem;opacity:.75}
@keyframes zeniVoicePulse{50%{opacity:.45;transform:scale(.96)}}

/* Advanced live-chat voice-note studio */
.zeni-chat-recording[hidden],.zeni-chat-upload-preview[hidden]{display:none!important}
.zeni-chat-recording{display:grid;gap:.45rem;margin:.15rem 0 .5rem;padding:.6rem;border:1px solid #ddd6fe;border-radius:.85rem;color:#5b21b6;background:linear-gradient(145deg,#faf7ff,#f0fdf8);font-size:.7rem;box-shadow:0 .55rem 1.4rem rgba(76,29,149,.08)}
.zeni-chat-recording.is-paused{border-color:#fde68a;background:linear-gradient(145deg,#fffbeb,#fff)}
.zeni-chat-recording__status{display:flex;align-items:center;gap:.38rem}
.zeni-chat-recording__status strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.zeni-chat-recording__status time{margin-left:auto;color:#111827;font-weight:800;font-variant-numeric:tabular-nums}
.zeni-chat-recording__status>span:last-child{color:#94a3b8;font-size:.62rem}
.zeni-chat-recording-dot{width:.48rem;height:.48rem;flex:0 0 auto;border-radius:50%;background:#e11d48;box-shadow:0 0 0 .24rem rgba(225,29,72,.1);animation:zeniVoicePulse 1s infinite}
.zeni-chat-recording.is-paused .zeni-chat-recording-dot{background:#f59e0b;box-shadow:none;animation:none}
.zeni-chat-waveform{display:block;width:100%;height:44px;border-radius:.65rem;background:rgba(255,255,255,.8)}
.zeni-chat-recording__actions{display:grid;grid-template-columns:1fr 1.35fr;gap:.35rem}
.zeni-chat-recording__actions button,.zeni-chat-voice-ready__actions button{display:inline-flex;min-height:2rem;align-items:center;justify-content:center;gap:.28rem;padding:.35rem .48rem;border:1px solid #ddd6fe;border-radius:.58rem;color:#5b21b6;background:#fff;font-size:.62rem;font-weight:800}
.zeni-chat-recording__actions .is-primary,.zeni-chat-voice-ready__actions .is-primary{border-color:transparent;color:#fff;background:linear-gradient(135deg,var(--zc-lilac),var(--zc-green))}
.zeni-chat-recording__actions .is-danger{grid-column:1/-1;border-color:#fecdd3;color:#be123c;background:#fff1f2}
.zeni-chat-recording>small{color:#64748b;font-size:.58rem;line-height:1.35}
.zeni-chat-upload-preview.is-voice{padding:.55rem .65rem;background:linear-gradient(145deg,#faf7ff,#f0fdf8)}
.zeni-chat-voice-ready{display:grid;gap:.5rem;width:100%}
.zeni-chat-voice-ready__head{display:flex;align-items:center;gap:.5rem}
.zeni-chat-voice-ready__icon{display:grid;width:2rem;height:2rem;flex:0 0 2rem;place-items:center;border-radius:.65rem;color:#fff;background:linear-gradient(135deg,var(--zc-lilac),var(--zc-green))}
.zeni-chat-voice-ready__head>span:nth-child(2){display:grid;min-width:0;flex:1}
.zeni-chat-voice-ready__head strong{color:#312e81;font-size:.7rem}
.zeni-chat-voice-ready__head small{color:#64748b;font-size:.57rem;line-height:1.3}
.zeni-chat-voice-ready__head em{color:#64748b;font-size:.58rem;font-style:normal;white-space:nowrap}
.zeni-chat-voice-ready audio{width:100%;height:2.2rem}
.zeni-chat-voice-ready__actions{display:grid;grid-template-columns:1fr 1fr;gap:.35rem}
.zeni-chat-voice-ready__actions .is-primary{grid-column:1/-1}
.zeni-chat-tool.is-recording{color:#be123c;background:#fff1f2;animation:zeniVoicePulse 1s infinite}
.zeni-chat-upload-preview > .zeni-chat-voice-ready{display:grid;align-items:stretch;gap:.5rem;padding:0;background:transparent}
.zeni-chat-recording__actions button,.zeni-chat-voice-ready__actions button{margin-left:0}

/* Global audio-call launcher and resilient chat-header call spacing */
.zeni-call-launcher {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 5.15rem);
    z-index: 2147480000;
    display: grid;
    width: 3.75rem;
    height: 3.75rem;
    min-width: 3.75rem;
    min-height: 3.75rem;
    place-items: center;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 50%;
    padding: 0;
    color: #fff;
    background: linear-gradient(145deg, #20b96f, var(--zc-green) 55%, #2e7550);
    box-shadow: 0 1rem 2.6rem rgba(25, 117, 72, .36), inset 0 1px 0 rgba(255,255,255,.28);
    cursor: pointer;
    isolation: isolate;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.zeni-call-launcher:hover,
.zeni-call-launcher:focus-visible {
    transform: translateY(-3px) scale(1.035);
    box-shadow: 0 1.3rem 3rem rgba(25,117,72,.44), 0 0 0 .45rem rgba(32,185,111,.12), inset 0 1px 0 rgba(255,255,255,.32);
}
.zeni-call-launcher:focus-visible { outline: 3px solid rgba(32,185,111,.28); outline-offset: 4px; }
.zeni-call-launcher:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.zeni-call-launcher__icon { position: relative; z-index: 2; display: grid; place-items: center; font-size: 1.35rem; transform: rotate(-8deg); }
.zeni-call-launcher__rings,
.zeni-call-launcher__rings::before {
    position: absolute;
    inset: -.08rem;
    z-index: -1;
    border: 2px solid rgba(50,220,135,.45);
    border-radius: 50%;
    content: "";
    animation: zeniCallLauncherRing 2.2s ease-out infinite;
}
.zeni-call-launcher__rings::before { inset: -.6rem; animation-delay: .7s; }
.zeni-call-launcher__label {
    position: absolute;
    right: calc(100% + .65rem);
    top: 50%;
    transform: translate(.35rem,-50%);
    padding: .48rem .72rem;
    border-radius: .7rem;
    color: #fff;
    background: #173326;
    box-shadow: 0 .65rem 1.7rem rgba(15,23,42,.2);
    font-size: .74rem;
    font-weight: 850;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}
.zeni-call-launcher:hover .zeni-call-launcher__label,
.zeni-call-launcher:focus-visible .zeni-call-launcher__label { opacity: 1; transform: translate(0,-50%); }
.zeni-system-chat.is-open .zeni-call-launcher { opacity: 0; pointer-events: none; transform: translateY(10px) scale(.92); }

.zeni-chat-brand { flex: 1 1 auto; overflow: hidden; }
.zeni-chat-header__actions { flex: 0 0 auto; align-items: center; gap: .38rem; margin-left: .6rem; }
.zeni-chat-icon-btn {
    width: 2.25rem;
    height: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
    flex: 0 0 2.25rem;
    padding: 0;
    line-height: 1;
}
.zeni-chat-call-btn {
    width: 2.45rem;
    height: 2.45rem;
    min-width: 2.45rem;
    min-height: 2.45rem;
    flex-basis: 2.45rem;
    margin-right: .12rem;
    background: rgba(35, 204, 123, .2);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.zeni-chat-call-btn:hover,
.zeni-chat-call-btn:focus-visible { background: rgba(35,204,123,.38); }

@keyframes zeniCallLauncherRing {
    0% { opacity: .65; transform: scale(.84); }
    80%,100% { opacity: 0; transform: scale(1.45); }
}

@media (max-width: 600px) {
    .zeni-call-launcher {
        right: max(.75rem, env(safe-area-inset-right));
        bottom: calc(max(.75rem, env(safe-area-inset-bottom)) + 4.85rem);
        width: 3.55rem;
        height: 3.55rem;
        min-width: 3.55rem;
        min-height: 3.55rem;
    }
    .zeni-call-launcher__label { display: none; }
    .zeni-chat-header { gap: .45rem; padding-left: .85rem; padding-right: .7rem; }
    .zeni-chat-brand { gap: .55rem; }
    .zeni-chat-brand__mark { width: 2.25rem; height: 2.25rem; }
    .zeni-chat-header__actions { gap: .2rem; margin-left: .25rem; }
    .zeni-chat-icon-btn { width: 2.2rem; height: 2.2rem; min-width: 2.2rem; min-height: 2.2rem; flex-basis: 2.2rem; }
    .zeni-chat-call-btn { width: 2.4rem; height: 2.4rem; min-width: 2.4rem; min-height: 2.4rem; flex-basis: 2.4rem; margin-right: .08rem; }
}
@media (max-width: 365px) {
    .zeni-chat-brand small { display: none; }
    .zeni-chat-brand strong { font-size: .9rem; }
    .zeni-chat-header__actions { gap: .12rem; }
    .zeni-chat-icon-btn { width: 2.05rem; height: 2.05rem; min-width: 2.05rem; min-height: 2.05rem; flex-basis: 2.05rem; }
    .zeni-chat-call-btn { width: 2.3rem; height: 2.3rem; min-width: 2.3rem; min-height: 2.3rem; flex-basis: 2.3rem; }
}
@media (prefers-reduced-motion: reduce) {
    .zeni-call-launcher__rings, .zeni-call-launcher__rings::before { animation: none; }
}
