/* ============================================================
   Great Solomon Manpower Services Inc. — Floating AI Chat Widget (aligned with CRM theme)
   ============================================================ */
.chat-widget-btn {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 90;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.45);
    transition: all 0.2s ease;
}
.chat-widget-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.55);
}
.chat-widget {
    position: fixed;
    bottom: 92px;
    right: 22px;
    z-index: 95;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 520px;
    max-height: 70vh;
    transform: translateY(20px) scale(0.97);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    border: 1px solid #e2e8f0;
}
.chat-widget.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}
.chat-head {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-head .avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.chat-head .ch-name { font-size: 0.9rem; font-weight: 700; }
.chat-head .ch-status { font-size: 0.72rem; opacity: 0.85; display: flex; align-items: center; gap: 5px; }
.chat-head .ch-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; display: inline-block; }
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    background: #f8fafc;
}
.msg-bubble {
    max-width: 80%;
    padding: 0.65rem 0.9rem;
    border-radius: 14px;
    font-size: 0.83rem;
    line-height: 1.45;
}
.msg-bubble.ai {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}
.msg-bubble.user {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}
.chat-input-bar {
    display: flex;
    gap: 8px;
    padding: 0.85rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}
.chat-input-bar input {
    flex: 1;
    padding: 0.6rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    font-size: 0.83rem;
    font-family: inherit;
}
.chat-input-bar input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

/* Gemini AI typing indicator */
.typing-dots span {
    display: inline-block;
    animation: typingBlink 1.2s infinite;
    margin-right: 3px;
    font-weight: 700;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBlink {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}
.chat-suggestions { display:flex; flex-wrap:wrap; gap:.45rem; align-self:flex-start; max-width:94%; }
.chat-suggestions button { border:1px solid #dcd8ea; background:#fff; color:#4f46e5; border-radius:999px; padding:.48rem .7rem; font:inherit; font-size:.7rem; font-weight:700; cursor:pointer; transition:background .15s,border-color .15s; }
.chat-suggestions button:hover { background:#eeedff; border-color:#c8c3e4; }
.chat-input-bar button:disabled,.chat-input-bar input:disabled { opacity:.65; cursor:not-allowed; }
.chat-input-bar button { border:0; border-radius:10px; padding:.62rem .9rem; background:#4f46e5; color:#fff; font:inherit; font-size:.78rem; font-weight:800; cursor:pointer; }

/* Premium AI assistant surface for the public landing page and CRM. */
.chat-widget-btn { width:60px; height:60px; background:#4f46e5; border:3px solid #fff; box-shadow:0 14px 30px rgba(79,70,229,.32); }
.chat-widget { border:1px solid #e5e2f0; border-radius:22px; box-shadow:0 26px 60px rgba(27,21,60,.2); }.chat-head { background:linear-gradient(135deg,#312e81,#4f46e5); padding:1.1rem 1.2rem; }.chat-body { background:#fbfaff; padding:1.15rem; }.msg-bubble { border-radius:15px; }.msg-bubble.ai { border-color:#e7e3f0; box-shadow:0 1px 2px rgba(25,20,50,.04); }.msg-bubble.user { background:#4f46e5; }.chat-input-bar { border-top-color:#e7e3f0; padding:1rem; }.chat-input-bar input { border-color:#ddd8e8; border-radius:12px; }.chat-input-bar input:focus { border-color:#4f46e5; box-shadow:0 0 0 4px rgba(79,70,229,.1); }


/* BLUE HELP CHAT REDESIGN V1 */
.chat-widget-btn{right:24px;bottom:94px;width:56px;height:56px;background:linear-gradient(135deg,#083d94,#1672e8);border:2px solid #fff;box-shadow:0 16px 35px rgba(8,61,148,.3)}
.chat-widget-btn:hover{box-shadow:0 20px 42px rgba(8,61,148,.4)}
.chat-widget{right:24px;bottom:162px;width:400px;height:560px;max-height:calc(100vh - 190px);border:1px solid #c9dcf3;border-radius:24px;box-shadow:0 32px 80px rgba(5,35,78,.25)}
.chat-head{min-height:72px;padding:1rem 1.15rem;background:radial-gradient(circle at 88% 0,rgba(87,174,255,.48),transparent 34%),linear-gradient(135deg,#072b68,#1268dc)}
.chat-head .avatar{width:42px;height:42px;border-radius:13px;background:rgba(255,255,255,.16);box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.chat-head .ch-name{font-size:.93rem}.chat-head .ch-status{color:#dcecff}.chat-head .ch-status .dot{background:#65b5ff;box-shadow:0 0 0 4px rgba(101,181,255,.16)}
.chat-body{padding:1.2rem;background:linear-gradient(180deg,#f7fbff,#edf5ff);gap:.8rem;scrollbar-width:thin;scrollbar-color:#aac8ec transparent}
.msg-bubble{max-width:84%;padding:.75rem .95rem;border-radius:16px;line-height:1.55}.msg-bubble.ai{color:#234668;border-color:#cfe0f3;background:#fff;border-bottom-left-radius:5px;box-shadow:0 5px 16px rgba(15,62,119,.06)}.msg-bubble.user{background:linear-gradient(135deg,#0e58cb,#237ff0);border-bottom-right-radius:5px;box-shadow:0 6px 18px rgba(14,88,203,.2)}
.chat-suggestions{gap:.5rem;max-width:100%}.chat-suggestions button{padding:.55rem .72rem;color:#0e58c7;border-color:#bcd5f1;background:#fafdff}.chat-suggestions button:hover{color:#fff;background:#1764e8;border-color:#1764e8}
.chat-input-bar{padding:1rem;border-color:#cfe0f3;background:#fff}.chat-input-bar input{min-height:44px;padding:.7rem .9rem;border-color:#c8daef;border-radius:13px;color:#173654;background:#fafdff}.chat-input-bar input:focus{border-color:#1764e8;box-shadow:0 0 0 4px rgba(23,100,232,.11);background:#fff}.chat-input-bar button{min-width:68px;border-radius:12px;background:linear-gradient(135deg,#0e58cb,#237ff0);box-shadow:0 7px 16px rgba(14,88,203,.2)}
@media(max-width:600px){.chat-widget-btn{right:16px;bottom:88px}.chat-widget{right:9px;bottom:154px;width:calc(100vw - 18px);height:min(610px,calc(100dvh - 170px));max-height:none;border-radius:22px}.chat-head{min-height:68px}.chat-body{padding:1rem}.chat-input-bar{padding:.85rem}}

/* CHAT PERFORMANCE PASS V1 */
.chat-widget,.chat-widget-btn{will-change:auto!important}.chat-widget{box-shadow:0 18px 48px rgba(5,35,78,.2)!important}.chat-widget-btn{box-shadow:0 9px 22px rgba(8,61,148,.24)!important}.msg-bubble.ai,.msg-bubble.user{box-shadow:none!important}.chat-widget *{transition-duration:.12s!important}@media(prefers-reduced-motion:reduce){.chat-widget *,.chat-widget-btn{animation:none!important;transition:none!important}}
