/* 2-Column SPA Layout for OPAC AI */
.ai-spa-container {
    margin: 40px auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start;
    padding: 0;
}
.ai-sidebar {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 20px;
}
.ai-sidebar h2 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
}
.ai-tab-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    text-align: left;
    padding: 15px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}
.ai-tab-btn:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}
.ai-tab-btn.active {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.ai-tab-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}
.ai-tab-btn.active .ai-tab-icon {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.ai-tab-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
}
.ai-tab-info p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}
.ai-content-area {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    min-height: 500px;
}
.ai-tab-pane {
    display: none;
    padding: 30px;
}
.ai-tab-pane.active {
    display: block;
}
@media (max-width: 992px) {
    .ai-spa-container {
        grid-template-columns: 1fr;
    }
    .ai-sidebar {
        position: static;
    }
}

/* Adjustments for existing partials to fit the pane */
.ai-tab-pane .ai-page,
.ai-tab-pane .mood-page,
.ai-tab-pane .plan-page,
.ai-tab-pane .idea-page,
.ai-tab-pane .family-page {
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
}
.ai-tab-pane .ai-header,
.ai-tab-pane .mood-header,
.ai-tab-pane .plan-header,
.ai-tab-pane .idea-header,
.ai-tab-pane .family-header {
    text-align: left;
    margin-bottom: 30px;
}
/* Hide the back buttons in partials since we have sidebar navigation now */
.ai-tab-pane .btn-prev[href*="opac/ai"],
.ai-tab-pane .back-link {
    display: none !important;
}
