/*
 * Documentation Center Styles - RiPro Style
 */

/* ===== Documentation Single Page ===== */
.doc-single-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.doc-breadcrumb {
    padding: 15px 20px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.doc-breadcrumb a {
    color: var(--theme-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.doc-breadcrumb a:hover {
    color: var(--hover-color);
}

.doc-breadcrumb i {
    margin: 0 8px;
    font-size: 12px;
    color: #999;
}

.doc-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

/* Main Content Area */
.doc-main-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Document Header */
.doc-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.doc-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #333;
    line-height: 1.4;
}

.doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
}

.meta-item i {
    color: var(--theme-color);
}

/* Table of Contents */
.doc-toc {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    border-left: 4px solid var(--theme-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.toc-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-title i {
    color: var(--theme-color);
}

.toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list {
    padding-left: 0;
}

.toc-item {
    margin-bottom: 8px;
}

.toc-link {
    display: block;
    padding: 8px 12px;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.toc-link:hover {
    background: rgba(var(--theme-color-rgb), 0.1);
    color: var(--theme-color);
    padding-left: 16px;
}

.toc-sublist {
    padding-left: 20px !important;
    margin-top: 8px;
}

.toc-item.level-3 .toc-link {
    font-size: 13px;
    padding-left: 24px;
}

/* Document Body */
.doc-body {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.doc-body h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

.doc-body h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 30px 0 15px 0;
    color: #444;
}

.doc-body p {
    margin-bottom: 16px;
}

.doc-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.doc-body pre {
    background: #282c34;
    color: #abb2bf;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.6;
}

.doc-body code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    color: #e83e8c;
}

.doc-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.doc-body blockquote {
    border-left: 4px solid var(--theme-color);
    padding: 15px 20px;
    margin: 20px 0;
    background: #f9f9f9;
    border-radius: 0 8px 8px 0;
}

.doc-body ul,
.doc-body ol {
    padding-left: 30px;
    margin-bottom: 16px;
}

.doc-body li {
    margin-bottom: 8px;
}

.doc-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.doc-body th,
.doc-body td {
    padding: 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.doc-body th {
    background: #f5f5f5;
    font-weight: 600;
}

/* Document Tags Footer */
.doc-tags-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.tags-label {
    display: inline-block;
    font-weight: 600;
    margin-right: 10px;
    color: #666;
}

.tags-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-badge {
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-badge:hover {
    background: var(--theme-color-bg);
    color: var(--theme-color);
}

/* Document Navigation (Prev/Next) */
.doc-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.nav-previous,
.nav-next {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-previous:hover,
.nav-next:hover {
    background: var(--theme-color-bg);
}

.nav-previous a,
.nav-next a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
}

.nav-previous a:hover,
.nav-next a:hover {
    color: var(--theme-color);
}

/* ===== Documentation Sidebar ===== */
.doc-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

.sidebar-title i {
    color: var(--theme-color);
}

/* Document Categories */
.doc-categories,
.doc-tags,
.popular-docs {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 8px;
}

.category-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.category-link i {
    margin-right: 8px;
    font-size: 12px;
    color: #999;
    transition: transform 0.3s ease;
}

.category-link:hover {
    background: #f5f5f5;
    color: var(--theme-color);
}

.category-link:hover i {
    transform: translateX(4px);
}

.category-link.active {
    background: var(--theme-color-bg);
    color: var(--theme-color);
    font-weight: 600;
}

.category-count {
    margin-left: auto;
    padding: 2px 8px;
    background: #e0e0e0;
    border-radius: 10px;
    font-size: 12px;
    color: #666;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: var(--theme-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Popular Documents */
.popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-item {
    margin-bottom: 12px;
}

.popular-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.popular-link:hover {
    background: #f5f5f5;
}

.popular-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--theme-color) 0%, var(--hover-color) 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.popular-rank.top-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.popular-rank.top-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
}

.popular-rank.top-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #daa520 100%);
}

.popular-title {
    flex: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Documentation Archive Page ===== */
.doc-archive-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.doc-archive-header {
    background: linear-gradient(135deg, var(--theme-color) 0%, var(--hover-color) 100%);
    color: #fff;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(var(--theme-color-rgb), 0.3);
}

.archive-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.archive-title i {
    font-size: 36px;
}

.archive-description {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 20px;
}

/* Document Search */
.doc-search-wrapper {
    margin-top: 20px;
}

.search-input-group {
    display: flex;
    background: #fff;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    font-size: 15px;
    outline: none;
}

.search-submit {
    padding: 15px 25px;
    background: var(--theme-color);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}

.search-submit:hover {
    background: var(--hover-color);
}

/* Document Grid */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.doc-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.doc-card-body {
    padding: 20px;
    flex: 1;
}

.doc-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.doc-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.doc-card-title a:hover {
    color: var(--theme-color);
}

.doc-card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.doc-card-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #999;
}

.doc-card-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.doc-card-footer {
    padding: 15px 20px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.doc-category-badge {
    padding: 5px 12px;
    background: var(--theme-color-bg);
    color: var(--theme-color);
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
}

.read-more-link {
    color: var(--theme-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.read-more-link:hover {
    gap: 8px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
}

.no-results i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 24px;
    color: #666;
    margin-bottom: 10px;
}

.no-results p {
    color: #999;
    margin-bottom: 20px;
}

/* Pagination */
.doc-pagination {
    margin-top: 30px;
}

.doc-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.doc-pagination li {
    display: inline-block;
}

.doc-pagination a,
.doc-pagination span {
    padding: 10px 15px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.doc-pagination a:hover {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: #fff;
}

.doc-pagination .current {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: #fff;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .doc-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .doc-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .doc-main-content {
        padding: 20px;
    }
    
    .doc-title {
        font-size: 24px;
    }
    
    .doc-meta {
        gap: 10px;
    }
    
    .doc-grid {
        grid-template-columns: 1fr;
    }
    
    .archive-title {
        font-size: 24px;
    }
    
    .doc-archive-header {
        padding: 25px;
    }
    
    .doc-navigation {
        grid-template-columns: 1fr;
    }
}

/* ===== Dark Mode Support ===== */
@media (prefers-color-scheme: dark) {
    .doc-main-content,
    .doc-categories,
    .doc-tags,
    .popular-docs,
    .doc-card {
        background: #1a1a1a;
    }
    
    .doc-breadcrumb {
        background: #1a1a1a;
    }
    
    .doc-title,
    .sidebar-title,
    .doc-card-title a {
        color: #e0e0e0;
    }
    
    .doc-body {
        color: #ccc;
    }
    
    .doc-body h2,
    .doc-body h3 {
        color: #e0e0e0;
    }
    
    .doc-toc {
        background: linear-gradient(135deg, #2a2a2a 0%, #333 100%);
    }
    
    .toc-link {
        color: #ccc;
    }
    
    .category-link,
    .popular-link {
        color: #ccc;
    }
    
    .category-link:hover,
    .popular-link:hover {
        background: #2a2a2a;
    }
    
    .tag-item {
        background: #2a2a2a;
        color: #ccc;
    }
    
    .doc-card-footer {
        background: #2a2a2a;
    }
    
    .doc-pagination a,
    .doc-pagination span {
        background: #2a2a2a;
        border-color: #444;
        color: #ccc;
    }
}
