/* ===================================================
   NexaXpeed AI Chatbot — Compact Professional CSS
   Colors: Navy (#003049 / #0c437e) + Orange (#f77f00)
   Font:   Plus Jakarta Sans (matches style.css)
   Box:    300px wide, 440px max-height (compact)
   =================================================== */

/* ---- Toggle Button ---- */
#nexa-chat-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #0c437e, #003049);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 48, 73, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    z-index: 9999;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    animation: nexa-pulse 2.5s ease-out infinite;
}

#nexa-chat-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 22px rgba(247, 127, 0, 0.5);
    background: linear-gradient(135deg, #f77f00, #ff9e4a);
}

@keyframes nexa-pulse {
    0%   { box-shadow: 0 0 0 0    rgba(247, 127, 0, 0.5); }
    70%  { box-shadow: 0 0 0 12px rgba(247, 127, 0, 0);   }
    100% { box-shadow: 0 0 0 0    rgba(247, 127, 0, 0);   }
}

/* ---- Chat Box — COMPACT ---- */
#nexa-chat-box {
    position: fixed;
    bottom: 86px;
    right: 24px;
    width: 300px;
    max-height: 440px;
    background: #f8fafc;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 48, 73, 0.16);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    border: 1px solid #e2eaf2;
    animation: nexa-slideUp 0.22s ease;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

@keyframes nexa-slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Header ---- */
#nexa-chat-header {
    background: linear-gradient(135deg, #003049, #0c437e);
    padding: 11px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.nexa-header-info {
    display: flex;
    align-items: center;
    gap: 9px;
}

.nexa-avatar {
    width: 34px;
    height: 34px;
    background: rgba(247, 127, 0, 0.2);
    border: 1.5px solid rgba(247, 127, 0, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nexa-header-text h4 {
    margin: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 0.1px;
    line-height: 1.3;
}

.nexa-status {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.72);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.nexa-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #27ae60;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

#nexa-close-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s;
    flex-shrink: 0;
    line-height: 1;
}

#nexa-close-btn:hover {
    background: rgba(247, 127, 0, 0.3);
    border-color: rgba(247, 127, 0, 0.45);
}

/* ---- Messages Area ---- */
#nexa-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 12px 11px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f1f5f9;
    min-height: 0;
}

#nexa-msgs::-webkit-scrollbar       { width: 3px; }
#nexa-msgs::-webkit-scrollbar-thumb { background: #c5d4e0; border-radius: 3px; }
#nexa-msgs::-webkit-scrollbar-track { background: transparent; }

/* ---- Message Bubbles ---- */
.nexa-msg {
    max-width: 84%;
    padding: 8px 11px;
    border-radius: 13px;
    font-size: 12.5px;
    line-height: 1.5;
    word-wrap: break-word;
    animation: nexa-fadeIn 0.2s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

@keyframes nexa-fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nexa-msg.bot {
    background: #ffffff;
    color: #1e2d3d;
    border-bottom-left-radius: 3px;
    align-self: flex-start;
    border: 1px solid #e2eaf2;
    box-shadow: 0 1px 4px rgba(0, 48, 73, 0.05);
}

.nexa-msg.user {
    background: linear-gradient(135deg, #003049, #0c437e);
    color: #ffffff;
    border-bottom-right-radius: 3px;
    align-self: flex-end;
    box-shadow: 0 2px 8px rgba(0, 48, 73, 0.2);
}

.nexa-msg.typing {
    background: #ffffff;
    color: #7a95a8;
    align-self: flex-start;
    font-style: italic;
    font-size: 12px;
    border: 1px solid #e2eaf2;
    border-bottom-left-radius: 3px;
}

.nexa-msg-time {
    font-size: 9.5px;
    opacity: 0.4;
    margin-top: 4px;
    text-align: right;
}

/* ---- Quick Reply Buttons ---- */
#nexa-quick-replies {
    padding: 6px 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    background: #f8fafc;
    border-top: 1px solid #e2eaf2;
    flex-shrink: 0;
}

.nexa-quick-btn {
    background: rgba(0, 48, 73, 0.06);
    color: #003049;
    border: 1px solid rgba(0, 48, 73, 0.16);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.nexa-quick-btn:hover {
    background: #f77f00;
    color: #ffffff;
    border-color: #f77f00;
    transform: translateY(-1px);
}

/* ---- Input Area ---- */
#nexa-input-area {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 11px;
    background: #ffffff;
    border-top: 1px solid #e2eaf2;
    flex-shrink: 0;
}

#nexa-input {
    flex: 1;
    background: #f1f5f9;
    border: 1px solid #e2eaf2;
    border-radius: 50px;
    padding: 8px 13px;
    color: #1e2d3d;
    font-size: 12.5px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
    transition: border 0.18s, box-shadow 0.18s;
}

#nexa-input::placeholder { color: #7a95a8; }

#nexa-input:focus {
    border-color: #0c437e;
    box-shadow: 0 0 0 2.5px rgba(12, 67, 126, 0.1);
    background: #fff;
}

/* Send button — orange accent */
#nexa-send-btn {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #f77f00, #ff9e4a);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: transform 0.18s, opacity 0.18s;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(247, 127, 0, 0.3);
}

#nexa-send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(247, 127, 0, 0.45);
}

#nexa-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ---- Mobile Responsive ---- */
@media (max-width: 420px) {
    #nexa-chat-box {
        width: calc(100vw - 18px);
        right: 9px;
        bottom: 80px;
        max-height: 400px;
        border-radius: 12px;
    }
    #nexa-chat-btn {
        right: 14px;
        bottom: 18px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    .nexa-quick-btn {
        font-size: 10.5px;
        padding: 3px 8px;
    }
}