/* ── cc-chatbox.css — NXi Chatbot Modal Styles ─────────────────────────────
   All styles for the chatbot modal and chat UI.
   Loaded via <link> in index.html; replaces the injected CSS in cc-chatbot.js.
──────────────────────────────────────────────────────────────────────────── */

/* ── Modal overlay & container ── */
#cb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 40, .65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity .2s;
}
#cb-overlay.visible { opacity: 1; }

#cb-modal {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .28);
    width: min(540px, 92vw);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Modal header ── */
#cb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .875rem 1.25rem;
    background: var(--navy);
    color: var(--white);
    flex-shrink: 0;
}
#cb-title { font-weight: 700; font-size: .95rem; letter-spacing: .02em; }

.cb-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, .7);
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
}
.cb-close-btn:hover { color: var(--white); }

/* ── Modal body & footer ── */
#cb-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
    font-size: .85rem;
    color: var(--navy);
    line-height: 1.6;
}
#cb-footer {
    display: flex;
    justify-content: flex-end;
    gap: .625rem;
    padding: .875rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--slate-light);
    flex-shrink: 0;
}

/* ── Chat UI ── */
#cb-chat-wrap { display: flex; flex-direction: column; height: 420px; }

#cb-chat-msgs {
    flex: 1;
    overflow-y: auto;
    padding: .75rem;
    display: flex;
    flex-direction: column;
    gap: .625rem;
    background: var(--slate-light);
    border-radius: 8px;
    margin-bottom: .75rem;
}

.cb-msg {
    max-width: 82%;
    padding: .55rem .85rem;
    border-radius: 10px;
    font-size: .82rem;
    line-height: 1.55;
    word-wrap: break-word;
}
.cb-msg.bot {
    background: var(--white);
    color: var(--navy);
    border: 1px solid var(--border);
    border-top-left-radius: 3px;
    align-self: flex-start;
}
.cb-msg.user {
    background: var(--navy);
    color: var(--white);
    border-top-right-radius: 3px;
    align-self: flex-end;
}
.cb-msg.typing { color: var(--slate); font-style: italic; }

/* ── Input row ── */
#cb-input-row { display: flex; gap: .5rem; flex-shrink: 0; }

#cb-input {
    flex: 1;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: .55rem .85rem;
    font-family: var(--font-body);
    font-size: .83rem;
    color: var(--navy);
    background: var(--slate-light);
    outline: none;
    transition: border-color .2s;
}
#cb-input:focus { border-color: var(--gold); background: var(--white); }

#cb-send {
    background: var(--navy);
    color: var(--gold);
    border: none;
    border-radius: 8px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s;
}
#cb-send:hover { background: var(--navy-mid); }
#cb-send:disabled { opacity: .4; cursor: default; }

/* ── Disclaimer ── */
.cb-disclaimer {
    font-size: .7rem;
    color: var(--slate);
    margin-top: .5rem;
    text-align: center;
    line-height: 1.4;
}

/* ── Practice area selector ── */
#cb-practice-row { margin-bottom: .625rem; flex-shrink: 0; }

#cb-practice-select {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: .45rem .75rem;
    font-family: var(--font-body);
    font-size: .82rem;
    color: var(--navy);
    background: var(--slate-light);
    outline: none;
    cursor: pointer;
    transition: border-color .2s;
}
#cb-practice-select:focus { border-color: var(--gold); background: var(--white); }
