/* stenchatbot.css - Floating chat widget */

#stenchatbot-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1a1a2e;
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
    transition: transform .2s, box-shadow .2s;
}
#stenchatbot-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(0,0,0,.45);
}

#stenchatbot-panel {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 420px;
    height: 560px;
    background: #1a1a2e;
    color: #e8e8e8;
    border-radius: 12px;
    display: none;
    flex-direction: column;
    z-index: 10002;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    font-family: inherit;
    overflow: hidden;
}
#stenchatbot-panel.open { display: flex; }

/* Header */
.scb-header {
    padding: 14px 18px;
    background: #161628;
    border-bottom: 1px solid #2a2a4a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.scb-header-title {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.scb-header-actions {
    display: flex;
    gap: 8px;
}
.scb-header-actions button {
    background: none;
    border: none;
    color: #707090;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.scb-header-actions button:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
}

/* Messages */
.scb-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.scb-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
}
.scb-msg-user {
    align-self: flex-end;
    background: #3a3a5a;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.scb-msg-assistant {
    align-self: flex-start;
    background: #22223a;
    color: #e8e8e8;
    border-bottom-left-radius: 4px;
}
.scb-msg-tool {
    align-self: flex-start;
    background: #1a2a1a;
    color: #8fbc8f;
    font-size: 11px;
    font-family: monospace;
    max-height: 120px;
    overflow-y: auto;
    border-bottom-left-radius: 4px;
}
.scb-msg-system {
    align-self: center;
    background: transparent;
    color: #707090;
    font-size: 11px;
    text-align: center;
}

/* Typing indicator */
.scb-typing {
    display: none;
    align-self: flex-start;
    padding: 10px 14px;
    background: #22223a;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
}
.scb-typing.active { display: block; }
.scb-typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #707090;
    border-radius: 50%;
    margin: 0 2px;
    animation: scb-bounce 1.2s infinite;
}
.scb-typing span:nth-child(2) { animation-delay: 0.2s; }
.scb-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes scb-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* Input */
.scb-input-area {
    padding: 12px 16px;
    border-top: 1px solid #2a2a4a;
    background: #161628;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.scb-input-area input {
    flex: 1;
    background: #1a1a2e;
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    padding: 10px 14px;
    color: #e8e8e8;
    font-size: 13px;
    outline: none;
    transition: border-color .15s;
}
.scb-input-area input:focus {
    border-color: #5a5a8a;
}
.scb-input-area input::placeholder {
    color: #707090;
}
.scb-send-btn {
    background: #3a3a5a;
    border: none;
    border-radius: 8px;
    color: #fff;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    transition: background .15s;
}
.scb-send-btn:hover {
    background: #4a4a6a;
}
.scb-send-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* Scrollbar */
.scb-messages::-webkit-scrollbar { width: 6px; }
.scb-messages::-webkit-scrollbar-track { background: transparent; }
.scb-messages::-webkit-scrollbar-thumb { background: #3a3a5a; border-radius: 3px; }

/* Welcome */
.scb-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #707090;
    text-align: center;
    padding: 20px;
}
.scb-welcome-icon { font-size: 36px; margin-bottom: 12px; opacity: .6; }
.scb-welcome-text { font-size: 13px; line-height: 1.5; }
