/* 
   Docs Hub Scoped Stylesheet - WordPress Embed
   Aesthetics: Notion + Linear + GitBook
   No global resets - restricted to .docs-viewer-embed container
*/

.docs-viewer-embed {
    /* Fonts */
    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;

    /* Light Theme Palette */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: #e0e7ff;
    --accent-rgb: 99, 102, 241;
    --code-bg: #f1f5f9;
    --code-text: #0f172a;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Light Callouts */
    --callout-note-bg: #eff6ff;
    --callout-note-border: #3b82f6;
    --callout-note-text: #1e40af;
    --callout-warning-bg: #fffbeb;
    --callout-warning-border: #f59e0b;
    --callout-warning-text: #854d0e;
    --callout-success-bg: #f0fdf4;
    --callout-success-border: #22c55e;
    --callout-success-text: #166534;
    --callout-info-bg: #faf5ff;
    --callout-info-border: #a855f7;
    --callout-info-text: #6b21a8;
    --callout-important-bg: #F5F3FF;
    --callout-important-border: #7C3AED;
    --callout-important-text: #4C1D95;

    display: flex;
    min-height: calc(100vh - 120px);
    width: 100%;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: background-color 0.3s ease, color 0.3s ease;
    border-top: 1px solid var(--border-color);
}

.docs-viewer-embed.dark-mode {
    /* Dark Theme Palette */
    --bg-primary: #090d16;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --border-color: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-color: #818cf8;
    --accent-hover: #6366f1;
    --accent-light: #1e1b4b;
    --accent-rgb: 129, 140, 248;
    --code-bg: #1e293b;
    --code-text: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);

    /* Dark Callouts */
    --callout-note-bg: #071e3d;
    --callout-note-border: #2563eb;
    --callout-note-text: #93c5fd;
    --callout-warning-bg: #3b2405;
    --callout-warning-border: #d97706;
    --callout-warning-text: #fde047;
    --callout-success-bg: #052e16;
    --callout-success-border: #16a34a;
    --callout-success-text: #86efac;
    --callout-info-bg: #2d134b;
    --callout-info-border: #9333ea;
    --callout-info-text: #f5d0fe;
    --callout-important-bg: #2E1065;
    --callout-important-border: #7C3AED;
    --callout-important-text: #DDD6FE;
}

/* Reading Progress Bar */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    z-index: 1000;
    transition: width 0.1s ease-out;
}

/* Scrollbar styles scoped to viewer container */
.docs-viewer-embed ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.docs-viewer-embed ::-webkit-scrollbar-track {
    background: transparent;
}
.docs-viewer-embed ::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
.docs-viewer-embed ::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Sidebar Styling */
.docs-viewer-embed .sidebar {
    width: 280px;
    border-right: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    position: sticky;
    top: 0;
    height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 32px 16px;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    z-index: 90;
    flex-shrink: 0;
}

.docs-viewer-embed .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.docs-viewer-embed .sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.docs-viewer-embed .sidebar-section-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding-left: 12px;
    margin-bottom: 4px;
}

.docs-viewer-embed .sidebar-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.docs-viewer-embed .sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.docs-viewer-embed .sidebar-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.docs-viewer-embed .sidebar-item.active {
    background-color: var(--accent-light);
    color: var(--accent-color);
    font-weight: 600;
}

.docs-viewer-embed.dark-mode .sidebar-item.active {
    background-color: rgba(var(--accent-rgb), 0.15);
    color: var(--accent-color);
}

.docs-viewer-embed .item-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.docs-viewer-embed .nav-loading {
    padding: 12px;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Content Area */
.docs-viewer-embed .content-wrapper {
    flex-grow: 1;
    padding: 48px 40px;
    max-width: 100%;
    overflow-x: hidden;
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: center;
}

.docs-viewer-embed .home-dashboard,
.docs-viewer-embed .article-viewer {
    width: 100%;
    max-width: 800px;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Home Dashboard Hero */
.docs-viewer-embed .dashboard-hero {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 32px;
}

.docs-viewer-embed .dashboard-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 12px;
}

.docs-viewer-embed .dashboard-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
}

/* Cards Grid */
.docs-viewer-embed .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.docs-viewer-embed .guide-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.docs-viewer-embed .guide-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.docs-viewer-embed .guide-card-top {
    margin-bottom: 24px;
}

.docs-viewer-embed .card-category {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: var(--accent-light);
    color: var(--accent-color);
    margin-bottom: 12px;
}

.docs-viewer-embed.dark-mode .card-category {
    background-color: rgba(var(--accent-rgb), 0.15);
}

