/* AI Debugger Sidebar Styles */
.ai-sidebar {
    position: fixed;
    top: var(--header-height);
    right: -400px;
    width: 380px;
    height: calc(100vh - var(--header-height));
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid var(--glass-border);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    z-index: 900;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
}

.ai-sidebar.open {
    right: 0;
}

.ai-sidebar-header {
    height: var(--tabs-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(var(--bg-primary-rgb), 0.5);
    /* Semi parent */
}

.ai-sidebar-header h3 {
    font-size: var(--fs-md);
    font-weight: 600;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* AI Loading State */
.ai-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* AI Results */
.error-finding {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
    padding: 1rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: 1.5rem;
}

.text-error {
    color: #ef4444;
    display: block;
    margin-bottom: 0.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.w-100 {
    width: 100%;
    justify-content: center;
}

.suggested-fix {
    margin-top: 1.5rem;
}

.suggested-fix strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.75rem;
}

.code-block-wrapper {
    background: var(--bg-tertiary);
    border-radius: 6px;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    overflow-x: auto;
    border: 1px solid var(--glass-border);
}

.code-block-wrapper pre {
    margin: 0;
}

.code-block-wrapper code {
    color: var(--text-secondary);
}

.ai-welcome-state {
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    line-height: 1.6;
    padding-top: 2rem;
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    .ai-sidebar {
        width: 100%;
        right: -100%;
    }
}