/* VB Single Doc Template - Documentation Style */

/* Remove all top spacing on docs pages */
body.single-docs,
body.post-type-archive-docs {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.single-docs .fl-content,
body.post-type-archive-docs .fl-content,
body.single-docs main,
body.post-type-archive-docs main,
body.single-docs article,
body.post-type-archive-docs article {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Hide theme header on docs pages - but NOT our VB docs header */
body.single-docs header:not(.vb-docs-header),
body.single-docs .header:not(.vb-docs-header),
body.single-docs .site-header,
body.single-docs .fl-theme-builder-header,
body.single-docs .fl-theme-builder-header-sticky,
body.post-type-archive-docs header:not(.vb-docs-header),
body.post-type-archive-docs .header:not(.vb-docs-header),
body.post-type-archive-docs .site-header,
body.post-type-archive-docs .fl-theme-builder-header,
body.post-type-archive-docs .fl-theme-builder-header-sticky,
.vb-doc-page ~ header:not(.vb-docs-header),
header.entry-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Ensure our VB docs header ALWAYS shows - most important rule */
.vb-docs-header,
header.vb-docs-header {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    z-index: 10000 !important;
}

/* Force on all Beaver Builder states */
.fl-builder-edit .vb-docs-header,
.fl-builder-preview .vb-docs-header,
.fl-builder .vb-docs-header,
body.single-docs .vb-docs-header,
body.post-type-archive-docs .vb-docs-header,
body .vb-docs-header {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.vb-doc-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: #ffffff;
    margin-top: 0 !important;
    padding-top: 0 !important;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

/* Container */
.vb-single-doc-content .vb-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Doc Header */
.vb-single-doc-header {
    padding: 0 0 24px 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 32px;
    margin-top: 32px;
}

.vb-doc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    font-size: 13px;
}

.vb-doc-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.vb-doc-breadcrumb a:hover {
    color: #1a472a;
}

.vb-breadcrumb-separator {
    color: #d1d5db;
}

.vb-single-doc-header h1 {
    font-size: 40px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #111827;
    margin: 0 0 12px;
    max-width: 100%;
}

.vb-doc-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
}

/* Doc Layout */
.vb-single-doc-content {
    padding: 0;
    margin-top: 0 !important;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    min-height: calc(100vh - 72px);
}

.vb-doc-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 0;
    align-items: start;
    min-height: calc(100vh - 72px);
}

/* Left Sidebar - Doc Navigation */
.vb-doc-left-sidebar {
    position: sticky;
    top: 0;
    padding: 40px 0;
    border-right: 1px solid #e5e7eb;
    background: #fafafa;
    align-self: stretch;
    min-height: calc(100vh - 72px);
}

.vb-doc-nav-section {
    margin-bottom: 40px;
}

.vb-doc-nav-section:last-child {
    margin-bottom: 0;
}

.vb-doc-nav-section h4 {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9ca3af;
    margin: 0 0 16px;
    padding: 0 32px;
}

.vb-doc-nav-category-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: color 0.2s;
}

.vb-doc-nav-category-toggle:hover {
    color: #6b7280;
}

.vb-doc-nav-category-toggle .vb-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.vb-doc-nav-section.collapsed .vb-chevron {
    transform: rotate(-90deg);
}

.vb-doc-nav-section.collapsed ul {
    display: none;
}

.vb-doc-nav-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vb-doc-nav-section li {
    margin: 0;
}

