#cbrc-chat-fab {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0047AB;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cbrc-chat-fab.hidden { display: none; }

#cbrc-chat-panel {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    width: 360px;
    max-width: calc(100vw - 2rem);
    height: 520px;
    max-height: calc(100vh - 2rem);
    background: white;
    border-radius: .75rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#cbrc-chat-panel.hidden { display: none; }

.cbrc-chat-header {
    background: #0047AB;
    color: white;
    padding: .75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cbrc-chat-header button {
    background: transparent;
    border: 0;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

#cbrc-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: .75rem;
    background: #f8f9fa;
}

.cbrc-msg {
    display: flex;
    margin-bottom: .5rem;
}

.cbrc-msg .bubble {
    padding: .55rem .75rem;
    border-radius: .65rem;
    max-width: 85%;
    font-size: .9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.cbrc-msg-user {
    justify-content: flex-end;
}

.cbrc-msg-user .bubble {
    background: #0047AB;
    color: white;
}

.cbrc-msg-assistant .bubble {
    background: white;
    border: 1px solid #e5e7eb;
    color: #1f2937;
}

#cbrc-chat-form {
    display: flex;
    border-top: 1px solid #e5e7eb;
    padding: .5rem;
    gap: .35rem;
    background: white;
}

#cbrc-chat-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: .35rem;
    padding: .45rem .65rem;
    font-size: .9rem;
}

#cbrc-chat-input:focus {
    outline: 2px solid #0047AB33;
    border-color: #0047AB;
}

#cbrc-chat-form button {
    background: #0047AB;
    color: white;
    border: none;
    border-radius: .35rem;
    padding: 0 .9rem;
    cursor: pointer;
}
