/* Help Sidepanel - Unique Component with help- prefixes */

/* Base help sidepanel styling */
.help-sidepanel {
    /* Extend AI Assistant framework */
    position: fixed;
    top: 0;
    width: var(--ai-assistant-sidepanel-width, 500px);
    height: 100vh;
    background: var(--ai-assistant-bg-color, #ffffff);
    box-shadow: var(--ai-assistant-box-shadow, -2px 0 20px rgba(0, 0, 0, 0.1));
    z-index: 1050;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--ai-assistant-border-color, #dee2e6);

    /* Ensure proper initial positioning */
    right: -500px;
    /* Fallback if CSS variable fails */
    right: calc(-1 * var(--ai-assistant-sidepanel-width, 500px));
    transition: right 0.3s ease;
}

.help-sidepanel.help-open {
    right: 0 !important;
}

/* Help-specific overlay */
.help-sidepanel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.help-sidepanel-overlay.help-show {
    opacity: 1;
    visibility: visible;
}

/* Help-specific header styling */
.help-sidepanel .help-header {
    padding: 1rem;
    border-bottom: 2px solid #0dcaf0;
    background: var(--ai-assistant-header-bg, #f8f9fa);
    flex-shrink: 0;
}

/* Help-specific body with proper scrolling */
.help-sidepanel .help-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* Ensure scrollbar is always visible when needed */
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 transparent;
}

/* Webkit scrollbar styling for help sidepanel */
.help-sidepanel .help-body::-webkit-scrollbar {
    width: 8px;
}

.help-sidepanel .help-body::-webkit-scrollbar-track {
    background: transparent;
}

.help-sidepanel .help-body::-webkit-scrollbar-thumb {
    background-color: #dee2e6;
    border-radius: 4px;
}

.help-sidepanel .help-body::-webkit-scrollbar-thumb:hover {
    background-color: #adb5bd;
}

/* Help content with proper padding */
.help-sidepanel .help-content {
    padding: 1.5rem;
    min-height: 100%;
}

.help-sidepanel .help-content h6 {
    color: var(--ai-assistant-primary-color, #007bff);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* Help process steps styling */
.help-sidepanel .help-process-steps {
    margin-bottom: 2rem;
}

.help-sidepanel .help-process-step {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--ai-assistant-header-bg, #f8f9fa);
    border-radius: var(--ai-assistant-border-radius, 0.5rem);
    border-left: 3px solid #dee2e6;
}

.help-sidepanel .help-process-step-content h6 {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.help-sidepanel .help-process-step-content p {
    margin-bottom: 0;
    font-size: 0.8rem;
    line-height: 1.4;
}

.help-sidepanel .help-process-step-content ul {
    margin-bottom: 0;
    margin-top: 0.5rem;
    padding-left: 1rem;
}

.help-sidepanel .help-process-step-content li {
    font-size: 0.75rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.help-sidepanel .help-content .alert {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.help-sidepanel .help-content .alert h6 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Color variants for different step types */
.help-sidepanel .help-step-primary {
    border-left-color: var(--ai-assistant-primary-color, #007bff);
}

.help-sidepanel .help-step-warning {
    border-left-color: var(--ai-assistant-warning-color, #ffc107);
}

.help-sidepanel .help-step-info {
    border-left-color: #0dcaf0;
}

.help-sidepanel .help-step-success {
    border-left-color: var(--ai-assistant-success-color, #28a745);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .help-sidepanel {
        width: 100vw !important;
        right: -100vw !important;
    }

    .help-sidepanel.help-open {
        right: 0 !important;
    }

    .help-sidepanel .help-process-step {
        flex-direction: column;
        text-align: center;
    }

    .help-sidepanel .help-process-step-icon {
        margin-right: 0;
        margin-bottom: 0.75rem;
    }
}