/* Business persona — friendlier, larger, less technical-looking. */

.b3chat.b3chat-business {
    --b3chat-business-accent: #2c6e49;
    --b3chat-business-accent-hover: #1d4d33;
    --b3chat-business-bg: #fafaf7;
    --b3chat-business-card-bg: #ffffff;
    --b3chat-business-border: #e6e6e0;
    --b3chat-business-text: #2a2a2a;
    --b3chat-business-muted: #6b6b65;
    font-size: 16px;
}

.b3chat.b3chat-business .b3chat-business-header {
    background: var(--b3chat-business-card-bg);
    border-bottom: 1px solid var(--b3chat-business-border);
    /* Right padding leaves room for an external close button overlay (e.g. SiteAssistantBubble's X) */
    padding: 14px 56px 14px 16px;
}

.b3chat.b3chat-business .b3chat-panel-title {
    font-weight: 600;
    color: var(--b3chat-business-text);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.b3chat.b3chat-business .b3chat-panel-title .bi-stars {
    color: var(--b3chat-business-accent);
}

.b3chat-business-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Small icon button (copy, etc.) sitting next to the main header action */
.b3chat-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: transparent;
    color: var(--b3chat-business-muted);
    border: 1px solid var(--b3chat-business-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.95rem;
}

.b3chat-icon-btn:hover {
    color: var(--b3chat-business-accent);
    border-color: var(--b3chat-business-accent);
    background: #f5f9f7;
}

.b3chat-icon-btn.copied {
    color: var(--b3chat-business-accent);
    border-color: var(--b3chat-business-accent);
    background: #e8f1ec;
}

.b3chat-business-newchat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--b3chat-business-accent);
    border: 1.5px solid var(--b3chat-business-accent);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.b3chat-business-newchat:hover {
    background: var(--b3chat-business-accent);
    color: white;
}

.b3chat-business-newchat i {
    font-size: 0.9rem;
}

/* ─── REVIEW CARD ──────────────────────────────────────────────
   Shown after the user clicks "Refresh Page" — gates the input
   until they pick Commit / Work on it / Revert. */

.b3chat-review-card {
    margin: 12px 12px 14px;
    padding: 16px 14px;
    background: var(--b3chat-business-card-bg);
    border: 1.5px solid var(--b3chat-business-border);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.b3chat-review-header {
    text-align: center;
    margin-bottom: 14px;
}

.b3chat-review-header h4 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--b3chat-business-text);
}

.b3chat-review-header p {
    margin: 0;
    color: var(--b3chat-business-muted);
    font-size: 0.88rem;
}

.b3chat-review-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.b3chat-review-btn {
    display: grid;
    grid-template-columns: 32px 1fr;
    grid-template-areas:
        "icon title"
        "icon sub";
    align-items: start;
    gap: 2px 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid;
    background: white;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.b3chat-review-btn i {
    grid-area: icon;
    font-size: 1.4rem;
    align-self: center;
}

.b3chat-review-btn-title {
    grid-area: title;
    font-weight: 700;
    font-size: 1rem;
    color: var(--b3chat-business-text);
}

.b3chat-review-btn-sub {
    grid-area: sub;
    font-size: 0.82rem;
    color: var(--b3chat-business-muted);
    line-height: 1.3;
}

.b3chat-review-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Commit — green, primary */
.b3chat-review-commit {
    border-color: var(--b3chat-business-accent);
}
.b3chat-review-commit i { color: var(--b3chat-business-accent); }
.b3chat-review-commit:hover {
    background: #f5f9f7;
}

/* Work on it — neutral */
.b3chat-review-work {
    border-color: #cfcfc7;
}
.b3chat-review-work i { color: #6b6b65; }
.b3chat-review-work:hover {
    background: #f7f5ee;
    border-color: #b8b8b0;
}

/* Revert — red, destructive */
.b3chat-review-revert {
    border-color: #d8a4a4;
}
.b3chat-review-revert i { color: #a83232; }
.b3chat-review-revert:hover {
    background: #fbf2f2;
    border-color: #a83232;
}

/* Inline confirm/working/result states reuse the publish-bar styles below.
   The .b3chat-commit-go button uses the green accent. */
.b3chat-commit-go {
    background: var(--b3chat-business-accent) !important;
}
.b3chat-commit-go:hover {
    background: var(--b3chat-business-accent-hover) !important;
}

/* "Cancel Changes" — replaces "New Chat" when there are pending AI edits. Red to signal destructive action. */
.b3chat-business-cancel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: #a83232;
    border: 1.5px solid #a83232;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.b3chat-business-cancel:hover {
    background: #a83232;
    color: white;
}

.b3chat-business-cancel i {
    font-size: 0.9rem;
}

/* Inside the publish-bar's confirm card, the "Yes, discard" button uses the cancel red */
.b3chat-cancel-go {
    background: #a83232 !important;
}
.b3chat-cancel-go:hover {
    background: #842525 !important;
}

/* Welcome card */
.b3chat-business-welcome {
    padding: 24px 20px;
    text-align: center;
}

.b3chat-business-welcome h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    color: var(--b3chat-business-text);
    font-weight: 600;
}

.b3chat-business-welcome-sub {
    margin: 0 0 20px 0;
    color: var(--b3chat-business-muted);
    font-size: 0.95rem;
}

.b3chat-welcome-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.b3chat-welcome-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--b3chat-business-card-bg);
    border: 1.5px solid var(--b3chat-business-border);
    border-radius: 12px;
    color: var(--b3chat-business-text);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.25;
    min-height: 80px;
    text-align: center;
}

