.ev-chat {
    --chat-navy: #071b70;
    --chat-blue: #1648c9;
    --chat-cyan: #13b8d4;
    --chat-ink: #13213b;
    --chat-muted: #657189;
    --chat-line: #dce3ed;
    position: fixed;
    z-index: 1200;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    font: 400 15px/1.45 Inter, "Segoe UI", sans-serif;
    color: var(--chat-ink);
}

.ev-chat *, .ev-chat *::before, .ev-chat *::after { box-sizing: border-box; }

.ev-chat button, .ev-chat input, .ev-chat select, .ev-chat textarea { font: inherit; }

.ev-chat button:focus-visible,
.ev-chat input:focus-visible,
.ev-chat select:focus-visible,
.ev-chat textarea:focus-visible,
.ev-chat a:focus-visible {
    outline: 3px solid rgba(19, 184, 212, .42);
    outline-offset: 2px;
}

.ev-chat-launcher {
    min-height: 52px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    background: var(--chat-navy);
    box-shadow: 0 16px 40px rgba(7, 27, 112, .25);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 700;
}

.ev-chat-launcher svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.ev-chat-launcher i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #99a3b6;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .15);
}

.ev-chat-launcher i.is-online {
    background: #35c98f;
    box-shadow: 0 0 0 3px rgba(53, 201, 143, .2);
    animation: ev-chat-presence-pulse 2.4s ease-out infinite;
}

@keyframes ev-chat-presence-pulse {
    0%, 58%, 100% { box-shadow: 0 0 0 3px rgba(53, 201, 143, .2); }
    72% { box-shadow: 0 0 0 7px rgba(53, 201, 143, 0); }
}

