
/* ── EWT AI Chat Widget ──────────────────────────────────────────────────── */

/* Bubble trigger ──────────────────────────────────────────────────────────── */
#ewt-chat-bubble {
    position: fixed;
    bottom: 2rem;
    left: 1.5rem;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #ffffff;
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(0, 73, 202, .45);
    transition: transform .2s, box-shadow .2s;
    padding: 0;
    overflow: visible;
}

#ewt-chat-bubble:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 26px rgba(0, 73, 202, .55);
}

#ewt-chat-bubble svg {
    width: 24px;
    height: 24px;
    display: block;
    pointer-events: none;
}

.ewt-bubble-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    pointer-events: none;
    display: block;
    border-radius: 50%;
}

#ewt-chat-bubble .ewt-chat-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 11px;
    height: 11px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid #fff;
    animation: ewt-pulse 2s infinite;
}

@keyframes ewt-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.18); opacity: .8; }
}

/* Panel ───────────────────────────────────────────────────────────────────── */
#ewt-chat-panel {
    position: fixed;
    bottom: 6.25rem;
    left: 1.5rem;
    width: 360px;
    max-height: 784px;
    background: #ffffff;
    border-radius: 16px;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 10px 48px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .08);
    display: flex;
    flex-direction: column;
    z-index: 9997;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px) scale(.97);
    transform-origin: bottom left;
    transition: opacity .22s, transform .22s;
}

#ewt-chat-panel.ewt-chat-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Header ──────────────────────────────────────────────────────────────────── */
.ewt-chat-header {
    background: #0b1426;
    padding: .875rem 1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}

.ewt-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0049ca;
    box-shadow: 0 4px 15px rgba(0, 73, 202, 0.28);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    font-family: 'Sora', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: -.02em;
    border: 2px solid rgba(255, 255, 255, .15);
}

.ewt-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Show initial letter when image fails to load */
.ewt-chat-avatar:not(:has(img))::after,
.ewt-chat-avatar:has(img[style*="display:none"])::after {
    content: attr(data-initial);
}

.ewt-chat-info { flex: 1; min-width: 0; }

.ewt-chat-agent-name {
    color: #fff;
    font-size: .88rem;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    line-height: 1.25;
}

.ewt-chat-agent-role {
    color: rgba(255, 255, 255, .45);
    font-size: .7rem;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ewt-chat-status {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .68rem;
    color: rgba(255, 255, 255, .4);
    flex-shrink: 0;
}

.ewt-chat-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    display: block;
    flex-shrink: 0;
}

.ewt-chat-close {
    background: rgba(255, 255, 255, .08);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: rgba(255, 255, 255, .55);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    flex-shrink: 0;
    padding: 0;
}

.ewt-chat-close:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.ewt-chat-close svg { width: 15px; height: 15px; display: block; pointer-events: none; }

/* Messages ────────────────────────────────────────────────────────────────── */
.ewt-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: .875rem .875rem .5rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

.ewt-chat-messages::-webkit-scrollbar { width: 3px; }
.ewt-chat-messages::-webkit-scrollbar-track { background: transparent; }
.ewt-chat-messages::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .1); border-radius: 3px; }

/* Message bubbles */
.ewt-msg {
    max-width: 84%;
    font-size: .83rem;
    line-height: 1.58;
    padding: .55rem .85rem;
    border-radius: 16px;
    word-break: break-word;
    animation: ewt-msg-in .16s ease;
}