.b3chat-welcome-btn:hover:not(:disabled) {
    border-color: var(--b3chat-business-accent);
    background: #f5f9f7;
    transform: translateY(-1px);
}

.b3chat-welcome-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.b3chat-welcome-btn i {
    font-size: 1.4rem;
    color: var(--b3chat-business-accent);
}

.b3chat-business-context {
    margin-top: 12px;
    padding: 8px 12px;
    background: #f0f4f1;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--b3chat-business-muted);
    text-align: center;
}

.b3chat-business-context strong {
    color: var(--b3chat-business-text);
    font-weight: 600;
}

/* Roomier message bubbles in business mode */
.b3chat.b3chat-business .b3chat-msg {
    font-size: 0.98rem;
    line-height: 1.55;
    padding: 12px 14px;
}

.b3chat.b3chat-business .b3chat-msg.user {
    background: var(--b3chat-business-accent);
    color: white;
}

.b3chat.b3chat-business .b3chat-msg.assistant {
    background: var(--b3chat-business-card-bg);
    border: 1px solid var(--b3chat-business-border);
}

.b3chat.b3chat-business .b3chat-input {
    font-size: 1rem;
    padding: 12px;
}

.b3chat.b3chat-business .b3chat-send-btn {
    background: var(--b3chat-business-accent);
}

.b3chat.b3chat-business .b3chat-send-btn:hover:not(:disabled) {
    background: var(--b3chat-business-accent-hover);
}

/* Hide power-user surfaces if they slip through */
.b3chat.b3chat-business .b3chat-blocks-btn,
.b3chat.b3chat-business .b3chat-model-select-inline,
.b3chat.b3chat-business .b3chat-lock-btn {
    display: none !important;
}

@media (max-width: 480px) {
    .b3chat-welcome-actions {
        grid-template-columns: 1fr;
    }
}

/* Action bar (Refresh Page / Cancel Changes flow) — stacks vertically so hint
   text falls below the button instead of running off the side */
.b3chat-publish-bar {
    margin-top: 10px;
    padding: 10px 12px;
    background: #f7f4ee;
    border: 1px solid #e6dfcf;
    border-radius: 10px;
    font-size: 0.88rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.b3chat-publish-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2c6e49;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.b3chat-publish-btn:hover:not(:disabled) {
    background: #1d4d33;
    transform: translateY(-1px);
}

.b3chat-publish-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.b3chat-publish-btn i {
    font-size: 1rem;
}

/* Publish action — amber/orange, visually distinct from Refresh (green).
   Used when the change requires a server rebuild before going live. */
.b3chat-publish-btn.b3chat-publish-action {
    background: #c08a3e;
}

.b3chat-publish-btn.b3chat-publish-action:hover:not(:disabled) {
    background: #a87432;
}

.b3chat-publish-hint {
    color: #6b6b65;
    font-size: 0.82rem;
}

.b3chat-publish-confirm {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.b3chat-publish-confirm strong {
    color: #2a2a2a;
}

.b3chat-publish-confirm span {
    color: #555;
    font-size: 0.85rem;
}

.b3chat-publish-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.b3chat-publish-go {
    background: #c08a3e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.b3chat-publish-go:hover {
    background: #a87432;
}

.b3chat-publish-cancel {
    background: transparent;
    color: #6b6b65;
    border: 1px solid #cfcfc7;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.b3chat-publish-cancel:hover {
    background: #ececdf;
}

.b3chat-publish-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    padding: 4px 0;
}

.b3chat-publish-result {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-weight: 500;
}

.b3chat-publish-result.success {
    color: #2c6e49;
}

.b3chat-publish-result.success i {
    color: #2c6e49;
}

.b3chat-publish-result.error {
    color: #a83232;
}

.b3chat-publish-result.error i {
    color: #a83232;
}

.b3chat-publish-dismiss {
    margin-left: auto;
    background: transparent;
    color: inherit;
    border: 1px solid currentColor;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.7;
}

.b3chat-publish-dismiss:hover {
    opacity: 1;
}