.ev-chat-panel {
    position: absolute;
    right: 0;
    bottom: 66px;
    width: min(390px, calc(100vw - 32px));
    height: min(650px, calc(100dvh - 110px));
    min-height: 430px;
    overflow: hidden;
    border: 1px solid rgba(7, 27, 112, .12);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(9, 25, 64, .25);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.ev-chat-panel[hidden] { display: none; }

.ev-chat.is-fullscreen {
    inset: 0;
    width: 100dvw;
    height: 100dvh;
}

.ev-chat.is-fullscreen .ev-chat-launcher { display: none; }

.ev-chat.is-fullscreen .ev-chat-panel {
    position: fixed;
    inset: 0;
    width: 100dvw;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
}

.ev-chat-header {
    min-height: 74px;
    padding: 13px 14px 13px 17px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: var(--chat-navy);
    color: #fff;
}

.ev-chat-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ev-chat-identity img { width: 56px; height: 30px; object-fit: contain; filter: brightness(0) invert(1); }
.ev-chat-identity div { min-width: 0; }
.ev-chat-identity strong, .ev-chat-identity span { display: block; }
.ev-chat-identity strong { font-size: 15px; }
.ev-chat-identity span { margin-top: 1px; color: #dbe5ff; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-chat-connection-state { display: block; margin-top: 2px; color: #c7d4f4; font-size: 10px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-chat-connection-state::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #e3ad37; vertical-align: 1px; }
.ev-chat-connection-state[data-state="online"]::before { background: #35c98f; }
.ev-chat-connection-state[data-state="ready"]::before { background: #35c98f; }
.ev-chat-connection-state[data-state="offline"]::before { background: #aeb7c7; }
.ev-chat-connection-state[data-state="reconnecting"]::before,
.ev-chat-connection-state[data-state="connecting"]::before { animation: ev-chat-presence-pulse 1.5s ease-out infinite; }

.ev-chat-header-actions { display: flex; gap: 4px; }
.ev-chat-header-actions button,
.ev-chat-tools button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.ev-chat-header-actions button { background: rgba(255, 255, 255, .1); color: #fff; }
.ev-chat-header-actions button:hover { background: rgba(255, 255, 255, .18); }
.ev-chat-header-actions svg, .ev-chat-tools svg, .ev-chat-send svg { width: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.ev-chat-body { min-height: 0; overflow: hidden; background: #f5f7fb; }
.ev-chat-welcome { height: 100%; overflow-y: auto; padding: 28px 22px 34px; scrollbar-width: none; }
.ev-chat-welcome[hidden] { display: none; }
.ev-chat-offline { height: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 24px 22px max(30px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; scrollbar-width: thin; }
.ev-chat-offline[hidden] { display: none; }
.ev-chat-offline h3 { margin: -2px 0 0; color: var(--chat-navy); font-size: clamp(20px, 5vw, 23px); line-height: 1.2; }
.ev-chat-offline > p { margin: -3px 0 3px; color: var(--chat-muted); font-size: 13px; line-height: 1.45; }
.ev-chat-offline label { min-width: 0; display: grid; gap: 6px; color: #243452; font-size: 12px; font-weight: 800; }
.ev-chat-offline label small { color: var(--chat-muted); font-weight: 600; }
.ev-chat-offline input:not([type="checkbox"]),
.ev-chat-offline select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--chat-line); border-radius: 10px; background-color: #fff; color: var(--chat-ink); font-size: 16px; font-weight: 500; line-height: 1.25; }
.ev-chat-offline select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%231648c9' stroke-width='1.8'%3E%3Cpath d='m5 7.5 5 5 5-5'/%3E%3C/svg%3E"); background-position: right 11px center; background-repeat: no-repeat; background-size: 18px; }
.ev-chat-offline input:not([type="checkbox"]):hover,
.ev-chat-offline select:hover { border-color: #b9c7dc; }
.ev-chat-offline [aria-invalid="true"] { border-color: #c43b4b !important; box-shadow: 0 0 0 3px rgba(196, 59, 75, .1); }
.ev-chat-offline .ev-chat-consent-row { grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 10px; margin-top: 1px; color: #35415a; font-size: 12px; font-weight: 650; line-height: 1.42; cursor: pointer; }
.ev-chat-offline .ev-chat-consent-row input[type="checkbox"] { appearance: none; width: 20px; height: 20px; margin: 0; border: 1.5px solid #aebbd0; border-radius: 6px; background: #fff; display: grid; place-content: center; cursor: pointer; }
.ev-chat-offline .ev-chat-consent-row input[type="checkbox"]::before { content: ''; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; opacity: 0; transform: translateY(-1px) rotate(-45deg); }
.ev-chat-offline .ev-chat-consent-row input[type="checkbox"]:checked { border-color: var(--chat-blue); background: var(--chat-blue); }
.ev-chat-offline .ev-chat-consent-row input[type="checkbox"]:checked::before { opacity: 1; }
.ev-chat-offline .ev-chat-field-error { margin: 0; overflow-wrap: anywhere; }
.ev-chat-offline .ev-chat-field-error[data-state="success"] { background: #eaf9f2 !important; color: #126a4a !important; }
.ev-chat-offline .ev-chat-primary { width: 100%; margin-top: 1px; }
.ev-chat-welcome::-webkit-scrollbar,
.ev-chat-transcript::-webkit-scrollbar { width: 0; height: 0; }
.ev-chat-welcome::-webkit-scrollbar-track,
.ev-chat-transcript::-webkit-scrollbar-track { background: transparent; }
.ev-chat-welcome::-webkit-scrollbar-thumb,
.ev-chat-transcript::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(101, 113, 137, .18); }
.ev-chat-transcript:hover::-webkit-scrollbar-thumb,
.ev-chat-transcript:focus-within::-webkit-scrollbar-thumb { background: rgba(101, 113, 137, .34); }
.ev-chat-intro h2 { margin: 0; color: var(--chat-navy); font-size: clamp(21px, 4vw, 25px); line-height: 1.18; }
.ev-chat-intro p { max-width: 34ch; margin: 9px 0 9px; color: var(--chat-muted); }
.ev-chat-intro a { color: var(--chat-blue); font-size: 13px; font-weight: 700; text-underline-offset: 3px; }
.ev-chat-back{min-height:40px;width:max-content;margin:0 0 14px;border:0;background:transparent;color:var(--chat-blue);display:inline-flex;align-items:center;gap:7px;font-weight:800;cursor:pointer}.ev-chat-back svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.ev-chat-contact{display:grid;gap:11px}.ev-chat-contact[hidden]{display:none}.ev-chat-contact h3{margin:0;color:var(--chat-navy);font-size:20px}.ev-chat-contact p{margin:0;color:var(--chat-muted);font-size:13px}.ev-chat-contact label{display:grid;gap:5px;color:#243452;font-size:12px;font-weight:800}.ev-chat-contact input[type=text],.ev-chat-contact input[type=tel],.ev-chat-contact input[type=email]{min-height:42px;padding:9px 11px;border:1px solid var(--chat-line);border-radius:10px;background:#fff;color:var(--chat-ink);font:inherit}.ev-chat-contact .ev-chat-consent-row{grid-template-columns:auto minmax(0,1fr);align-items:flex-start;font-weight:650;line-height:1.35}.ev-chat-consent-row input{margin-top:3px}.ev-chat-field-error{padding:9px 10px;border-radius:9px;background:#fff0f1!important;color:#9b2430!important}.ev-chat-primary{min-height:44px;border:0;border-radius:11px;background:var(--chat-blue);color:#fff;font-weight:850;cursor:pointer}

.ev-chat-sectors { display: grid; gap: 10px; margin-top: 22px; }
.ev-chat-sector-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 2px; }
.ev-chat-sector-summary > strong { color: #35415a; font-size: 12px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.ev-chat-sector-summary > span { display: inline-flex; align-items: center; gap: 6px; color: var(--chat-muted); font-size: 12px; font-weight: 650; }
.ev-chat-sector-summary i,
.ev-chat-sector small i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #a5adbb; }
.ev-chat-sector-summary .is-online i,
.ev-chat-sector small.is-online i { background: #21ad76; box-shadow: 0 0 0 3px rgba(33, 173, 118, .12); }
.ev-chat-sector {
    width: 100%;
    min-height: 70px;
    padding: 11px 12px;
    border: 1px solid var(--chat-line);
    border-radius: 14px;
    background: #fff;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 11px;
    color: var(--chat-ink);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(7, 27, 112, .025);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.ev-chat-sector:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(22, 72, 201, .42); background: #fbfdff; box-shadow: 0 9px 24px rgba(7, 27, 112, .09); }
.ev-chat-sector:active:not(:disabled) { transform: translateY(0); }
.ev-chat-sector-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: #edf5ff; color: var(--chat-blue); }
.ev-chat-sector-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.ev-chat-sector-copy { min-width: 0; }
.ev-chat-sector strong { display: block; overflow: hidden; color: #14234a; font-size: 15px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.ev-chat-sector small { display: flex; align-items: center; gap: 7px; min-width: 0; margin-top: 4px; overflow: hidden; color: var(--chat-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ev-chat-sector-arrow { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: #f2f6fc; color: var(--chat-blue); }
.ev-chat-sector-arrow svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ev-chat-sector:disabled { cursor: not-allowed; background: rgba(255, 255, 255, .58); box-shadow: none; }
.ev-chat-sector:disabled .ev-chat-sector-icon { background: #f0f2f6; color: #8f99aa; }
.ev-chat-sector:disabled .ev-chat-sector-arrow { color: #a0a8b6; }

.ev-chat-conversation { height: 100%; min-height: 0; display: grid; grid-template-rows:auto minmax(0, 1fr) auto auto; }
.ev-chat-conversation[hidden] { display: none; }
.ev-chat-transcript { min-height: 0; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 9px; scrollbar-width: thin; scrollbar-color: rgba(101, 113, 137, .2) transparent; }
.ev-chat-system { align-self: center; max-width: 88%; color: var(--chat-muted); font-size: 12px; text-align: center; }
.ev-chat-bubble { max-width: 82%; padding: 10px 12px; border-radius: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ev-chat-bubble.is-visitor { align-self: flex-end; border-bottom-right-radius: 4px; background: var(--chat-blue); color: #fff; }
.ev-chat-bubble.is-agent { align-self: flex-start; border: 1px solid var(--chat-line); border-bottom-left-radius: 4px; background: #fff; }
.ev-chat-bubble time { display: block; margin-top: 4px; font-size: 10px; opacity: .72; text-align: right; }
.ev-chat-error { margin: 0 14px 8px; padding: 8px 10px; border-radius: 8px; background: #fff0f1; color: #9b2430; font-size: 12px; }
.ev-chat-transfer{margin:0 12px 8px;padding:9px;border:1px solid var(--chat-line);border-radius:9px;background:#fff;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 9px;align-items:center;font-size:12px}.ev-chat-transfer[hidden]{display:none}.ev-chat-transfer progress{grid-column:1/-1;width:100%;height:6px;accent-color:var(--chat-blue)}.ev-chat-transfer button{border:0;background:transparent;color:var(--chat-blue);font-weight:700;cursor:pointer}.ev-chat-call{position:absolute;z-index:4;inset:74px 0 0;padding:14px;background:#071436;color:#fff;display:grid;grid-template-rows:minmax(0,1fr) auto auto;gap:9px}.ev-chat-call[hidden]{display:none}.ev-chat-call video{width:100%;height:100%;min-height:0;border-radius:10px;background:#020712;object-fit:cover}.ev-chat-call [data-call-local]{position:absolute;right:24px;top:24px;width:96px;height:130px;border:2px solid #fff}.ev-chat-call p{text-align:center}.ev-chat-call>div{display:flex;justify-content:center;gap:8px}.ev-chat-call button,.ev-chat-consent button,.ev-chat-registration button{min-height:42px;padding:0 13px;border:1px solid rgba(255,255,255,.22);border-radius:9px;background:#17306a;color:#fff;font-weight:700;cursor:pointer}.ev-chat-call [data-call-end]{background:#ba2c3a}.ev-chat-special{align-self:stretch;padding:12px;border:1px solid #b9c9ea;border-radius:12px;background:#fff}.ev-chat-special strong,.ev-chat-special p{display:block;margin:0}.ev-chat-special p{margin-top:5px;color:var(--chat-muted);font-size:12px}.ev-chat-special>div{display:flex;gap:7px;margin-top:10px;flex-wrap:wrap}.ev-chat-special button{min-height:38px;padding:0 11px;border:1px solid var(--chat-blue);border-radius:8px;background:#fff;color:var(--chat-blue);font-weight:700;cursor:pointer}.ev-chat-special button:first-child{background:var(--chat-blue);color:#fff}.ev-chat-registration label{display:grid;gap:5px;margin-top:10px}.ev-chat-registration input{min-height:42px;padding:8px 10px;border:1px solid var(--chat-line);border-radius:8px}.ev-chat-registration button{border-color:var(--chat-blue);background:var(--chat-blue)}.ev-chat-registration button[data-registration-pause]{background:#fff;color:var(--chat-blue)}.ev-chat-consent{position:fixed;z-index:2200;inset:0;padding:20px;background:rgba(4,14,54,.68);display:grid;place-items:center}.ev-chat-consent[hidden]{display:none}.ev-chat-consent section{width:min(430px,100%);padding:22px;border-radius:14px;background:#fff;box-shadow:0 20px 60px rgba(0,0,0,.3)}.ev-chat-consent h2{margin:0;color:var(--chat-navy);font-size:20px}.ev-chat-consent p{color:var(--chat-muted)}.ev-chat-consent section>div{display:flex;justify-content:flex-end;gap:8px}.ev-chat-consent button{border-color:var(--chat-blue);background:#fff;color:var(--chat-blue)}.ev-chat-consent [data-audio-allow]{background:var(--chat-blue);color:#fff}

.ev-chat-composer {
    position: relative;
    padding: 10px;
    border-top: 1px solid var(--chat-line);
    background: #fff;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    gap: 7px;
}
.ev-chat-tools { display: flex; }
.ev-chat-tools button { width: 35px; height: 40px; background: transparent; color: #4f5f78; }
.ev-chat-tools button:disabled { opacity: .3; cursor: not-allowed; }
.ev-chat-composer textarea { width: 100%; min-height: 40px; max-height: 118px; resize: none; padding: 9px 11px; border: 1px solid var(--chat-line); border-radius: 11px; background: #f8fafc; color: var(--chat-ink); line-height: 1.4; }
.ev-chat-send { width: 42px; height: 42px; border: 0; border-radius: 11px; background: var(--chat-blue); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ev-chat-send:disabled { opacity: .55; cursor: wait; }
.ev-chat-emojis { position: absolute; left: 9px; bottom: 66px; z-index: 2; padding: 7px; border: 1px solid var(--chat-line); border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgba(9, 25, 64, .16); display: flex; gap: 4px; }
.ev-chat-emojis[hidden] { display: none; }
.ev-chat-emojis button { min-width: 38px; min-height: 36px; border: 0; border-radius: 7px; background: #f1f5fa; cursor: pointer; }
.ev-chat-attachment-link { display: grid; gap: 6px; margin-top: 8px; color: inherit; font-size: 12px; font-weight: 800; }
.ev-chat-attachment-link img { display: block; width: min(220px, 100%); max-height: 150px; border-radius: 9px; object-fit: cover; background: #e8edf4; }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

body.ev-chat-fullscreen-open { overflow: hidden; }

@media (min-width: 900px) {
    .ev-chat.is-fullscreen .ev-chat-header { padding-inline: max(28px, calc((100vw - 1400px) / 2)); }
    .ev-chat.is-fullscreen .ev-chat-body { display: grid; place-items: stretch center; }
    .ev-chat.is-fullscreen .ev-chat-welcome,
    .ev-chat.is-fullscreen .ev-chat-conversation { width: min(100%, 920px); }
}

@media (max-width: 520px) {
    body.ev-chat-panel-open { overflow: hidden; }
    .ev-chat { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
    .ev-chat-panel { position: fixed; inset: 0; width: 100dvw; height: 100dvh; min-height: 0; border: 0; border-radius: 0; padding-top: env(safe-area-inset-top); padding-right: env(safe-area-inset-right); padding-bottom: env(safe-area-inset-bottom); padding-left: env(safe-area-inset-left); }
    .ev-chat-launcher { min-height: 50px; }
    .ev-chat-header-actions [data-chat-fullscreen] { display: none; }
    .ev-chat-welcome,
    .ev-chat-offline { padding: 20px max(16px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
    .ev-chat-sector-summary { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    .ev-chat *, .ev-chat *::before, .ev-chat *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
    .ev-chat-launcher, .ev-chat-panel, .ev-chat-sector, .ev-chat-composer, .ev-chat-send { border: 1px solid ButtonText; }
}
.ev-chat-honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}
