/* ===== Help System - BizzSols ===== */

.bg-gradient-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Floating Help Button */
.help-btn-float {
    position: fixed;
    bottom: 170px;
    right: 20px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bs-primary, #0d6efd);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    z-index: 1045;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.help-btn-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0,0,0,.3);
}
[dir="rtl"] .help-btn-float { right: auto; left: 20px; }

/* Help Panel */
.help-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: var(--bs-body-bg, #fff);
    border-left: 1px solid var(--bs-border-color, #dee2e6);
    box-shadow: -4px 0 20px rgba(0,0,0,.12);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: right .3s ease;
    overflow: hidden;
}
.help-panel.open { right: 0; }
[dir="rtl"] .help-panel { right: auto; left: -420px; border-left: none; border-right: 1px solid var(--bs-border-color,#dee2e6); box-shadow: 4px 0 20px rgba(0,0,0,.12); }
[dir="rtl"] .help-panel.open { left: 0; }

/* Panel header */
.help-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    background: var(--bs-primary, #0d6efd);
    color: #fff;
    flex-shrink: 0;
}
.help-panel-header .close-btn { background: none; border: none; color: #fff; font-size: 1.25rem; cursor: pointer; }

/* Tabs */
.help-panel-tabs { flex-shrink: 0; border-bottom: 1px solid var(--bs-border-color,#dee2e6); }
.help-panel-body { flex: 1; overflow-y: auto; padding: 1rem; }

/* Article list */
.help-article-card { cursor: pointer; transition: background .15s; }
.help-article-card:hover { background: var(--bs-light, #f8f9fa); }

/* Chat */
.help-chat-messages {
    height: 300px;
    overflow-y: auto;
    border: 1px solid var(--bs-border-color,#dee2e6);
    border-radius: .375rem;
    padding: .75rem;
    margin-bottom: .75rem;
    background: var(--bs-light,#f8f9fa);
}
.chat-msg { margin-bottom: .5rem; max-width: 85%; }
.chat-msg.user { margin-left: auto; text-align: right; }
.chat-msg.user .bubble { background: var(--bs-primary,#0d6efd); color: #fff; border-radius: 1rem 1rem 0 1rem; }
.chat-msg.assistant .bubble { background: #fff; border: 1px solid var(--bs-border-color,#dee2e6); border-radius: 1rem 1rem 1rem 0; }
.chat-msg .bubble { display: inline-block; padding: .5rem .75rem; font-size: .875rem; }
[dir="rtl"] .chat-msg.user { margin-left: 0; margin-right: auto; text-align: left; }
[dir="rtl"] .chat-msg.user .bubble { border-radius: 1rem 1rem 1rem 0; }
[dir="rtl"] .chat-msg.assistant .bubble { border-radius: 1rem 1rem 0 1rem; }

/* Typing indicator */
.typing-indicator span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #999; margin: 0 2px; animation: typing 1.2s infinite; }
.typing-indicator span:nth-child(2) { animation-delay: .2s; }
.typing-indicator span:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }

/* Tour list */
.tour-card { cursor: pointer; }
.tour-card.completed { opacity: .7; }

/* Overlay backdrop */
.help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 1049;
    display: none;
}
.help-overlay.show { display: block; }

/* Mobile */
@media (max-width: 767.98px) {
    .help-panel { width: 100vw; right: -100vw; }
    [dir="rtl"] .help-panel { left: -100vw; }
}
