/* Docs Wiki Styles - GitBook Style */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

.docs-layout {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    margin: 0;
    padding: 0;
}

/* Header */
.docs-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-bottom: 1px solid #0056b3;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-left .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 18px;
}

.back-to-site {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.back-to-site:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.logo-img {
    height: 32px;
    margin-right: 12px;
    filter: brightness(0) invert(1);
}

.logo-text {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Search */
.search-container {
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 40px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 14px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    margin-top: 4px;
}

/* Main Container */
.docs-container {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    max-width: 1600px;
    margin: 0 auto;
    min-height: calc(100vh - 60px);
    padding: 0 20px;
}

/* Left Sidebar */
.docs-sidebar {
    background: #f8f9fa;
    border-right: 1px solid #e1e5e9;
    padding: 20px 0;
    overflow-y: auto;
    height: calc(100vh - 60px);
    position: sticky;
    top: 60px;
}

.sidebar-nav {
    padding: 0 20px;
}

.nav-category {
    margin-bottom: 30px;
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-icon {
    margin-right: 8px;
    font-size: 16px;
}

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

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #e9ecef;
    color: #212529;
}

/* Disabled links */
.nav-link.disabled {
    cursor: not-allowed;
    opacity: 0.6;
    color: #adb5bd;
    pointer-events: none;
}

.nav-link.disabled:hover {
    background: transparent;
    color: #adb5bd;
}

.disabled-icon {
    font-size: 12px;
    color: #adb5bd;
    margin-left: 8px;
}

.nav-item.active .nav-link {
    background: #007bff;
    color: #fff;
}

.expand-icon {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.nav-item.expanded .expand-icon {
    transform: rotate(90deg);
}

.sub-items {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-left: 20px;
    display: none;
}

.nav-item.expanded .sub-items {
    display: block;
}

.sub-item {
    margin-bottom: 2px;
}

.sub-link {
    display: block;
    padding: 6px 12px;
    color: #6c757d;
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sub-link:hover {
    background: #e9ecef;
    color: #495057;
}

.sub-link.disabled {
    cursor: not-allowed;
    opacity: 0.6;
    color: #adb5bd;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sub-link.disabled:hover {
    background: transparent;
    color: #adb5bd;
}

/* Disabled links in content */
.disabled-link {
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.6;
    text-decoration: none;
}

.disabled-link:hover {
    color: #adb5bd;
    text-decoration: none;
}

/* Documentation images */
.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
    display: block;
}

.content-body img:hover {
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Image captions */
.image-caption {
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    margin-top: 8px;
    margin-bottom: 24px;
    font-style: italic;
}

/* Italic text styling for captions */
.content-body em {
    display: block;
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    margin-top: 8px;
    margin-bottom: 24px;
    font-style: italic;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e1e5e9;
    margin-top: 20px;
}

.powered-by {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
}

.powered-by i {
    margin-right: 6px;
}

/* Main Content */
.docs-main {
    padding: 40px 30px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.content-header {
    margin-bottom: 40px;
}

.content-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.content-title h1 {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1.2;
}

.content-actions {
    display: flex;
    gap: 8px;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.content-description {
    font-size: 18px;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

.content-body {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}

.content-body h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 40px 0 20px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.content-body h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 30px 0 15px 0;
}

.content-body h4 {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    margin: 25px 0 12px 0;
}

.content-body p {
    margin-bottom: 16px;
}

.content-body ul, .content-body ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.content-body li {
    margin-bottom: 8px;
}

.content-body code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    color: #e83e8c;
}

.content-body pre {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #e1e5e9;
}

.content-body pre code {
    background: none;
    padding: 0;
    color: #333;
}

.content-body blockquote {
    border-left: 4px solid #007bff;
    padding-left: 16px;
    margin: 20px 0;
    color: #6c757d;
    font-style: italic;
}

/* Feedback Section */
.feedback-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e1e5e9;
    text-align: center;
}

.feedback-text {
    font-size: 16px;
    color: #495057;
    margin-bottom: 16px;
}

.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.feedback-btn {
    width: 48px;
    height: 48px;
    border: 2px solid #e1e5e9;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.feedback-btn:hover {
    border-color: #007bff;
    transform: scale(1.1);
}

.feedback-btn.positive:hover {
    color: #28a745;
    border-color: #28a745;
}

.feedback-btn.neutral:hover {
    color: #ffc107;
    border-color: #ffc107;
}

.feedback-btn.negative:hover {
    color: #dc3545;
    border-color: #dc3545;
}

.feedback-btn.submitted {
    background: #28a745;
    color: #fff;
    border-color: #28a745;
}

/* Right Sidebar - Table of Contents */
.docs-toc {
    background: #fafbfc;
    border-left: 1px solid #e9ecef;
    padding: 20px;
    height: calc(100vh - 60px);
    position: sticky;
    top: 60px;
    overflow-y: auto;
}

.toc-header h3 {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    margin: 0 0 16px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #e9ecef;
}

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

.toc-item {
    margin-bottom: 8px;
}

.toc-link {
    display: block;
    padding: 4px 0;
    color: #8c959d;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.toc-link:hover {
    color: #6c757d;
}

.toc-h2 {
    font-weight: 500;
    color: #6c757d;
}

.toc-h3 {
    margin-left: 12px;
    font-size: 13px;
}

.toc-h4 {
    margin-left: 24px;
    font-size: 12px;
}



/* Responsive Design */
@media (max-width: 1200px) {
    .docs-container {
        grid-template-columns: 280px 1fr;
    }
    
    .docs-toc {
        display: none;
    }
}

@media (max-width: 768px) {
    .docs-container {
        grid-template-columns: 1fr;
    }
    
    .docs-sidebar {
        display: none;
    }
    
    .docs-main {
        padding: 20px 15px;
    }
    
    .content-title {
        flex-direction: column;
        gap: 16px;
    }
    
    .content-title h1 {
        font-size: 28px;
    }
    
    .header-container {
        padding: 0 16px;
    }
    
    .search-container {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .search-container {
        width: 150px;
    }
    
    .docs-main {
        padding: 16px 12px;
    }
    
    .content-title h1 {
        font-size: 24px;
    }
    
    .content-description {
        font-size: 16px;
    }
}

/* Enhanced Search Results */
.search-result-item {
    padding: 16px;
    border-bottom: 1px solid #e1e5e9;
    text-decoration: none;
    color: #333;
    display: block;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.result-title {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin: 0;
}

.result-category {
    font-size: 11px;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-snippet {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
    margin-bottom: 8px;
}

.result-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.result-tag {
    font-size: 11px;
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

/* Article Navigation */
.article-navigation {
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid #e1e5e9;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-btn {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 300px;
}

.nav-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.prev-btn {
    text-align: left;
}

.next-btn {
    text-align: right;
    margin-left: auto;
}

.nav-btn i {
    font-size: 16px;
    margin: 0 12px;
}

.nav-btn-content {
    flex: 1;
}

.nav-label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.nav-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

/* Single button layout */
.nav-buttons:has(.nav-btn:only-child) {
    justify-content: center;
}

.nav-buttons:has(.nav-btn:only-child) .nav-btn {
    max-width: 400px;
}

/* WhatsApp CTA Section */
.whatsapp-cta-section {
    margin: 40px 0;
    text-align: center;
}

.btn-whatsapp {
    background: #25d366 !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp:hover {
    background: #128c7e !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    text-decoration: none;
}

.btn-whatsapp i {
    font-size: 18px;
    margin-right: 8px;
}

/* Responsive WhatsApp CTA */
@media (max-width: 768px) {
    .whatsapp-cta-section {
        margin: 30px 0;
    }
    
    .btn-whatsapp {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
}