@keyframes ewt-msg-in {
    from { opacity: 0; transform: translateY(7px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ewt-msg-agent {
    background: #f0f3f8;
    color: #1a2035;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.ewt-msg-user {
    background: #0049ca;
    box-shadow: 0 4px 15px rgba(0, 73, 202, 0.28);
    color: #fff;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

/* Markdown list inside bubbles */
.ewt-msg-agent .ewt-md-list {
    margin: .3rem 0 .15rem 1.1rem;
    padding: 0;
}

.ewt-msg-agent .ewt-md-list li {
    margin-bottom: .2rem;
    line-height: 1.5;
}

/* Typing indicator */
.ewt-typing {
    align-self: flex-start;
    background: #f0f3f8;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    padding: .55rem .85rem;
    display: flex;
    gap: .28rem;
    align-items: center;
    animation: ewt-msg-in .16s ease;
}

.ewt-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8896a5;
    display: block;
    animation: ewt-dot-bounce .85s infinite ease-in-out;
}

.ewt-typing span:nth-child(2) { animation-delay: .14s; }
.ewt-typing span:nth-child(3) { animation-delay: .28s; }

@keyframes ewt-dot-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: .7; }
    30%            { transform: translateY(-5px); opacity: 1; }
}

/* Returning visitor confirm block ─────────────────────────────────────────── */
.ewt-visitor-confirm {
    align-self: center;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border: 1.5px solid #bae6fd;
    border-radius: 16px;
    padding: .9rem 1.1rem;
    max-width: 96%;
    text-align: center;
    animation: ewt-msg-in .22s ease;
}

.ewt-vc-text {
    font-size: .85rem;
    color: #191b24;
    margin: 0 0 .65rem;
    line-height: 1.45;
}

.ewt-vc-actions {
    display: flex;
    gap: .5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Consent block (inline in message stream) ────────────────────────────────── */
.ewt-consent-block {
    align-self: flex-start;
    background: #f0f5ff;
    border: 1.5px solid #c7d8f8;
    border-radius: 12px;
    padding: .75rem .9rem;
    max-width: 92%;
    animation: ewt-msg-in .18s ease;
}

.ewt-consent-text {
    font-size: .82rem;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    color: #1a2035;
    margin: 0 0 .6rem;
    line-height: 1.4;
}

.ewt-consent-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.ewt-consent-yes,
.ewt-consent-no {
    border: none;
    border-radius: 20px;
    padding: .38rem .85rem;
    font-size: .78rem;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    transition: background .15s, transform .1s;
    font-family: inherit;
}

.ewt-consent-yes {
    background: #0049ca;
    box-shadow: 0 4px 15px rgba(0, 73, 202, 0.28);
    color: #fff;
}

.ewt-consent-yes:hover { background: #003aad; transform: scale(1.03); }

.ewt-consent-no {
    background: rgba(0, 0, 0, .06);
    color: #5a6a7e;
}

.ewt-consent-no:hover { background: rgba(0, 0, 0, .1); }

/* Agent handoff block ─────────────────────────────────────────────────────── */
.ewt-handoff-block {
    align-self: flex-start;
    background: #f0f5ff;
    border: 1.5px solid #c7d8f8;
    border-radius: 12px;
    padding: .75rem .9rem;
    max-width: 94%;
    animation: ewt-msg-in .18s ease;
}

.ewt-handoff-text {
    font-size: .82rem;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    color: #1a2035;
    margin: 0 0 .6rem;
    line-height: 1.45;
}

.ewt-handoff-agent-card {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: .65rem;
}

.ewt-handoff-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0049ca;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
    overflow: hidden;
}

.ewt-handoff-avatar .ewt-avatar-img {
    width: 100%;
    height: 100%;
}

.ewt-handoff-profile {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
}

.ewt-handoff-eyebrow {
    margin: 0;
    color: #64748b;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ewt-handoff-profile strong {
    color: #0f172a;
    font-size: .86rem;
    line-height: 1.25;
}

.ewt-handoff-profile span {
    color: #475569;
    font-size: .74rem;
    line-height: 1.3;
}

.ewt-handoff-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* System message (centred label) ──────────────────────────────────────────── */
.ewt-msg-system {
    align-self: center;
    font-size: .68rem;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    color: #8896a5;
    background: #eef1f6;
    border-radius: 20px;
    padding: .22rem .9rem;
    letter-spacing: .02em;
}

/* End-chat "before you go" prompt ────────────────────────────────────────── */
.ewt-endchat-block {
    align-self: flex-start;
    background: #fff8f0;
    border: 1.5px solid #fcd6a8;
    border-radius: 12px;
    padding: .75rem .9rem;
    max-width: 94%;
    animation: ewt-msg-in .18s ease;
}

.ewt-endchat-text {
    font-size: .82rem;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    color: #1a2035;
    margin: 0 0 .6rem;
    line-height: 1.4;
}

.ewt-endchat-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* End-chat quick contact form ─────────────────────────────────────────────── */
.ewt-endchat-form {
    align-self: flex-start;
    background: #f7f9fc;
    border: 1.5px solid #d0d9e5;
    border-radius: 12px;
    padding: .8rem .9rem;
    width: 92%;
    animation: ewt-msg-in .18s ease;
}

.ewt-endchat-form-label {
    font-size: .76rem;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    color: #3d4f66;
    margin: 0 0 .55rem;
}

.ewt-endchat-form input {
    display: block;
    width: 100%;
    border: 1.5px solid #d0d9e5;
    border-radius: 9px;
    padding: .44rem .7rem;
    font-size: .8rem;
    margin-bottom: .38rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    color: #1a2035;
    background: #ffffff;
    font-family: inherit;
}

.ewt-endchat-form input:focus {
    border-color: #0049CA;
    box-shadow: 0 0 0 3px rgba(0, 73, 202, .09);
}

.ewt-endchat-form input::placeholder { color: #a0adb8; }

.ewt-end-submit {
    width: 100%;
    background: #0049ca;
    box-shadow: 0 4px 15px rgba(0, 73, 202, 0.28);
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: .52rem;
    font-size: .8rem;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    margin-top: .2rem;
    transition: background .15s;
    font-family: inherit;
}

.ewt-end-submit:hover:not(:disabled)  { background: #003aad; }
.ewt-end-submit:disabled { opacity: .55; cursor: not-allowed; }

.ewt-lead-form {
    align-self: flex-start;
    background: #f7f9fc;
    border: 1.5px solid #d0d9e5;
    border-radius: 12px;
    padding: .85rem .9rem;
    width: 94%;
    animation: ewt-msg-in .18s ease;
}

.ewt-lead-form-title {
    font-size: .78rem;
    font-weight: 700;
    color: #3d4f66;
    margin: 0 0 .6rem;
    line-height: 1.45;
}

.ewt-lead-form-grid {
    display: grid;
    gap: .45rem;
}

.ewt-lead-input,
.ewt-lead-notes {
    display: block;
    width: 100%;
    border: 1.5px solid #d0d9e5;
    border-radius: 9px;
    padding: .48rem .7rem;
    font-size: .8rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    color: #1a2035;
    background: #ffffff;
    font-family: inherit;
}

.ewt-lead-input:focus,
.ewt-lead-notes:focus {
    border-color: #0049CA;
    box-shadow: 0 0 0 3px rgba(0, 73, 202, .09);
}

.ewt-lead-notes {
    resize: vertical;
    min-height: 76px;
}

.ewt-lead-error {
    color: #b91c1c;
    font-size: .74rem;
    margin: .55rem 0 0;
}

.ewt-lead-actions {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .7rem;
    flex-wrap: wrap;
}

/* End Chat button ─────────────────────────────────────────────────────────── */
.ewt-chat-end {
    background: none;
    border: 1px solid #d0d9e5;
    border-radius: 12px;
    color: #8896a5;
    font-size: .7rem;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    padding: .28rem .6rem;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: border-color .15s, color .15s;
    font-family: inherit;
    align-self: center;
}

.ewt-chat-end:hover { border-color: #e05c5c; color: #e05c5c; }

/* Restart / new chat button ───────────────────────────────────────────────── */
.ewt-restart-wrap {
    align-self: center;
    text-align: center;
    padding: .5rem 0 .25rem;
}

.ewt-restart-btn {
    background: #f0f3f8;
    border: 1.5px solid #d0d9e5;
    border-radius: 20px;
    color: #1a2035;
    font-size: .78rem;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    padding: .42rem 1rem;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    font-family: inherit;
}

.ewt-restart-btn:hover { background: #e2e8f4; border-color: #b5c0d0; }

/* Input bar ───────────────────────────────────────────────────────────────── */
.ewt-chat-input-bar {
    display: flex;
    align-items: flex-end;
    gap: .45rem;
    padding: .65rem .875rem;
    border-top: 1px solid #eaeef4;
    flex-shrink: 0;
}

.ewt-chat-input {
    flex: 1;
    border: 1.5px solid #d0d9e5;
    border-radius: 20px;
    padding: .48rem .875rem;
    font-size: .83rem;
    outline: none;
    resize: none;
    line-height: 1.45;
    max-height: 80px;
    overflow-y: auto;
    transition: border-color .15s, box-shadow .15s;
    color: #1a2035;
    font-family: inherit;
    background: #ffffff;
}

.ewt-chat-input:focus {
    border-color: #0049CA;
    box-shadow: 0 0 0 3px rgba(0, 73, 202, .08);
}

.ewt-chat-input::placeholder { color: #a0adb8; }

.ewt-chat-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0049ca;
    box-shadow: 0 4px 15px rgba(0, 73, 202, 0.28);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s, transform .15s;
    padding: 0;
}

.ewt-chat-send:hover:not(:disabled)  { background: #003aad; transform: scale(1.06); }
.ewt-chat-send:disabled { opacity: .45; cursor: not-allowed; }
.ewt-chat-send svg { width: 16px; height: 16px; display: block; pointer-events: none; }

/* Powered-by strip ────────────────────────────────────────────────────────── */
.ewt-chat-powered {
    text-align: center;
    font-size: .62rem;
    color: #b5bfcc;
    padding: .28rem 0 .38rem;
    flex-shrink: 0;
    letter-spacing: .02em;
}

/* Settings strip (language toggle + options menu) ─────────────────────────── */
.ewt-chat-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .3rem .875rem .28rem;
    border-bottom: 1px solid #eaeef4;
    background: #f9fafb;
    flex-shrink: 0;
    gap: .5rem;
}

.ewt-chat-strip-left {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

.ewt-strip-btn {
    background: none;
    border: none;
    padding: .22rem .3rem;
    cursor: pointer;
    color: #8896a5;
    display: flex;
    align-items: center;
    border-radius: 7px;
    transition: color .15s, background .15s;
}

.ewt-strip-btn:hover { color: #3d4f66; background: #eaeef4; }
.ewt-strip-btn svg   { width: 16px; height: 16px; display: block; }

.ewt-lang-toggle {
    display: flex;
    border: 1.5px solid #d0d9e5;
    border-radius: 20px;
    overflow: hidden;
}

.ewt-lang-btn {
    background: none;
    border: none;
    padding: .18rem .6rem;
    font-size: .68rem;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    color: #8896a5;
    cursor: pointer;
    letter-spacing: .04em;
    transition: background .13s, color .13s;
    font-family: inherit;
}

.ewt-lang-btn.active {
    background: #0049ca;
    box-shadow: 0 4px 15px rgba(0, 73, 202, 0.28);
    color: #fff;
    border-radius: 16px;
}

.ewt-lead-shortcut {
    border: 1px solid #d0d9e5;
    background: #fff;
    color: #3d4f66;
    border-radius: 999px;
    padding: .26rem .65rem;
    font-size: .7rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s, color .15s, background .15s;
}

.ewt-lead-shortcut:hover {
    border-color: #0049ca;
    color: #0049ca;
    background: #f7fbff;
}

/* Quick-reply chips ───────────────────────────────────────────────────────── */
.ewt-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: .45rem .875rem .5rem;
    align-self: flex-start;
    max-width: 100%;
}

.ewt-chip {
    background: #f0f5ff;
    border: 1.5px solid #c7d8f8;
    border-radius: 20px;
    color: #0049CA;
    font-size: .75rem;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    padding: .3rem .75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background .13s, border-color .13s;
    font-family: inherit;
}

.ewt-chip:hover { background: #deeaff; border-color: #94b8f7; }

/* Proactive nudge tooltip ─────────────────────────────────────────────────── */
.ewt-nudge {
    position: fixed;
    bottom: 5.5rem;
    left: 1.25rem;
    background: #ffffff;
    border: 1.5px solid #d0d9e5;
    border-radius: 12px;
    padding: .65rem .85rem .65rem .85rem;
    max-width: 220px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .13);
    z-index: 9999;
    cursor: pointer;
    animation: ewt-msg-in .2s ease;
}

.ewt-nudge p {
    margin: 0;
    font-size: .8rem;
    color: #1a2035;
    line-height: 1.45;
    padding-right: 1rem;
}

.ewt-nudge-close {
    position: absolute;
    top: .35rem;
    right: .45rem;
    background: none;
    border: none;
    font-size: 1rem;
    line-height: 1;
    color: #a0adb8;
    cursor: pointer;
    padding: 0;
}

.ewt-nudge-close:hover { color: #3d4f66; }

/* Rating block ────────────────────────────────────────────────────────────── */
.ewt-rating-block {
    align-self: flex-start;
    background: #f7f9fc;
    border: 1.5px solid #d0d9e5;
    border-radius: 12px;
    padding: .7rem .9rem;
    max-width: 94%;
    animation: ewt-msg-in .18s ease;
}

.ewt-rating-label {
    font-size: .78rem;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    color: #3d4f66;
    margin: 0 0 .55rem;
}

.ewt-rating-stars {
    display: flex;
    gap: .25rem;
}

.ewt-star {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #d0d9e5;
    cursor: pointer;
    padding: 0 .05rem;
    line-height: 1;
    transition: color .12s, transform .1s;
}

.ewt-star:hover,
.ewt-star.hover    { color: #f59e0b; transform: scale(1.15); }
.ewt-star.selected { color: #f59e0b; }
.ewt-star:disabled { cursor: default; }

/* Minimize button (desktop only) ──────────────────────────────────────────── */
.ewt-chat-minimize {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .1);
    border: none;
    color: rgba(255, 255, 255, .85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .13s;
    padding: 0;
    margin-right: 3px;
}

.ewt-chat-minimize:hover { background: rgba(255, 255, 255, .2); }
.ewt-chat-minimize svg   { width: 15px; height: 15px; display: block; }

/* Three-dots options menu ─────────────────────────────────────────────────── */
.ewt-menu-wrap {
    position: relative;
    flex-shrink: 0;
    margin-right: 2px;
}

.ewt-menu-trigger {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: none;
    border: none;
    color: #8896a5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .13s, color .13s;
}

.ewt-menu-trigger:hover    { background: #eaeef4; color: #3d4f66; }
.ewt-menu-trigger:disabled { opacity: .4; cursor: default; }
.ewt-menu-trigger svg      { width: 16px; height: 16px; display: block; }

.ewt-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 185px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .13);
    z-index: 200;
    overflow: hidden;
    animation: ewt-dd-in .12s ease;
}

@keyframes ewt-dd-in {
    from { opacity: 0; transform: translateY(-4px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.ewt-drop-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: 100%;
    padding: .65rem 1rem;
    background: none;
    border: none;
    text-align: left;
    font-size: .82rem;
    font-weight: 500;
    color: #191b24;
    cursor: pointer;
    font-family: inherit;
    transition: background .1s;
    white-space: nowrap;
}

.ewt-drop-item:hover  { background: #f0efed; }
.ewt-drop-item svg    { width: 15px; height: 15px; flex-shrink: 0; color: #7a7a76; }
.ewt-drop-item span   { flex: 1; }

.ewt-drop-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 2px 0;
}

.ewt-drop-wa svg  { color: #25D366; }
.ewt-drop-wa:hover { background: #f0fdf4; }

.ewt-drop-end      { color: #dc2626; }
.ewt-drop-end svg  { color: #dc2626; }
.ewt-drop-end:hover { background: #fef2f2; }

/* Collapsed panel (desktop) ───────────────────────────────────────────────── */
#ewt-chat-panel.ewt-chat-collapsed {
    height: auto !important;
    max-height: none !important;
    border-radius: 18px !important;
    overflow: hidden;
}

#ewt-chat-panel.ewt-chat-collapsed .ewt-chat-strip,
#ewt-chat-panel.ewt-chat-collapsed .ewt-chat-messages,
#ewt-chat-panel.ewt-chat-collapsed .ewt-chat-input-bar,
#ewt-chat-panel.ewt-chat-collapsed .ewt-chat-powered {
    display: none !important;
}

#ewt-chat-panel.ewt-chat-collapsed .ewt-chat-header {
    border-radius: 16px;
    cursor: pointer;
    transition: background .15s;
}

#ewt-chat-panel.ewt-chat-collapsed .ewt-chat-header:hover {
    background: #1d3461;
}

/* Unread badge on bubble ──────────────────────────────────────────────────── */
.ewt-unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    background: #ef4444;
    color: #fff;
    border-radius: 10px;
    font-size: .63rem;
    font-weight: 800;
    font-family: 'Sora', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2.5px solid #fff;
    line-height: 1;
    pointer-events: none;
    animation: ewt-badge-pop .2s cubic-bezier(.34,1.56,.64,1);
}

@keyframes ewt-badge-pop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

/* Mobile — full screen ────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    #ewt-chat-panel {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        left: 0;
        bottom: 0;
        border-radius: 0;
    }

    /* Hide bubble when panel is open — it would sit over the keyboard */
    #ewt-chat-bubble.ewt-bubble-hidden {
        transform: scale(0);
        opacity: 0;
        pointer-events: none;
        transition: transform .18s ease, opacity .18s ease;
    }

    /* Make the close button more prominent on full-screen mobile */
    .ewt-chat-close {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .ewt-chat-close svg {
        width: 18px;
        height: 18px;
    }

    .ewt-chat-strip-left {
        gap: .35rem;
    }

    .ewt-lead-shortcut {
        padding: .24rem .52rem;
        font-size: .66rem;
    }

    /* No minimize button on mobile — panel is full screen */
    .ewt-chat-minimize {
        display: none;
    }

    /* Hide scroll-to-top button while chat is open full screen */
    #ewt-back-top.ewt-btt-panel-open {
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateY(10px) !important;
    }
}