.docs-viewer-embed .card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.docs-viewer-embed .card-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.docs-viewer-embed .guide-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.docs-viewer-embed .card-arrow {
    color: var(--accent-color);
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.docs-viewer-embed .guide-card:hover .card-arrow {
    transform: translateX(4px);
}

/* Breadcrumbs style */
.docs-viewer-embed .breadcrumbs {
    margin-bottom: 24px;
}

.docs-viewer-embed .breadcrumbs ol {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.docs-viewer-embed .breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.docs-viewer-embed .breadcrumbs a:hover {
    color: var(--text-primary);
}

.docs-viewer-embed .breadcrumbs svg {
    width: 12px;
    height: 12px;
    color: var(--text-muted);
}

.docs-viewer-embed .breadcrumbs .active {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Article Styling */
.docs-viewer-embed .article-header {
    margin-bottom: 32px;
}

.docs-viewer-embed .article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.docs-viewer-embed .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.docs-viewer-embed .meta-item svg {
    width: 14px;
    height: 14px;
}

/* Markdown Rendering Custom Styles */
.docs-viewer-embed .markdown-body {
    color: var(--text-primary);
    font-size: 1.0625rem;
    line-height: 1.75;
}

.docs-viewer-embed .markdown-body h1,
.docs-viewer-embed .markdown-body h2,
.docs-viewer-embed .markdown-body h3,
.docs-viewer-embed .markdown-body h4 {
    font-family: var(--font-display);
    color: var(--text-primary);
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    scroll-margin-top: 24px;
}

.docs-viewer-embed .markdown-body h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.docs-viewer-embed .markdown-body h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.docs-viewer-embed .markdown-body h3 {
    font-size: 1.25rem;
}

.docs-viewer-embed .markdown-body h4 {
    font-size: 1.125rem;
}

.docs-viewer-embed .markdown-body p {
    margin-bottom: 1.25rem;
}

/* Lists */
.docs-viewer-embed .markdown-body ul,
.docs-viewer-embed .markdown-body ol {
    margin-bottom: 1.25rem;
    padding-left: 24px;
}

.docs-viewer-embed .markdown-body li {
    margin-bottom: 0.5rem;
}

/* Styled Blockquotes */
.docs-viewer-embed .markdown-body blockquote {
    padding: 12px 24px;
    border-left: 4px solid var(--border-color);
    color: var(--text-secondary);
    font-style: italic;
    background-color: var(--bg-secondary);
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}

.docs-viewer-embed .markdown-body blockquote p:last-child {
    margin-bottom: 0;
}

/* Custom Callout Alert Styles */
.docs-viewer-embed .callout {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
    margin: 1.5rem 0;
}

.docs-viewer-embed .callout-icon {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    margin-top: 3px;
}

.docs-viewer-embed .callout-icon svg {
    width: 20px;
    height: 20px;
}

.docs-viewer-embed .callout-content {
    flex-grow: 1;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.docs-viewer-embed .callout-content p:last-child {
    margin-bottom: 0;
}

.docs-viewer-embed .callout-note {
    background-color: var(--callout-note-bg);
    border-left-color: var(--callout-note-border);
    color: var(--callout-note-text);
}
.docs-viewer-embed .callout-note svg { color: var(--callout-note-border); }

.docs-viewer-embed .callout-warning {
    background-color: var(--callout-warning-bg);
    border-left-color: var(--callout-warning-border);
    color: var(--callout-warning-text);
}
.docs-viewer-embed .callout-warning svg { color: var(--callout-warning-border); }

.docs-viewer-embed .callout-success {
    background-color: var(--callout-success-bg);
    border-left-color: var(--callout-success-border);
    color: var(--callout-success-text);
}
.docs-viewer-embed .callout-success svg { color: var(--callout-success-border); }

.docs-viewer-embed .callout-info {
    background-color: var(--callout-info-bg);
    border-left-color: var(--callout-info-border);
    color: var(--callout-info-text);
}
.docs-viewer-embed .callout-info svg { color: var(--callout-info-border); }

.docs-viewer-embed .callout-important {
    background-color: var(--callout-important-bg);
    border-left-color: var(--callout-important-border);
    color: var(--callout-important-text);
}
.docs-viewer-embed .callout-important svg { color: var(--callout-important-border); }

/* Code Syntax Styling */
.docs-viewer-embed .markdown-body pre {
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    position: relative;
}

/* Copy button wrapper and pre hover state */
.docs-viewer-embed .code-block-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.docs-viewer-embed .code-block-wrapper pre {
    margin-bottom: 0;
}

.docs-viewer-embed .copy-code-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.docs-viewer-embed .code-block-wrapper:hover .copy-code-btn {
    opacity: 1;
}

.docs-viewer-embed .copy-code-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.docs-viewer-embed .copy-code-btn svg {
    width: 14px;
    height: 14px;
}

.docs-viewer-embed .markdown-body code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    padding: 2px 6px;
    background-color: var(--code-bg);
    color: var(--code-text);
    border-radius: 4px;
}

.docs-viewer-embed .markdown-body pre code {
    padding: 0;
    background-color: transparent;
    color: inherit;
    border-radius: 0;
    font-size: 0.9rem;
}

/* Inline checkbox styled lists */
.docs-viewer-embed .markdown-body input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--accent-color);
    cursor: pointer;
    vertical-align: middle;
    width: 16px;
    height: 16px;
}

.docs-viewer-embed .markdown-body ul li:has(input[type="checkbox"]) {
    list-style: none;
    margin-left: -20px;
}

/* Styled Tables */
.docs-viewer-embed .table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.docs-viewer-embed .markdown-body table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9375rem;
}

