/* frontend/web/css/docs.css */

.docs-sidebar {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.docs-nav .nav-category-title {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.docs-nav .nav-category-title a {
    text-decoration: none;
    color: inherit;
}

.docs-nav .nav-category-title a.active {
    color: #0d6efd;
}

.docs-nav .nav-item {
    margin-bottom: 0.25rem;
}

.docs-nav .nav-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    color: #495057;
    border-radius: 4px;
}

.docs-nav .nav-link:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.docs-nav .nav-link.active {
    background-color: #e7f1ff;
    color: #0d6efd;
    font-weight: 500;
}

.nav-subcategory {
    margin-left: 1rem;
    border-left: 1px solid #dee2e6;
    padding-left: 1rem;
}

.nav-subcategory-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Documentation content */
.docs-content {
    line-height: 1.6;
}

.docs-content h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.docs-content h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.docs-content h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.docs-content pre {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
}

.docs-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.docs-content blockquote {
    border-left: 4px solid #dee2e6;
    padding-left: 1rem;
    margin-left: 0;
    color: #6c757d;
}

/* Table of Contents */
.toc-nav .toc-item {
    color: #495057;
    text-decoration: none;
    border-left: 2px solid transparent;
    padding-left: 1rem;
}

.toc-nav .toc-item:hover {
    color: #0d6efd;
    border-left-color: #0d6efd;
}

.toc-nav .toc-level-2 {
    font-weight: 500;
    margin-left: 0;
}

.toc-nav .toc-level-3 {
    font-weight: normal;
    margin-left: 1rem;
    font-size: 0.9em;
}

/* Star Rating */
.star-rating {
    direction: rtl;
    unicode-bidi: bidi-override;
    color: #ddd;
    font-size: 1.5rem;
}

.star-rating input {
    display: none;
}

.star-rating label {
    display: inline-block;
    padding: 0 0.1rem;
    cursor: pointer;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #ffc107;
}

/* Comments */
.comment-item {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.comment-author {
    margin-bottom: 0.25rem;
}

.reaction-badge {
    font-size: 0.8em;
    padding: 0.2rem 0.5rem;
    background-color: #e7f1ff;
    border-radius: 12px;
    margin-left: 0.5rem;
}

.replies {
    border-left: 2px solid #dee2e6;
}

.reply-item {
    background-color: #f8f9fa;
    border-radius: 0 4px 4px 0;
}

/* Feedback */
.feedback-buttons .btn {
    min-width: 80px;
}

/* Print styles */
@media print {
    .docs-sidebar,
    .docs-actions,
    .docs-feedback,
    .docs-rating,
    .docs-comments,
    .docs-related {
        display: none !important;
    }
    
    .docs-content {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .docs-header {
        page-break-after: avoid;
    }
    
    .docs-body {
        page-break-inside: avoid;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .docs-content h1 {
        font-size: 1.8rem;
    }
    
    .docs-content h2 {
        font-size: 1.5rem;
    }
    
    .docs-meta {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .docs-actions {
        margin-top: 1rem;
    }
}