.vb-doc-nav-section a {
    display: block;
    padding: 10px 32px;
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.vb-doc-nav-section a:hover {
    color: #111827;
    background: #f3f4f6;
}

.vb-doc-nav-section a.active {
    color: #1a472a;
    background: #ffffff;
    border-left-color: #1a472a;
    font-weight: 600;
}

/* Right Sidebar - TOC */
.vb-doc-sidebar {
    position: sticky;
    top: 0;
    padding: 40px 48px;
    border-left: 1px solid #e5e7eb;
    background: #ffffff;
    align-self: stretch;
    min-height: calc(100vh - 72px);
}

.vb-doc-toc h4 {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9ca3af;
    margin: 0 0 20px;
}

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

.vb-doc-toc li {
    margin-bottom: 14px;
}

.vb-doc-toc li.vb-toc-sub {
    padding-left: 16px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.vb-doc-toc a {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    transition: color 0.2s;
    display: block;
}

.vb-doc-toc a:hover {
    color: #1a472a;
}

.vb-doc-toc a.active {
    color: #1a472a;
    font-weight: 600;
    border-left: 2px solid #1a472a;
    padding-left: 8px;
    margin-left: -8px;
}

.vb-doc-related {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
}

.vb-doc-related h4 {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9ca3af;
    margin: 0 0 20px;
}

.vb-doc-related ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vb-doc-related li {
    margin-bottom: 14px;
}

.vb-doc-related a {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    transition: color 0.2s;
    display: block;
}

.vb-doc-related a:hover {
    color: #1a472a;
}

/* Signup CTA in sidebar */
.vb-doc-signup-cta {
    margin-top: 48px;
    padding: 24px;
    background: linear-gradient(135deg, #1a472a 0%, #059669 100%);
    border-radius: 8px;
    text-align: center;
}

.vb-doc-signup-cta h4 {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px;
    text-transform: none;
    letter-spacing: normal;
}

.vb-doc-signup-cta p {
    font-size: 13px;
    line-height: 1.5;
    color: #d9f2dc;
    margin: 0 0 16px;
}

.vb-doc-signup-cta-btn {
    display: inline-block;
    width: 100%;
    padding: 10px 20px;
    background: #ffffff;
    color: #1a472a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s;
}

.vb-doc-signup-cta-btn:hover {
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vb-doc-signup-cta .vb-cta-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #ffffff;
    margin-bottom: 6px;
    text-align: left;
}

.vb-doc-signup-cta .vb-cta-feature svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: #4caf50;
}

.vb-doc-signup-cta .vb-cta-features {
    margin-bottom: 16px;
}

/* Main Content */
.vb-doc-main {
    max-width: 800px;
    padding: 40px 64px 80px 64px;
}

/* Video Embed */
.vb-doc-video {
    margin-bottom: 32px;
}

.vb-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
}

.vb-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.vb-doc-content {
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
}

.vb-doc-content h2 {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #111827;
    margin: 48px 0 16px;
    padding-top: 0;
    border-top: none;
}

.vb-doc-content h2:first-child {
    margin-top: 0;
}

.vb-doc-content h3 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: #111827;
    margin: 32px 0 12px;
}

.vb-doc-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 24px 0 8px;
}

.vb-doc-content p {
    margin: 0 0 16px;
}

.vb-doc-content ul {
    margin: 0 0 20px;
    padding-left: 24px;
    color: #4b5563;
}

.vb-doc-content ul li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Enhanced numbered lists with green circles */
.vb-doc-content ol {
    counter-reset: custom-counter;
    list-style: none;
    padding-left: 0;
    margin-left: 0;
    margin-top: 20px;
    margin-bottom: 20px;
}

.vb-doc-content ol li {
    counter-increment: custom-counter;
    position: relative;
    padding-left: 50px;
    margin-bottom: 1em;
    line-height: 1.5;
}

.vb-doc-content ol li::before {
    content: counter(custom-counter);
    position: absolute;
    left: 0;
    top: -4px;
    background-color: #d9f2dc;
    color: #008215;
    font-weight: bold;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.vb-doc-content a {
    color: #1a472a;
    text-decoration: none;
    transition: color 0.15s;
}

.vb-doc-content a:hover {
    color: #059669;
}

.vb-doc-content code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: #111827;
    border: 1px solid #e5e7eb;
}

.vb-doc-content pre {
    background: #f7f7f8;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 16px;
    font-size: 14px;
    overflow-x: auto;
    position: relative;
    margin: 24px 0;
    max-width: 100%;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.vb-doc-content pre code {
    background: none;
    padding: 0;
    color: #24292e;
    font-size: 13px;
    line-height: 1.5;
    border: none;
}

.vb-doc-content .copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #4caf50;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 13px;
    height: 32px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
    z-index: 10;
}

.vb-doc-content .copy-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.vb-doc-content .copy-btn:hover {
    background: #43a047;
}

.vb-doc-content .copy-btn.copied {
    background: #1a472a;
}

.vb-doc-content blockquote {
    border-left: 3px solid #1a472a;
    padding-left: 16px;
    margin: 20px 0;
    font-style: normal;
    color: #4b5563;
    background: #f0fdf4;
    padding: 12px 16px;
    border-radius: 4px;
}

.vb-doc-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 24px 0;
    border: 1px solid #e3e8ee;
}

.vb-doc-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}

