/* "Ask envelai" assistant */
.eva { position: fixed; right: 18px; bottom: 18px; z-index: 1060; font-family: inherit; }
.eva-fab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 18px 12px 14px; border: 0; border-radius: 999px;
    background: linear-gradient(100deg, #1656d9, #6d4bff); color: #fff; font-weight: 700; font-size: 15px;
    box-shadow: 0 14px 30px -10px rgba(76, 70, 230, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
    cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.eva-fab i { font-size: 18px; }
.eva-fab:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -10px rgba(76, 70, 230, .8); }
.eva-fab:focus-visible { outline: 3px solid rgba(22, 86, 217, .4); outline-offset: 3px; }
.eva.is-open .eva-fab { display: none; }
.eva-panel {
    width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 110px));
    display: flex; flex-direction: column;
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, .9); border-radius: 22px;
    box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .45), inset 0 1px 0 #fff;
    overflow: hidden; color: #0f172a;
    animation: eva-in .35s cubic-bezier(.16, 1, .3, 1);
}
.eva-panel[hidden] { display: none; }
@keyframes eva-in { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.eva-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; background: linear-gradient(100deg, #1656d9, #6d4bff); color: #fff; }
.eva-avatar { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); font-size: 18px; }
.eva-head-text { flex: 1; display: grid; line-height: 1.2; }
.eva-head-text small { opacity: .85; font-size: 12px; }
.eva-close { border: 0; background: rgba(255, 255, 255, .18); color: #fff; width: 32px; height: 32px; border-radius: 10px; }
.eva-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.eva-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-line; word-wrap: break-word; }
.eva-msg.bot { align-self: flex-start; background: #fff; border: 1px solid #e8edf6; border-top-left-radius: 4px; }
.eva-msg.user { align-self: flex-end; background: #1656d9; color: #fff; border-top-right-radius: 4px; }
.eva-typing { display: inline-flex; gap: 4px; }
.eva-typing i { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; animation: eva-dot 1s infinite; }
.eva-typing i:nth-child(2) { animation-delay: .15s; } .eva-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes eva-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.eva-jobs { display: grid; gap: 6px; align-self: stretch; }
.eva-job { display: block; padding: 9px 11px; border-radius: 12px; background: #fff; border: 1px solid #e3eaf7; color: #0f172a; text-decoration: none; font-size: 13px; }
.eva-job:hover { border-color: #b9ccf8; color: #0f172a; }
.eva-job b { display: block; font-size: 14px; }
.eva-job .s { color: #16a34a; font-weight: 700; }
.eva-job .m { float: right; font-size: 11.5px; font-weight: 800; color: #1656d9; background: #eaf2ff; border-radius: 8px; padding: 1px 6px; }
.eva-links { display: flex; flex-wrap: wrap; gap: 6px; }
.eva-links a { font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: #eef3ff; color: #1656d9; text-decoration: none; }
.eva-chips { display: flex; gap: 6px; padding: 0 14px 8px; overflow-x: auto; }
.eva-chips button { flex: 0 0 auto; border: 1px solid #dfe6f3; background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; color: #334155; }
.eva-chips button:hover { border-color: #1656d9; color: #1656d9; }
.eva-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #e8edf6; background: rgba(255, 255, 255, .7); }
.eva-form input { flex: 1; min-width: 0; border: 1px solid #dfe6f3; border-radius: 12px; padding: 9px 12px; font-size: 14.5px; outline: 0; }
.eva-form input:focus { border-color: #1656d9; box-shadow: 0 0 0 3px rgba(22, 86, 217, .12); }
.eva-form button { width: 42px; border: 0; border-radius: 12px; background: #1656d9; color: #fff; }
.eva-form button:disabled { opacity: .6; }
.eva-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 6px 14px 10px; font-size: 11px; color: #64748b; }
.eva-foot span { flex: 1 1 100%; }
.eva-foot a { color: #1656d9; text-decoration: none; font-weight: 600; }
@media (max-width: 991.98px) {
    .eva { right: 12px; bottom: 82px; }  /* above the mobile bottom bar */
    .eva-fab-text { display: none; }
    .eva-fab { padding: 14px; }
    .eva.is-open { left: 12px; right: 12px; bottom: 76px; }
    .eva-panel { width: 100%; height: min(560px, calc(100vh - 150px)); }
}
@media (prefers-reduced-motion: reduce) { .eva-panel { animation: none; } .eva-typing i { animation: none; } }
/* keep the "back to top" button clear of the assistant button */
@media (max-width: 991.98px) { .scroll-top-btn { bottom: 144px !important; right: 16px !important; } }
@media (min-width: 992px) { .scroll-top-btn { bottom: 82px !important; } }
