/* Knowledge Base Frontend Styles */
/* File: /public/assets/css/knowledge-base.css */



/* Breadcrumb Styling */
.breadcrumb {
    background: white;
    padding: 1rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.9rem;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #6b7280;
    margin: 0 0.5rem;
}

/* Article Layout */
.article-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.article-content {
    background: white;
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.article-sidebar {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

/* Article Header */
.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.article-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: 0.9rem;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-meta i {
    color: #9ca3af;
}

/* Article Body Typography */
.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
    color: #111827;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-body h1 { font-size: 1.5rem; }
.article-body h2 { font-size: 1.25rem; }
.article-body h3 { font-size: 1.125rem; }
.article-body h4 { font-size: 1rem; }
.article-body h5 { font-size: 0.95rem; }
.article-body h6 { font-size: 0.9rem; }

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body ul,
.article-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body blockquote {
    border-left: 4px solid #3b82f6;
    background: #f8fafc;
    margin: 2rem 0;
    padding: 1.5rem;
    font-style: italic;
    color: #4b5563;
    border-radius: 0 4px 4px 0;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.article-body th,
.article-body td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.article-body th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.article-body code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9em;
    color: #e11d48;
}

.article-body pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.article-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* CUSTOM TINYMCE TEMPLATE STYLES */

/* Layout Styles */
.kb-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.kb-three-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.kb-sidebar-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2.5rem;
    margin: 2rem 0;
}

/* Text + Image Layouts */
.kb-text-image-right {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2.5rem;
    align-items: start;
    margin: 2.5rem 0;
}

.kb-text-image-left {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2.5rem;
    align-items: start;
    margin: 2.5rem 0;
}

.kb-text-content {
    padding-right: 1rem;
}

.kb-image-content {
    text-align: center;
}

.kb-image-content img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.kb-image-caption {
    font-size: 0.85em;
    color: #6b7280;
    margin-top: 0.5rem;
    font-style: italic;
}

.kb-step-section {
    margin: 2.5rem 0;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.kb-step-section:last-child {
    border-bottom: none;
}

/* Content Boxes */
.kb-info-box {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 4px solid #3b82f6;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.kb-warning-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.1);
}

.kb-success-box {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid #10b981;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
}

.kb-note-box {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-left: 4px solid #6b7280;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.1);
}

/* Text Styles */
.kb-highlight {
    background: linear-gradient(120deg, #fef08a 0%, #fde047 100%);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.kb-code {
    background: #f3f4f6;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9em;
    color: #e11d48;
    border: 1px solid #e5e7eb;
}

kbd,
.kb-key {
    background: linear-gradient(145deg, #374151 0%, #1f2937 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.85em;
    border: 1px solid #4b5563;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: inline-block;
}

/* Related Articles */
.related-articles {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.related-articles h2 {
    color: #111827;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-item {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.related-item:hover {
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.related-item h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.related-item h3 a {
    color: #1f2937;
    text-decoration: none;
}

.related-item h3 a:hover {
    color: #3b82f6;
}

.related-meta {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Sidebar Styles */
.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    color: #111827;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    margin-bottom: 0.5rem;
}

.sidebar-list a {
    color: #374151;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    transition: color 0.3s ease;
}

.sidebar-list a:hover {
    color: #3b82f6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .article-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .article-content {
        padding: 1.5rem;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
    
    .article-body {
        font-size: 1rem;
    }
    
    .kb-two-columns,
    .kb-three-columns,
    .kb-sidebar-layout,
    .kb-text-image-right,
    .kb-text-image-left {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .kb-text-content {
        padding-right: 0;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    .article-header h1 {
        font-size: 1.75rem;
    }
    
    .kb-info-box,
    .kb-warning-box,
    .kb-success-box,
    .kb-note-box {
        padding: 1rem;
        margin: 1rem 0;
    }
}

/* Print Styles */
@media print {
    .article-sidebar,
    .related-articles {
        display: none;
    }
    
    .article-container {
        grid-template-columns: 1fr;
    }
    
    .article-content {
        box-shadow: none;
        padding: 0;
    }
}