.docs-viewer-embed .markdown-body th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
}

.docs-viewer-embed .markdown-body td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.docs-viewer-embed .markdown-body tr:last-child td {
    border-bottom: none;
}

.docs-viewer-embed .markdown-body tr:hover td {
    background-color: rgba(var(--accent-rgb), 0.02);
}

/* Images & Zoom */
.docs-viewer-embed .markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin: 1.5rem auto;
    display: block;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.docs-viewer-embed .markdown-body img:hover {
    transform: scale(1.005);
}

/* Horizontal Rule */
.docs-viewer-embed .markdown-body hr {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 2rem 0;
}

/* Text Search Highlighting */
.docs-viewer-embed .search-highlight {
    background-color: rgba(253, 224, 71, 0.4);
    border-bottom: 2px solid #eab308;
    color: inherit;
    border-radius: 2px;
}

.docs-viewer-embed.dark-mode .search-highlight {
    background-color: rgba(234, 179, 8, 0.35);
    border-bottom: 2px solid #facc15;
}

/* Previous/Next Navigation */
.docs-viewer-embed .article-navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    border-top: 1px solid var(--border-color);
    padding-top: 32px;
}

.docs-viewer-embed .nav-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    background-color: var(--bg-primary);
}

.docs-viewer-embed .nav-button:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
    background-color: var(--bg-secondary);
}

.docs-viewer-embed .prev-button {
    align-items: flex-start;
}

.docs-viewer-embed .next-button {
    align-items: flex-end;
    text-align: right;
}

.docs-viewer-embed .nav-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.docs-viewer-embed .nav-label svg {
    width: 12px;
    height: 12px;
}

.docs-viewer-embed .nav-title {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Related Resources Section */
.docs-viewer-embed .related-resources {
    margin-top: 48px;
    border-top: 1px solid var(--border-color);
    padding-top: 32px;
}

.docs-viewer-embed .related-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.docs-viewer-embed .related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.docs-viewer-embed .related-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    text-decoration: none;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    transition: all 0.2s;
}

.docs-viewer-embed .related-card:hover {
    border-color: var(--accent-color);
    background-color: var(--bg-primary);
}

.docs-viewer-embed .related-card-title {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
}

.docs-viewer-embed .related-card-category {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
}

/* Right-Hand Sticky Sidebar */
.docs-viewer-embed .right-aside {
    width: 260px;
    position: sticky;
    top: 0;
    height: calc(100vh - 120px);
    padding: 32px 24px;
    border-left: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    flex-shrink: 0;
    overflow-y: auto;
}

