/* ══════════════════════════════════════════════════════════════
   HUMAN TAKEOVER — chat-additions.css v2.0
   ══════════════════════════════════════════════════════════════ */

/* ── Human Prompt Card (inline dans le chat) ─────────────────── */
.sb-human-card {
    align-self: flex-start;
    max-width: 88%;
    background: #fff;
    border: 1.5px solid rgba(108, 71, 255, 0.18);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    padding: 14px 16px 12px;
    box-shadow: 0 6px 24px rgba(108, 71, 255, 0.12);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: msgIn 0.35s cubic-bezier(.34, 1.56, .64, 1);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.sb-human-card.sb-hc-dismissed {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
    pointer-events: none;
}

.sb-hc-icon {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.sb-hc-body {
    flex: 1;
    min-width: 0;
}

.sb-hc-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 3px;
    font-family: 'Syne', sans-serif;
    line-height: 1.3;
}

.sb-hc-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 11px;
    line-height: 1.4;
    font-family: 'DM Sans', sans-serif;
}

.sb-hc-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Bouton WhatsApp */
.sb-hc-btn {
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sb-hc-wa {
    background: #dcfce7;
    color: #16a34a;
    border: 1.5px solid #bbf7d0;
}
.sb-hc-wa:hover {
    background: #bbf7d0;
    transform: translateY(-1px);
}

.sb-hc-live {
    background: var(--surface-3);
    color: var(--accent);
    border: 1.5px solid var(--border);
}
.sb-hc-live:hover {
    background: #ddd6fe;
    border-color: var(--accent);
    transform: translateY(-1px);
}

.sb-hc-dismiss {
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid #e5e7eb;
    font-weight: 400;
}
.sb-hc-dismiss:hover {
    background: #f3f4f6;
    color: var(--text);
}

/* ── Agent Message Bubble ─────────────────────────────────────── */
.storebrain-message.agent {
    align-self: flex-start;
    max-width: 82%;
}

.sb-agent-label {
    font-size: 10px;
    font-weight: 700;
    color: #16a34a;
    margin-bottom: 4px;
    padding: 0 4px;
    letter-spacing: 0.04em;
    font-family: 'DM Sans', sans-serif;
    text-transform: uppercase;
}

.sb-bubble-agent {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1.5px solid #bbf7d0;
    border-bottom-left-radius: 4px !important;
}

/* ── System Message ───────────────────────────────────────────── */
.sb-system-msg {
    align-self: center;
    text-align: center;
    font-size: 11.5px;
    color: var(--text-muted);
    background: rgba(108, 71, 255, 0.06);
    border-radius: 20px;
    padding: 5px 14px;
    margin: 2px 0;
    font-family: 'DM Sans', sans-serif;
    max-width: 90%;
    animation: msgIn 0.25s ease;
}

/* ── Header Status Colors ─────────────────────────────────────── */
/* Pending agent → orange dot */
#storebrain-widget-header.status-pending .sb-status-dot {
    background: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
    animation: pulse-dot 1s ease-in-out infinite;
}

/* With agent → brighter green */
#storebrain-widget-header.status-agent .sb-status-dot {
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
}

/* Closed → gray */
#storebrain-widget-header.status-closed .sb-status-dot {
    background: #9ca3af;
    box-shadow: none;
    animation: none;
}

/* ── Proactive sub-text (multilingual) ───────────────────────── */
.sb-proactive-sub { display: none; }  /* masqué en v2, le texte principal suffit */

/* ── Mobile tweaks ────────────────────────────────────────────── */
@media (max-width: 480px) {
    .sb-human-card { max-width: 95%; }
    .sb-hc-btns    { flex-direction: column; }
    .sb-hc-btn     { width: 100%; text-align: center; }
}