/* Mortgage & Protection Chatbot — front-end styles */
#mpchat-root,#mpchat-root *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;}

.mpchat-launcher{
    position:fixed;right:22px;bottom:22px;z-index:999990;
    width:60px;height:60px;border-radius:50%;
    background:var(--mpchat-brand,#0a7d3e);color:#fff;border:none;cursor:pointer;
    box-shadow:0 10px 30px rgba(0,0,0,.18);
    display:flex;align-items:center;justify-content:center;
    transition:transform .15s ease;
}
.mpchat-launcher:hover{transform:scale(1.06);}
.mpchat-launcher svg{width:28px;height:28px;fill:#fff;}
.mpchat-launcher .mpchat-dot{
    position:absolute;top:6px;right:6px;width:12px;height:12px;
    background:#ff3b30;border-radius:50%;border:2px solid #fff;
}

.mpchat-window{
    position:fixed;right:22px;bottom:92px;z-index:999991;
    width:370px;max-width:calc(100vw - 30px);
    height:560px;max-height:calc(100vh - 120px);
    background:#fff;border-radius:16px;overflow:hidden;
    box-shadow:0 20px 60px rgba(0,0,0,.25);
    display:flex;flex-direction:column;
    animation:mpchat-in .22s ease;
}
@keyframes mpchat-in{from{opacity:0;transform:translateY(12px);}to{opacity:1;transform:translateY(0);}}

.mpchat-header{
    background:var(--mpchat-brand,#0a7d3e);color:#fff;
    padding:14px 16px;display:flex;align-items:center;justify-content:space-between;
}
.mpchat-header-title{font-weight:600;font-size:15px;line-height:1.1;}
.mpchat-header-sub{font-size:12px;opacity:.85;margin-top:2px;}
.mpchat-header-actions{display:flex;gap:6px;}
.mpchat-header-btn{
    background:rgba(255,255,255,.15);color:#fff;border:none;cursor:pointer;
    width:30px;height:30px;border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    font-size:14px;
}
.mpchat-header-btn:hover{background:rgba(255,255,255,.28);}

.mpchat-body{
    flex:1;overflow-y:auto;padding:14px;
    background:#f6f8fa;
}
.mpchat-body::-webkit-scrollbar{width:6px;}
.mpchat-body::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:3px;}

.mpchat-msg{
    max-width:82%;padding:10px 13px;border-radius:14px;
    margin-bottom:8px;font-size:14px;line-height:1.45;
    animation:mpchat-msg .18s ease;white-space:pre-wrap;
}
@keyframes mpchat-msg{from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:translateY(0);}}

.mpchat-msg.bot{
    background:#fff;color:#1f2937;border:1px solid #e5e7eb;
    border-top-left-radius:4px;
}
.mpchat-msg.user{
    background:var(--mpchat-brand,#0a7d3e);color:#fff;
    margin-left:auto;border-top-right-radius:4px;
}

.mpchat-msg.system{
    background:#fff7e6;border:1px solid #fde68a;color:#78350f;
    font-size:12px;margin-left:auto;margin-right:auto;max-width:92%;
    text-align:center;white-space:pre-wrap;
}

.mpchat-typing{display:inline-flex;gap:3px;}
.mpchat-typing span{
    width:6px;height:6px;border-radius:50%;background:#9ca3af;
    animation:mpchat-bounce 1.1s infinite ease-in-out;
}
.mpchat-typing span:nth-child(2){animation-delay:.15s;}
.mpchat-typing span:nth-child(3){animation-delay:.3s;}
@keyframes mpchat-bounce{0%,80%,100%{transform:translateY(0);}40%{transform:translateY(-5px);}}

.mpchat-options{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 12px 0;}
.mpchat-opt{
    background:#fff;border:1px solid var(--mpchat-brand,#0a7d3e);
    color:var(--mpchat-brand,#0a7d3e);
    padding:7px 12px;border-radius:20px;font-size:13px;cursor:pointer;
    transition:background .15s,color .15s;
}
.mpchat-opt:hover{background:var(--mpchat-brand,#0a7d3e);color:#fff;}
.mpchat-opt.primary{background:var(--mpchat-brand,#0a7d3e);color:#fff;}
.mpchat-opt.primary:hover{opacity:.9;}

.mpchat-input-wrap{
    border-top:1px solid #e5e7eb;background:#fff;padding:10px;
    display:flex;gap:6px;align-items:center;
}
.mpchat-input{
    flex:1;border:1px solid #d1d5db;border-radius:20px;
    padding:9px 14px;font-size:14px;outline:none;
}
.mpchat-input:focus{border-color:var(--mpchat-brand,#0a7d3e);}
.mpchat-send{
    background:var(--mpchat-brand,#0a7d3e);color:#fff;border:none;
    width:38px;height:38px;border-radius:50%;cursor:pointer;
    display:flex;align-items:center;justify-content:center;
}
.mpchat-send svg{width:18px;height:18px;fill:#fff;}

.mpchat-footer-bar{
    padding:6px 10px;background:#fff;border-top:1px solid #e5e7eb;
    display:flex;justify-content:space-between;align-items:center;
    font-size:11px;color:#6b7280;
}
.mpchat-handoff-btn{
    background:transparent;color:var(--mpchat-brand,#0a7d3e);
    border:none;cursor:pointer;font-size:11px;font-weight:600;
    padding:3px 6px;
}
.mpchat-handoff-btn:hover{text-decoration:underline;}

.mpchat-estimate{
    background:linear-gradient(135deg,rgba(10,125,62,.08),rgba(10,125,62,.02));
    border:1px solid rgba(10,125,62,.2);border-radius:10px;
    padding:12px;margin-bottom:8px;
}
.mpchat-estimate-label{font-size:11px;text-transform:uppercase;color:#6b7280;letter-spacing:.5px;}
.mpchat-estimate-value{font-size:20px;font-weight:700;color:var(--mpchat-brand,#0a7d3e);margin-top:2px;}
.mpchat-estimate-note{font-size:11px;color:#6b7280;margin-top:4px;}

.mpchat-cover-list{margin:6px 0 10px 0;padding:10px;background:#fff;border-radius:10px;border:1px solid #e5e7eb;}
.mpchat-cover-list div{padding:4px 0;font-size:13px;}

.mpchat-hidden{display:none !important;}

/* Pre-chat login form */
.mpchat-prechat-form{
    background:#fff;border:1px solid #e5e7eb;border-radius:12px;
    padding:14px;margin:6px 0 12px 0;
    animation:mpchat-msg .2s ease;
}
.mpchat-prechat-fields{display:flex;flex-direction:column;gap:8px;margin-bottom:10px;}
.mpchat-prechat-fields input{
    width:100%;padding:9px 12px;font-size:14px;
    border:1px solid #d1d5db;border-radius:8px;outline:none;
    font-family:inherit;
}
.mpchat-prechat-fields input:focus{
    border-color:var(--mpchat-brand,#0a7d3e);
    box-shadow:0 0 0 3px rgba(10,125,62,.15);
}
.mpchat-prechat-submit{
    width:100%;background:var(--mpchat-brand,#0a7d3e);color:#fff;
    border:none;border-radius:8px;padding:10px 14px;
    font-size:14px;font-weight:600;cursor:pointer;font-family:inherit;
    transition:opacity .15s;
}
.mpchat-prechat-submit:hover{opacity:.9;}
.mpchat-prechat-error{
    color:#b91c1c;font-size:12px;margin-top:8px;
    padding:6px 10px;background:#fef2f2;border:1px solid #fecaca;border-radius:6px;
}

@media (max-width:480px){
    .mpchat-window{right:10px;bottom:80px;width:calc(100vw - 20px);height:calc(100vh - 100px);}
    .mpchat-launcher{right:14px;bottom:14px;}
}