.docs-viewer-embed .sticky-aside-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.docs-viewer-embed .aside-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.docs-viewer-embed .action-btn {
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.docs-viewer-embed .action-btn svg {
    width: 16px;
    height: 16px;
}

.docs-viewer-embed .primary-action {
    background-color: var(--accent-color);
    color: white;
    border: none;
    box-shadow: var(--shadow-sm);
}

.docs-viewer-embed .primary-action:hover {
    background-color: var(--accent-hover);
}

.docs-viewer-embed .secondary-action {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.docs-viewer-embed .secondary-action:hover {
    background-color: var(--bg-tertiary);
}

.docs-viewer-embed .toc-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.docs-viewer-embed .toc-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.docs-viewer-embed .toc-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-left: 1px solid var(--border-color);
}

.docs-viewer-embed .toc-link {
    display: block;
    padding: 6px 16px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.4;
    transition: all 0.2s;
    margin-left: -1px;
    border-left: 1px solid transparent;
}

.docs-viewer-embed .toc-link:hover {
    color: var(--text-primary);
}

.docs-viewer-embed .toc-link.active {
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    font-weight: 500;
}

.docs-viewer-embed .toc-link.indent-3 {
    padding-left: 28px;
}
.docs-viewer-embed .toc-link.indent-4 {
    padding-left: 40px;
}

/* Modals & Overlay Style */
.docs-viewer-embed .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.docs-viewer-embed .modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.docs-viewer-embed .modal-content {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    padding: 32px;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.docs-viewer-embed .modal-overlay:not(.hidden) .modal-content {
    transform: translateY(0);
}

.docs-viewer-embed .modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.docs-viewer-embed .modal-close-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.docs-viewer-embed .modal-close-btn svg {
    width: 18px;
    height: 18px;
}

.docs-viewer-embed .modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.docs-viewer-embed .modal-icon-container {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: var(--accent-light);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.docs-viewer-embed.dark-mode .modal-icon-container {
    background-color: rgba(var(--accent-rgb), 0.15);
}

.docs-viewer-embed .modal-icon-container svg {
    width: 24px;
    height: 24px;
}

.docs-viewer-embed .modal-title {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.docs-viewer-embed .modal-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.docs-viewer-embed .modal-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.docs-viewer-embed .input-group {
    position: relative;
    width: 100%;
}

.docs-viewer-embed .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
}

.docs-viewer-embed #subscriber-email {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    outline: none;
    transition: all 0.2s;
}

.docs-viewer-embed #subscriber-email:focus {
    border-color: var(--accent-color);
    background-color: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.docs-viewer-embed .modal-submit-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.docs-viewer-embed .modal-submit-btn:hover {
    background-color: var(--accent-hover);
}

.docs-viewer-embed .modal-submit-btn svg {
    width: 16px;
    height: 16px;
}

.docs-viewer-embed .modal-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Floating Share Popover */
.docs-viewer-embed .share-popover {
    position: fixed;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 180px;
    padding: 12px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: scaleIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.docs-viewer-embed .share-popover-title {
    font-family: var(--font-display);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 4px 8px;
    margin-bottom: 4px;
}

.docs-viewer-embed .share-link-btn {
    width: 100%;
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    text-align: left;
}

.docs-viewer-embed .share-link-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.docs-viewer-embed .share-link-btn svg {
    width: 14px;
    height: 14px;
}

/* Lightbox Image Zoom */
.docs-viewer-embed .zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(9, 13, 22, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: zoom-out;
}

.docs-viewer-embed .zoom-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.docs-viewer-embed .zoom-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.docs-viewer-embed .zoom-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.docs-viewer-embed .zoom-close-btn svg {
    width: 20px;
    height: 20px;
}

/* Specific display: none !important overrides for elements with hidden class */
.docs-viewer-embed .zoom-overlay.hidden,
.docs-viewer-embed .modal-overlay.hidden,
.docs-viewer-embed .share-popover.hidden,
.docs-viewer-embed .hidden {
    display: none !important;
}

/* Responsive Breakpoints */

/* Mobile view (< 768px) */
@media (max-width: 768px) {
    .docs-viewer-embed .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        height: 100vh;
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
        background-color: var(--bg-primary);
    }

    .docs-viewer-embed .sidebar.open {
        transform: translateX(0);
    }

    .docs-viewer-embed .content-wrapper {
        padding: 24px 16px;
    }

    .docs-viewer-embed .right-aside {
        display: none;
    }

    .docs-viewer-embed .dashboard-title {
        font-size: 2rem;
    }

    .docs-viewer-embed .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .docs-viewer-embed .article-navigation {
        flex-direction: column;
    }

    .docs-viewer-embed .nav-button {
        width: 100%;
    }
}

/* Medium screen layouts (768px - 1100px) */
@media (min-width: 769px) and (max-width: 1100px) {
    .docs-viewer-embed .right-aside {
        display: none;
    }
}

/* Custom Highlight.js spacing override */
.docs-viewer-embed pre code.hljs {
    padding: 0;
}
.docs-viewer-embed .hljs {
    background: transparent !important;
}

/* Mobile Actions Layout styling */
.docs-viewer-embed .mobile-actions {
    display: none;
    margin-top: 20px;
    width: 100%;
}

@media (max-width: 1100px) {
    .docs-viewer-embed .mobile-actions {
        display: block;
    }
}

