/* ai-sales-assistant frontend.css - minimal, mobile-first */

.ai-sales-chat {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    --ai-sa-bg: #ffffff;
    --ai-sa-text: #222;
    --ai-sa-radius: 14px;
    max-width: 400px;
    box-sizing: border-box;
}

.ai-sa-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(13, 13, 13, 0.12);
    cursor: pointer;
    position: relative;
    border: none;
}

.ai-sa-toggle .ai-sa-tooltip {
    display: none;
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
}

.ai-sa-toggle:hover .ai-sa-tooltip { display: block; }

/* Panel */
.ai-sa-panel {
    width: 100%;
    max-width: 400px;
    background: var(--ai-sa-bg);
    color: var(--ai-sa-text);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

/* Header */
.ai-sa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

.ai-sa-header h3 { margin: 0; font-size: 15px; }

/* Body */
.ai-sa-body {
    padding: 10px;
    min-height: 120px;
    max-height: 320px;
    overflow-y: auto;
    background: #fafafa;
}

/* Messages */
.ai-sa-messages { display: flex; flex-direction: column; gap: 8px; }

.ai-sa-message {
    padding: 8px 10px;
    border-radius: 8px;
    max-width: 100%;
    box-sizing: border-box;
}

.ai-sa-message.user {
    align-self: flex-end;
    background: #e6f0ff;
}

.ai-sa-message.assistant {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #eee;
}

/* Input */
.ai-sa-input {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #eee;
    background: #fff;
    align-items: center;
}

.ai-sa-user-input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.ai-sa-send {
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: var(--ai-sa-primary, #0073aa);
    color: #fff;
    cursor: pointer;
}

/* Controls */
.ai-sa-controls button {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

/* Footer */
.ai-sa-footer {
    padding: 6px 10px;
    font-size: 12px;
    color: #666;
    border-top: 1px solid #f2f2f2;
}

/* Responsive: small screens */
@media (max-width: 480px) {
    .ai-sa-panel {
        width: calc(100vw - 30px);
        max-width: none;
        border-radius: 10px;
    }
}

.ai-sales-chat .ai-sa-panel .ai-sa-message.assistant ul {
    margin: 0;
    padding-left: 18px;
}