/* Voice360 Documentation & Knowledge Base Styles */

/* Docs Layout */
.docs-wrapper {
    display: flex;
    min-height: calc(100vh - 70px);
    background: #f8f9fa;
}

/* Sidebar */
.docs-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e2e8f0;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.sidebar-header {
    padding: 2rem 1.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-search {
    position: relative;
}

.sidebar-search input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.sidebar-search input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.sidebar-search i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* Sidebar Navigation */
.docs-nav {
    padding: 1.5rem 0;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.nav-section-title i {
    font-size: 0.625rem;
    transition: transform 0.3s ease;
}

.nav-section.collapsed .nav-section-title i {
    transform: rotate(-90deg);
}

.nav-links {
    margin-top: 0.5rem;
    transition: max-height 0.3s ease;
    overflow: hidden;
}

.nav-section.collapsed .nav-links {
    max-height: 0;
}

.nav-link {
    display: block;
    padding: 0.625rem 1.5rem 0.625rem 2.5rem;
    color: #475569;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
    background: #f8f9fa;
}

.nav-link.active {
    color: #667eea;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.nav-link-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    background: #10b981;
    color: white;
    border-radius: 10px;
    font-size: 0.625rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

/* Main Content */
.docs-main {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem;
}

.docs-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Breadcrumb */
.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: #64748b;
}

.docs-breadcrumb a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.docs-breadcrumb a:hover {
    color: #764ba2;
}

/* Documentation Typography */
.docs-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.docs-content .doc-description {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.docs-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #334155;
    margin: 2.5rem 0 1rem;
    padding-top: 1rem;
    position: relative;
}

.docs-content h2:hover .anchor-link {
    opacity: 1;
}

.anchor-link {
    position: absolute;
    left: -1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.anchor-link:hover {
    color: #667eea;
}

.docs-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #475569;
    margin: 2rem 0 0.75rem;
}

.docs-content p {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.docs-content ul,
.docs-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    color: #475569;
}

.docs-content li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

/* Code Blocks */
.code-block {
    background: #1e293b;
    border-radius: 12px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.code-header {
    background: #0f172a;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #334155;
}

.code-language {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 600;
}

.code-copy-btn {
    padding: 0.25rem 0.75rem;
    background: #334155;
    color: #e2e8f0;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-copy-btn:hover {
    background: #475569;
}

.code-copy-btn.copied {
    background: #10b981;
}

.code-content {
    padding: 1.5rem;
    overflow-x: auto;
}

.code-content pre {
    margin: 0;
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
}

.code-content code {
    font-family: 'Courier New', monospace;
}

/* Inline Code */
.docs-content code:not(pre code) {
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    color: #667eea;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Alert Boxes */
.alert {
    padding: 1.25rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
}

.alert-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-content {
    flex: 1;
}

.alert-content p {
    margin: 0;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.alert-info .alert-icon {
    color: #3b82f6;
}

.alert-warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert-warning .alert-icon {
    color: #f59e0b;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-success .alert-icon {
    color: #10b981;
}

.alert-danger {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-danger .alert-icon {
    color: #ef4444;
}

/* Tables */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #e2e8f0;
}

.docs-table thead {
    background: #f8f9fa;
}

.docs-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #334155;
    border-bottom: 2px solid #e2e8f0;
}

.docs-table td {
    padding: 1rem;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.docs-table tbody tr:hover {
    background: #f8f9fa;
}

.docs-table code {
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    color: #667eea;
    font-size: 0.875rem;
}

/* API Reference */
.api-endpoint {
    background: #f8f9fa;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.api-method {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.875rem;
    margin-right: 1rem;
}

.api-method.get {
    background: #dcfce7;
    color: #166534;
}

.api-method.post {
    background: #dbeafe;
    color: #1e40af;
}

.api-method.put {
    background: #fef3c7;
    color: #92400e;
}

.api-method.delete {
    background: #fee2e2;
    color: #991b1b;
}

.api-path {
    font-family: 'Courier New', monospace;
    color: #334155;
    font-weight: 600;
}

/* TOC - Table of Contents */
.docs-toc {
    width: 250px;
    position: sticky;
    top: 100px;
    height: fit-content;
    padding-left: 2rem;
}

.toc-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 1rem;
}

.toc-links {
    border-left: 2px solid #e2e8f0;
    padding-left: 1rem;
}

.toc-link {
    display: block;
    padding: 0.375rem 0;
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    margin-left: -1rem;
    padding-left: 1rem;
}

.toc-link:hover {
    color: #667eea;
}

.toc-link.active {
    color: #667eea;
    font-weight: 600;
    border-left-color: #667eea;
}

/* Navigation Footer */
.docs-nav-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.nav-footer-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    color: #475569;
    transition: all 0.3s ease;
}

.nav-footer-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
}

.nav-footer-link.prev i {
    order: -1;
}

/* Responsive */
@media (max-width: 1280px) {
    .docs-toc {
        display: none;
    }
}

@media (max-width: 768px) {
    .docs-wrapper {
        flex-direction: column;
    }

    .docs-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .docs-main {
        padding: 2rem 1rem;
    }

    .docs-content {
        padding: 2rem;
    }

    .docs-content h1 {
        font-size: 2rem;
    }
}