.vb-doc-content table th,
.vb-doc-content table td {
    padding: 12px 16px;
    border: 1px solid #e3e8ee;
    text-align: left;
}

.vb-doc-content table th {
    background: #f6f9fc;
    font-weight: 600;
    color: #0a2540;
}

/* Helpful Section */
.vb-doc-helpful {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e3e8ee;
}

.vb-doc-helpful p {
    font-size: 14px;
    font-weight: 500;
    color: #0a2540;
    margin: 0 0 12px;
}

.vb-doc-helpful-buttons {
    display: flex;
    gap: 8px;
}

.vb-helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e3e8ee;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #425466;
    cursor: pointer;
    transition: all 0.15s;
}

.vb-helpful-btn:hover {
    background: #f0fdf4;
    border-color: #1a472a;
    color: #1a472a;
}

.vb-helpful-btn svg {
    width: 16px;
    height: 16px;
}

/* Navigation */
.vb-doc-navigation {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e3e8ee;
}

.vb-doc-nav-link {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e3e8ee;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}

.vb-doc-nav-link:hover {
    background: #f0fdf4;
    border-color: #1a472a;
    box-shadow: 0 2px 4px rgba(26, 71, 42, 0.08);
}

.vb-doc-nav-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #8792a2;
    margin-bottom: 6px;
}

.vb-doc-nav-title {
    font-size: 14px;
    font-weight: 500;
    color: #0a2540;
    line-height: 1.4;
}

.vb-doc-nav-next {
    text-align: right;
}

/* Help CTA */
.vb-doc-help-cta {
    padding: 64px 0;
    background: #f6f9fc;
    border-top: 1px solid #e3e8ee;
}

.vb-doc-help-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    padding: 0 40px;
}

.vb-doc-help-cta h2 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #0a2540;
    margin: 0 0 12px;
}

.vb-doc-help-cta p {
    font-size: 15px;
    line-height: 1.6;
    color: #425466;
    margin: 0 0 24px;
}

.vb-doc-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: #1a472a;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s;
}

.vb-doc-help-btn:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(26, 71, 42, 0.3);
}

/* Responsive */
@media (max-width: 1200px) {
    .vb-single-doc-content {
        grid-template-columns: 220px 1fr;
    }

    .vb-doc-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .vb-doc-sidebar {
        position: static;
        border-left: none;
        border-top: 1px solid #e3e8ee;
        padding: 24px 40px;
        display: block;
    }

    .vb-doc-main {
        padding: 32px 40px 40px;
    }
}

@media (max-width: 1024px) {
    /* Hide left sidebar on mobile/tablet, show as overlay */
    .vb-doc-left-sidebar {
        position: fixed;
        top: 72px;
        left: -280px;
        width: 280px;
        height: calc(100vh - 72px);
        overflow-y: auto;
        background: #fafafa;
        z-index: 999;
        transition: left 0.3s ease;
        border-right: 1px solid #e5e7eb;
    }

    .vb-doc-left-sidebar.mobile-open {
        left: 0;
    }

    .vb-doc-nav-section {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .vb-doc-left-sidebar {
        top: 56px;
        height: calc(100vh - 56px);
    }

    .vb-single-doc-content {
        grid-template-columns: 1fr;
    }

    .vb-doc-layout {
        grid-template-columns: 1fr;
    }

    /* Show right sidebar content below on mobile */
    .vb-doc-sidebar {
        position: static;
        border-left: none;
        border-top: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
        padding: 24px 20px;
        order: 1; /* Move to bottom after content */
        background: #fafafa;
    }

    .vb-doc-main {
        padding: 24px 20px 40px;
    }

    .vb-single-doc-header {
        padding: 0 0 24px 0;
        margin-top: 20px;
    }

    .vb-single-doc-header h1 {
        font-size: 28px;
    }

    .vb-doc-content h2 {
        font-size: 22px;
    }

    .vb-doc-content h3 {
        font-size: 18px;
    }

    .vb-doc-navigation {
        grid-template-columns: 1fr;
    }

    .vb-doc-nav-next {
        text-align: left;
    }

    .vb-doc-help-cta {
        padding: 48px 0;
    }

    .vb-doc-help-content {
        padding: 0 20px;
    }

    .vb-doc-help-cta h2 {
        font-size: 20px;
    }

    /* Mobile overlay backdrop */
    .vb-mobile-overlay {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }

    .vb-mobile-overlay.active {
        display: block;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .vb-mobile-overlay {
        top: 72px;
    }
}


