/**
 * Webtron Docs Frontend Styles
 * Sidebar navigation, breadcrumbs, and table of contents
 */

/* ==========================================================================
   CSS Variables - Design Tokens
   ========================================================================== */

:root {
    /* Primary Colors */
    --docs-primary: #3b82f6;
    --docs-primary-dark: #1d4ed8;
    --docs-primary-light: #60a5fa;
    --docs-success: #22c55e;
    --docs-warning: #f59e0b;
    --docs-danger: #ef4444;
    --docs-muted: #9ca3af;
    
    /* Text Colors */
    --docs-text-primary: #111827;
    --docs-text-secondary: #6b7280;
    --docs-text-muted: #9ca3af;
    
    /* TOC Specific */
    --docs-toc-bg: #f9fafb;
    --docs-toc-border: #e5e7eb;
    --docs-toc-title-color: #6b7280;
    --docs-toc-link-color: #6b7280;
    --docs-toc-link-hover: #374151;
    --docs-toc-link-active: #1d4ed8;
    --docs-toc-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    
    /* Switch/Toggle */
    --docs-switch-bg: #d1d5db;
    --docs-switch-active: #22c55e;
    
    /* Navigation */
    --docs-nav-bg: #ffffff;
    --docs-nav-border: #e5e7eb;
    --docs-nav-link-color: #4b5563;
    --docs-nav-link-hover-bg: #f3f4f6;
    --docs-nav-link-hover-color: #111827;
    --docs-nav-link-active-color: #1d4ed8;
    --docs-nav-link-active-bg: rgba(59, 130, 246, 0.1);
    --docs-nav-tree-line: rgba(0, 0, 0, 0.08);
    
    /* Breadcrumbs */
    --docs-breadcrumb-separator: #9ca3af;
    --docs-breadcrumb-link: #6b7280;
    --docs-breadcrumb-link-hover: #374151;
    --docs-breadcrumb-current: #111827;
    
    /* Tooltips */
    --docs-tooltip-bg: #1f2937;
    --docs-tooltip-color: #ffffff;
}

/* Dark Mode Variables */
body.dark-mode,
body.body_dark {
    --docs-toc-bg: #1f2937;
    --docs-toc-border: #374151;
    --docs-toc-title-color: #9ca3af;
    --docs-toc-link-color: #9ca3af;
    --docs-toc-link-hover: #e5e7eb;
    --docs-toc-link-active: #60a5fa;
    --docs-toc-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    
    --docs-switch-bg: #4b5563;
    
    --docs-nav-bg: #1f2937;
    --docs-nav-border: #374151;
    --docs-nav-link-color: #d1d5db;
    --docs-nav-link-hover-bg: #374151;
    --docs-nav-link-hover-color: #f9fafb;
    --docs-nav-link-active-color: #60a5fa;
    --docs-nav-link-active-bg: rgba(96, 165, 250, 0.15);
    --docs-nav-tree-line: rgba(255, 255, 255, 0.1);
    
    --docs-tooltip-bg: #374151;
    --docs-tooltip-color: #f9fafb;
}

/* ==========================================================================
   Layout Container - CSS Grid 3-Column Layout
   ========================================================================== */

/* Break out of any parent constraints */
.webtron-docs-layout {
    display: grid !important;
    grid-template-columns: 260px minmax(0, 1fr) 220px;
    grid-template-areas: "sidebar content toc";
    gap: 32px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
    align-items: start;
    box-sizing: border-box;
}

/* Assign grid areas */
.webtron-docs-layout > .webtron-docs-sidebar {
    grid-area: sidebar;
}

.webtron-docs-layout > .webtron-docs-content {
    grid-area: content;
    min-width: 0;
    width: 100%;
}

.webtron-docs-layout > .webtron-docs-toc-wrapper {
    grid-area: toc;
}

/* Collapsed sidebar state - content expands */
.webtron-docs-layout.sidebar-collapsed {
    grid-template-columns: 56px minmax(0, 1fr) 220px;
    transition: grid-template-columns 0.3s ease;
}

/* Two column layout (no TOC) */
.webtron-docs-layout.two-column {
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-areas: "sidebar content";
    max-width: 1200px;
}

.webtron-docs-layout.two-column.sidebar-collapsed {
    grid-template-columns: 56px minmax(0, 1fr);
}

/* Single column layout (no sidebar or TOC) */
.webtron-docs-layout.single-column {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "content";
    max-width: 900px;
}

/* Body class based layouts */
body.webtron-docs-no-sidebar .webtron-docs-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    grid-template-areas: "content toc";
}

body.webtron-docs-no-sidebar .webtron-docs-layout > .webtron-docs-sidebar {
    display: none;
}

body.webtron-docs-no-toc .webtron-docs-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-areas: "sidebar content";
}

body.webtron-docs-no-toc .webtron-docs-layout > .webtron-docs-toc-wrapper {
    display: none;
}

body.webtron-docs-no-sidebar.webtron-docs-no-toc .webtron-docs-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "content";
    max-width: 900px;
}

/* Responsive Grid */
@media screen and (max-width: 1200px) {
    .webtron-docs-layout {
        grid-template-columns: 240px minmax(0, 1fr) 200px;
    }
    
    .webtron-docs-layout.sidebar-collapsed {
        grid-template-columns: 56px minmax(0, 1fr) 200px;
    }
}

@media screen and (max-width: 1024px) {
    .webtron-docs-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        grid-template-areas: "sidebar content";
    }
    
    .webtron-docs-layout.sidebar-collapsed {
        grid-template-columns: 56px minmax(0, 1fr);
    }
    
    .webtron-docs-layout > .webtron-docs-toc-wrapper {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .webtron-docs-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "content";
        padding: 16px;
        gap: 24px;
    }
    
    .webtron-docs-layout > .webtron-docs-sidebar {
        display: none;
    }
}

/* Override block theme constraints */
body.single-docs .wp-site-blocks {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.single-docs .wp-site-blocks > * {
    max-width: none !important;
}

/* Override WordPress container layout constraints for docs pages */
body.single-docs .docs-single-page,
body.single-docs .docs-single-page > .wp-block-columns,
body.single-docs [class*="wp-container-core-group-is-layout"],
body.single-docs [class*="wp-container-core-columns-is-layout"] {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.single-docs .docs-single-page {
    padding-left: 24px !important;
    padding-right: 24px !important;
}

body.single-docs .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ==========================================================================
   Block Template Column Overrides (for wp-block-columns layout)
   ========================================================================== */

/* Base column sizing */
.docs-single-page .wp-block-columns {
    flex-wrap: nowrap !important;
    align-items: stretch !important; /* Stretch so sticky works within full-height columns */
}

.docs-sidebar-column {
    flex-basis: 300px !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    width: 300px !important;
    min-width: 300px !important;
    transition: flex-basis 0.3s ease, width 0.3s ease, min-width 0.3s ease;
    align-self: stretch !important;
}

.docs-content-column {
    flex-basis: 0 !important;
    flex-grow: 1 !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    width: auto !important;
}

.docs-toc-column {
    flex-basis: 220px !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    width: 220px !important;
    min-width: 220px !important;
    align-self: stretch !important;
}

/* Collapsed sidebar state - sidebar shrinks, content expands */
.docs-single-page.sidebar-collapsed .docs-sidebar-column {
    flex-basis: 56px !important;
    width: 56px !important;
    min-width: 56px !important;
}

/* Content column naturally expands due to flex-grow: 1 */

/* Responsive - hide TOC on smaller screens */
@media screen and (max-width: 1024px) {
    .docs-toc-column {
        display: none !important;
    }
}

/* Responsive - mobile single column */
@media screen and (max-width: 768px) {
    .docs-single-page .wp-block-columns {
        flex-direction: column !important;
    }
    
    .docs-sidebar-column {
        display: none !important;
    }
    
    .docs-content-column {
        flex-basis: 100% !important;
        width: 100% !important;
    }
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */

.webtron-docs-sidebar {
    background: var(--docs-sidebar-bg, #f9fafb);
    padding: 0;
    border: 1px solid var(--docs-sidebar-border, #e5e7eb);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    transition: padding 0.3s ease;
}

/* Sidebar Header - Combined toggle and search with liquid glass background */
.webtron-docs-sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.webtron-docs-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: background-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.webtron-docs-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.95);
}

/* Sidebar Search Button - combined in header */
.webtron-docs-sidebar-search-btn {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    transition: all 0.2s ease;
}

.webtron-docs-sidebar-search-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.95);
}

.webtron-docs-sidebar-search-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
}

.webtron-docs-sidebar-search-btn svg,
.webtron-docs-sidebar-search-btn i {
    flex-shrink: 0;
    opacity: 0.8;
}

.webtron-docs-sidebar-search-btn span {
    flex: 1;
    text-align: left;
    opacity: 0.8;
}

.webtron-docs-sidebar-search-btn kbd {
    display: inline-block;
    font-family: inherit;
    font-size: 10px;
    line-height: 1.3;
    padding: 2px 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
}

/* Collapsed Sidebar */
.webtron-docs-sidebar.collapsed {
    width: 56px;
    padding: 8px;
}

.webtron-docs-sidebar.collapsed .webtron-docs-sidebar-header {
    flex-direction: column;
    padding: 8px;
}

.webtron-docs-sidebar.collapsed .webtron-docs-sidebar-search-btn,
.webtron-docs-sidebar.collapsed .webtron-docs-sidebar-nav {
    display: none;
}

.webtron-docs-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.webtron-docs-nav-item {
    margin: 0;
}

.webtron-docs-nav-item:last-child {
    /* No special border handling needed - borders are on link-wrapper */
}

/* Parent items with children - section header style */
.webtron-docs-nav-item.has-children > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-link {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--docs-nav-section-color, #6b7280);
    padding: 10px 8px 6px;
    background: none;
}

.webtron-docs-nav-item.has-children > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-link:hover {
    color: var(--docs-nav-section-hover, #374151);
    background: none;
}

.webtron-docs-nav-link-wrapper {
    display: flex;
    align-items: center;
    padding: 2px 8px;
    margin: 0;
    border-radius: 0;
    border-top: 1px solid var(--docs-nav-divider, rgba(0, 0, 0, 0.06));
    border-bottom: 1px solid var(--docs-nav-divider, rgba(0, 0, 0, 0.06));
    margin-top: -1px; /* Collapse adjacent borders */
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.webtron-docs-nav-link-wrapper:first-child {
    margin-top: 0;
}

.webtron-docs-nav-link-wrapper:hover {
    background-color: var(--docs-nav-wrapper-hover-bg, rgba(0, 0, 0, 0.04));
}

.webtron-docs-nav-toggle {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    background: var(--docs-nav-toggle-bg, rgba(0, 0, 0, 0.06));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--docs-nav-toggle-color, #4b5563);
    transition: transform 0.2s ease, color 0.2s ease, background-color 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
    margin-left: 4px;
}

.webtron-docs-nav-toggle:hover {
    color: var(--docs-nav-toggle-hover, #111827);
    background: var(--docs-nav-toggle-hover-bg, rgba(0, 0, 0, 0.1));
    border-color: rgba(0, 0, 0, 0.2);
}

.webtron-docs-nav-toggle[aria-expanded="false"] {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.25);
    color: #3b82f6;
}

.webtron-docs-nav-toggle[aria-expanded="false"]:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #2563eb;
}

.webtron-docs-nav-toggle[aria-expanded="true"] {
    transform: rotate(180deg);
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #16a34a;
}

.webtron-docs-nav-toggle[aria-expanded="true"]:hover {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.45);
    color: #15803d;
}

.webtron-docs-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    color: var(--docs-nav-link-color, #374151);
    text-decoration: none;
    font-size: 15px;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    flex: 1;
    border-left: 2px solid transparent;
    margin-left: 2px;
}

.webtron-docs-nav-link:hover {
    background-color: var(--docs-nav-link-hover-bg, rgba(0, 0, 0, 0.04));
    color: var(--docs-nav-link-hover-color, #111827);
}

.webtron-docs-nav-item.current > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-link {
    background-color: var(--docs-nav-current-bg, rgba(59, 130, 246, 0.08));
    color: var(--docs-nav-current-color, #1d4ed8);
    font-weight: 500;
    border-left-color: var(--docs-nav-current-color, #1d4ed8);
}

.webtron-docs-nav-item.current-ancestor > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-link {
    color: var(--docs-nav-ancestor-color, #374151);
    font-weight: 500;
    background-color: var(--docs-nav-ancestor-bg, rgba(59, 130, 246, 0.03));
}

/* Visual connector line for first-level children only */
.webtron-docs-nav-item.current-ancestor > .webtron-docs-nav-children {
    border-left-color: var(--docs-nav-ancestor-line, rgba(59, 130, 246, 0.3));
}

/* Remove border from grandchildren nav-children */
.webtron-docs-nav-children .webtron-docs-nav-children {
    border-left: none;
}

/* Section styling (root-level docs with custom colors) */
.webtron-docs-nav-item.is-section {
    margin-top: 0;
    padding-top: 0;
}

.webtron-docs-nav-item.is-section:first-child {
    margin-top: 0;
}

.webtron-docs-nav-item.is-section > .webtron-docs-nav-link-wrapper {
    background-color: var(--section-bg-color, transparent);
    padding: 4px 8px;
    margin: 0;
}

.webtron-docs-nav-item.is-section > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-link {
    color: var(--section-text-color, var(--docs-nav-section-color, #6b7280));
}

.webtron-docs-nav-item.is-section > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-link:hover {
    color: var(--section-text-color, var(--docs-nav-section-hover, #374151));
    opacity: 0.85;
}

.webtron-docs-nav-item.is-section > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-toggle {
    color: var(--section-text-color, var(--docs-nav-toggle-color, #6b7280));
    background: rgba(255, 255, 255, 0.15);
}

.webtron-docs-nav-item.is-section > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-toggle:hover {
    color: var(--section-text-color, var(--docs-nav-toggle-hover, #111827));
    background: rgba(255, 255, 255, 0.25);
}

.webtron-docs-nav-item.is-section > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-link i {
    margin-right: 6px;
    opacity: 0.9;
}

/* Section in current tree */
.webtron-docs-nav-item.is-section.current-ancestor > .webtron-docs-nav-link-wrapper {
    box-shadow: 0 0 0 2px var(--docs-nav-current-color, #1d4ed8);
}

/* Nested navigation - more compact */
.webtron-docs-nav-children {
    list-style: none;
    margin: 0;
    padding: 0 0 2px 2px;
    display: none;
    border-left: 2px solid #1d1d1d;
    margin-left: 0;
}

.webtron-docs-nav-children.expanded {
    display: block;
}

.webtron-docs-nav-children .webtron-docs-nav-item {
    border-bottom: none;
}

.webtron-docs-nav-children .webtron-docs-nav-link {
    font-size: 14px;
    padding: 6px 8px;
}

/* Deeper nesting */
.webtron-docs-nav-children .webtron-docs-nav-children {
    padding-left: 2px;
    margin-left: 0;
}

.webtron-docs-nav-children .webtron-docs-nav-children .webtron-docs-nav-link {
    font-size: 13px;
    padding: 5px 6px;
}

/* Breadcrumbs */
.webtron-docs-breadcrumbs {
    margin-bottom: 24px;
}

.webtron-docs-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.webtron-docs-breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.webtron-docs-breadcrumbs li:not(:last-child)::after {
    content: '/';
    color: var(--docs-breadcrumb-separator, #9ca3af);
}

.webtron-docs-breadcrumbs a {
    color: var(--docs-breadcrumb-link, #6b7280);
    text-decoration: none;
    transition: color 0.2s ease;
}

.webtron-docs-breadcrumbs a:hover {
    color: var(--docs-breadcrumb-link-hover, #374151);
}

.webtron-docs-breadcrumbs [aria-current="page"] {
    color: var(--docs-breadcrumb-current, #111827);
    font-weight: 500;
}

/* Table of Contents */
.webtron-docs-toc-wrapper {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.webtron-docs-toc {
    padding: 16px;
    background: var(--docs-toc-bg, #f9fafb);
    border-radius: 8px;
    border: 1px solid var(--docs-toc-border, #e5e7eb);
}

/* Hide TOC when empty */
.webtron-docs-toc:empty,
.webtron-docs-toc-wrapper:empty {
    display: none;
}

.webtron-docs-toc-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--docs-toc-title-color, #6b7280);
    margin: 0 0 12px;
}

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

.webtron-docs-toc-item {
    margin: 0;
}

.webtron-docs-toc-item a {
    display: block;
    padding: 4px 0;
    color: var(--docs-toc-link-color, #6b7280);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
    transition: color 0.2s ease;
    border-left: 2px solid transparent;
    padding-left: 12px;
    margin-left: -12px;
}

.webtron-docs-toc-item a:hover {
    color: var(--docs-toc-link-hover, #374151);
}

.webtron-docs-toc-item a.active {
    color: var(--docs-toc-link-active, #1d4ed8);
    border-left-color: var(--docs-toc-link-active, #1d4ed8);
}

/* TOC indentation levels */
.webtron-docs-toc-item.level-3 a {
    padding-left: 24px;
}

.webtron-docs-toc-item.level-4 a {
    padding-left: 36px;
}

/* ==========================================================================
   TOC Controls (Text Resize, AI Explainer, Get Help)
   ========================================================================== */

.webtron-docs-toc-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--docs-toc-border, #e5e7eb);
}

/* Fix WordPress wpautop wrapping - make p tags transparent containers */
.webtron-docs-toc-controls p {
    display: contents !important;
}

/* Hide only br tags and truly empty elements */
.webtron-docs-toc-controls br {
    display: none !important;
}

/* Ensure control groups display properly */
.webtron-docs-toc-controls > .webtron-docs-toc-control-group,
.webtron-docs-toc-controls > .webtron-docs-help-btn {
    display: flex !important;
}

.webtron-docs-toc-control-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.webtron-docs-toc-control-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--docs-toc-title-color, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

/* Text Resize Buttons */
.webtron-docs-text-resize {
    display: flex;
    gap: 2px;
}

.webtron-docs-text-resize-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--docs-toc-border, #e5e7eb);
    background: var(--docs-toc-bg, #ffffff);
    border-radius: 4px;
    cursor: pointer;
    color: var(--docs-toc-link-color, #6b7280);
    font-size: 12px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.webtron-docs-text-resize-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.webtron-docs-text-resize-btn:last-child {
    border-radius: 0 4px 4px 0;
}

.webtron-docs-text-resize-btn:hover {
    background: var(--docs-nav-link-hover-bg, #f3f4f6);
    color: var(--docs-nav-link-hover-color, #111827);
    border-color: var(--docs-primary, #3b82f6);
}

.webtron-docs-text-resize-btn:active {
    transform: scale(0.95);
}

.webtron-docs-text-resize-btn i {
    font-size: 10px;
}

/* Toggle Buttons (AI Explainer) */
.webtron-docs-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--docs-toc-border, #e5e7eb);
    background: var(--docs-toc-bg, #ffffff);
    border-radius: 4px;
    cursor: pointer;
    color: var(--docs-toc-link-color, #6b7280);
    font-size: 11px;
    font-weight: 500;
    transition: all 0.15s ease;
    flex: 1;
}

.webtron-docs-toggle-btn:hover {
    background: var(--docs-nav-link-hover-bg, #f3f4f6);
    color: var(--docs-nav-link-hover-color, #111827);
}

.webtron-docs-toggle-btn.active {
    background: var(--docs-nav-current-bg, rgba(59, 130, 246, 0.08));
    border-color: var(--docs-primary, #3b82f6);
    color: var(--docs-primary, #3b82f6);
}

.webtron-docs-toggle-btn i {
    font-size: 12px;
}

.webtron-docs-toggle-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--docs-muted, #9ca3af);
    margin-left: auto;
    transition: background 0.15s ease;
}

.webtron-docs-toggle-btn.active .webtron-docs-toggle-indicator {
    background: var(--docs-success, #22c55e);
}

/* =============================================
   AI Explainer Control - Rebuilt Clean Structure
   ============================================= */

.webtron-ai-explainer-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    padding: 0;
}

/* Left side: icon, text, help */
.webtron-ai-explainer-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.webtron-ai-explainer-icon {
    font-size: 12px;
    color: var(--docs-primary, #3b82f6);
    flex-shrink: 0;
}

.webtron-ai-explainer-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--docs-toc-link-color, #6b7280);
    white-space: nowrap;
}

/* Help icon with tooltip */
.webtron-ai-explainer-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.webtron-ai-explainer-help > i {
    font-size: 11px;
    color: var(--docs-muted, #9ca3af);
    transition: color 0.15s ease;
}

.webtron-ai-explainer-help:hover > i,
.webtron-ai-explainer-help:focus > i {
    color: var(--docs-primary, #3b82f6);
}

/* Help tooltip */
.webtron-ai-explainer-help-tip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    padding: 8px 10px;
    background: var(--docs-tooltip-bg, #1f2937);
    color: var(--docs-tooltip-color, #ffffff);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 99999;
    text-align: center;
}

.webtron-ai-explainer-help-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--docs-tooltip-bg, #1f2937);
}

.webtron-ai-explainer-help:hover .webtron-ai-explainer-help-tip,
.webtron-ai-explainer-help:focus .webtron-ai-explainer-help-tip {
    opacity: 1;
    visibility: visible;
}

/* iOS-style Toggle Switch */
.webtron-ai-explainer-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.webtron-ai-explainer-switch input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.webtron-ai-explainer-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--docs-switch-bg, #d1d5db);
    border-radius: 12px;
    transition: background-color 0.2s ease;
    pointer-events: none;
}

.webtron-ai-explainer-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    pointer-events: none;
}

/* Checked state */
.webtron-ai-explainer-switch input:checked ~ .webtron-ai-explainer-track {
    background-color: var(--docs-success, #22c55e);
}

.webtron-ai-explainer-switch input:checked ~ .webtron-ai-explainer-knob {
    transform: translateX(20px);
}

/* Focus state */
.webtron-ai-explainer-switch input:focus ~ .webtron-ai-explainer-track {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* =============================================
   AI Explainer Target Mode
   ============================================= */

/* Body class when target mode is active */
body.webtron-explainer-active {
    cursor: crosshair;
}

/* Target elements - subtle indicator */
.webtron-explainer-target {
    cursor: pointer !important;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}

.webtron-explainer-target:hover {
    background-color: rgba(59, 130, 246, 0.08) !important;
}

/* Highlight overlay - positioned absolutely over hovered element */
.webtron-explainer-highlight {
    position: absolute;
    pointer-events: none;
    border: 2px solid var(--docs-primary, #3b82f6);
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.05);
    z-index: 99990;
    transition: all 0.1s ease;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.webtron-explainer-highlight-label {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--docs-primary, #3b82f6);
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.webtron-explainer-highlight-label i {
    font-size: 10px;
}

/* Active mode indicator */
.webtron-explainer-indicator {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--docs-primary, #3b82f6);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    z-index: 99999;
    animation: webtron-explainer-pulse 2s ease-in-out infinite;
}

.webtron-explainer-indicator i {
    font-size: 14px;
}

.webtron-explainer-hint {
    font-size: 11px;
    opacity: 0.8;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid rgba(255,255,255,0.3);
}

@keyframes webtron-explainer-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(59, 130, 246, 0.6); }
}

/* Dark mode adjustments */
body.dark-mode .webtron-explainer-target:hover,
body.body_dark .webtron-explainer-target:hover {
    background-color: rgba(59, 130, 246, 0.15) !important;
}

body.dark-mode .webtron-explainer-highlight,
body.body_dark .webtron-explainer-highlight {
    background: rgba(59, 130, 246, 0.1);
}

/* Get Help Button */
.webtron-docs-help-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--docs-toc-border, #e5e7eb);
    background: var(--docs-toc-bg, #ffffff);
    border-radius: 6px;
    cursor: pointer;
    color: var(--docs-toc-link-color, #6b7280);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s ease;
    width: 100%;
    margin-top: 4px;
}

.webtron-docs-help-btn:hover {
    background: var(--docs-primary, #3b82f6);
    border-color: var(--docs-primary, #3b82f6);
    color: #ffffff;
}

.webtron-docs-help-btn i {
    font-size: 13px;
}

/* TOC Header with Collapse Button */
.webtron-docs-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: -16px -16px 12px -16px;
    padding: 8px 16px;
    box-sizing: content-box;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.webtron-docs-toc-header .webtron-docs-toc-title {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.webtron-docs-toc-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.webtron-docs-toc-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
}

.webtron-docs-toc-collapse-btn i {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.webtron-docs-toc.collapsed .webtron-docs-toc-collapse-btn i {
    transform: rotate(180deg);
}

/* TOC Collapsed State */
.webtron-docs-toc.collapsed .webtron-docs-toc-list {
    display: none;
}

.webtron-docs-toc.collapsed .webtron-docs-toc-controls {
    display: none;
}

/* TOC Action Buttons - Print, Bookmark, Copy Link */
.webtron-docs-toc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--docs-toc-border, #e5e7eb);
    background: var(--docs-toc-bg, #ffffff);
    border-radius: 6px;
    cursor: pointer;
    color: var(--docs-toc-link-color, #6b7280);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s ease;
    width: 100%;
}

.webtron-docs-toc-btn:hover {
    background: var(--docs-nav-link-hover-bg, #f3f4f6);
    color: var(--docs-nav-link-hover-color, #111827);
    border-color: var(--docs-primary, #3b82f6);
}

.webtron-docs-toc-btn:active {
    transform: scale(0.98);
}

.webtron-docs-toc-btn i {
    font-size: 13px;
    flex-shrink: 0;
}

/* Print Button */
.webtron-docs-print-btn:hover {
    background: var(--docs-primary, #3b82f6);
    border-color: var(--docs-primary, #3b82f6);
    color: #ffffff;
}

/* Bookmark Button - Hidden until account system implemented */
#webtron-docs-bookmark {
    display: none;
}

.webtron-docs-bookmark-btn.bookmarked {
    background: rgba(251, 191, 36, 0.1);
    border-color: #fbbf24;
    color: #d97706;
}

.webtron-docs-bookmark-btn.bookmarked i {
    font-weight: 900; /* Solid icon when bookmarked */
}

.webtron-docs-bookmark-btn.bookmarked:hover {
    background: rgba(251, 191, 36, 0.2);
}

/* Copy Link Button */
.webtron-docs-copy-doc-link.copied {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--docs-success, #22c55e);
    color: var(--docs-success, #22c55e);
}

/* AI Explainer Tooltip - Floating tooltip that appears on text selection */
.webtron-ai-explainer-tooltip {
    position: fixed;
    z-index: 999999;
    background: var(--docs-tooltip-bg, #1f2937);
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.2);
    display: none;
    pointer-events: auto;
    transform: translateY(-8px);
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.webtron-ai-explainer-tooltip.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.webtron-ai-explainer-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--docs-tooltip-bg, #1f2937);
    pointer-events: none;
}

.webtron-ai-explainer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--docs-primary, #3b82f6);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    min-width: 120px;
}

.webtron-ai-explainer-btn:hover {
    background: var(--docs-primary-dark, #1d4ed8);
    transform: scale(1.02);
}

.webtron-ai-explainer-btn:active {
    transform: scale(0.98);
}

.webtron-ai-explainer-btn i {
    font-size: 14px;
    pointer-events: none;
}

.webtron-ai-explainer-btn span {
    pointer-events: none;
}

/* AI Explainer Response Modal */
.webtron-ai-explainer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.webtron-ai-explainer-modal.visible {
    display: flex;
}

.webtron-ai-explainer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.webtron-ai-explainer-content {
    position: relative;
    background: var(--docs-modal-bg, #ffffff);
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.webtron-ai-explainer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--docs-border, #e5e7eb);
}

.webtron-ai-explainer-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--docs-heading, #111827);
}

.webtron-ai-explainer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--docs-muted, #6b7280);
    border-radius: 6px;
    transition: all 0.15s ease;
}

.webtron-ai-explainer-close:hover {
    background: var(--docs-nav-link-hover-bg, #f3f4f6);
    color: var(--docs-heading, #111827);
}

.webtron-ai-explainer-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 120px);
}

.webtron-ai-explainer-selected-text {
    background: var(--docs-highlight-bg, #fef3c7);
    padding: 12px 16px;
    border-radius: 6px;
    font-style: italic;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--docs-text, #374151);
    border-left: 3px solid var(--docs-warning, #f59e0b);
}

.webtron-ai-explainer-response {
    font-size: 14px;
    line-height: 1.7;
    color: var(--docs-text, #374151);
}

.webtron-ai-explainer-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--docs-muted, #6b7280);
}

.webtron-ai-explainer-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Get Help Modal */
.webtron-help-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.webtron-help-modal.visible {
    display: flex;
}

.webtron-help-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.webtron-help-modal-content {
    position: relative;
    background: var(--docs-modal-bg, #ffffff);
    border-radius: 12px;
    max-width: 600px;
    max-height: 90vh;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

.webtron-help-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--docs-border, #e5e7eb);
}

.webtron-help-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--docs-heading, #111827);
    display: flex;
    align-items: center;
    gap: 8px;
}

.webtron-help-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--docs-muted, #6b7280);
    border-radius: 6px;
    transition: all 0.15s ease;
}

.webtron-help-modal-close:hover {
    background: var(--docs-nav-link-hover-bg, #f3f4f6);
    color: var(--docs-heading, #111827);
}

.webtron-help-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

/* Dark mode for TOC controls */
body.dark-mode .webtron-docs-toc-controls,
body.body_dark .webtron-docs-toc-controls {
    border-top-color: #374151;
}

body.dark-mode .webtron-docs-text-resize-btn,
body.dark-mode .webtron-docs-toggle-btn,
body.dark-mode .webtron-docs-help-btn,
body.body_dark .webtron-docs-text-resize-btn,
body.body_dark .webtron-docs-toggle-btn,
body.body_dark .webtron-docs-help-btn {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

body.dark-mode .webtron-docs-text-resize-btn:hover,
body.dark-mode .webtron-docs-toggle-btn:hover,
body.body_dark .webtron-docs-text-resize-btn:hover,
body.body_dark .webtron-docs-toggle-btn:hover {
    background: #4b5563;
    color: #f3f4f6;
}

body.dark-mode .webtron-docs-help-btn:hover,
body.body_dark .webtron-docs-help-btn:hover {
    background: var(--docs-primary, #3b82f6);
    color: #ffffff;
}

body.dark-mode .webtron-docs-toggle-btn.active,
body.body_dark .webtron-docs-toggle-btn.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #60a5fa;
}

/* Dark mode for iOS Switch */
body.dark-mode .webtron-docs-switch-label,
body.body_dark .webtron-docs-switch-label {
    color: #d1d5db;
}

body.dark-mode .webtron-docs-ios-switch-slider,
body.body_dark .webtron-docs-ios-switch-slider {
    background-color: #4b5563;
}

body.dark-mode .webtron-docs-tooltip,
body.body_dark .webtron-docs-tooltip {
    background: #374151;
    color: #f3f4f6;
}

body.dark-mode .webtron-docs-tooltip::after,
body.body_dark .webtron-docs-tooltip::after {
    border-top-color: #374151;
}

body.dark-mode .webtron-ai-explainer-content,
body.dark-mode .webtron-help-modal-content,
body.body_dark .webtron-ai-explainer-content,
body.body_dark .webtron-help-modal-content {
    background: #1f2937;
}

body.dark-mode .webtron-ai-explainer-header,
body.dark-mode .webtron-help-modal-header,
body.body_dark .webtron-ai-explainer-header,
body.body_dark .webtron-help-modal-header {
    border-bottom-color: #374151;
}

body.dark-mode .webtron-ai-explainer-header h3,
body.dark-mode .webtron-help-modal-header h3,
body.body_dark .webtron-ai-explainer-header h3,
body.body_dark .webtron-help-modal-header h3 {
    color: #f3f4f6;
}

body.dark-mode .webtron-ai-explainer-selected-text,
body.body_dark .webtron-ai-explainer-selected-text {
    background: rgba(245, 158, 11, 0.15);
    border-left-color: #f59e0b;
    color: #e5e7eb;
}

body.dark-mode .webtron-ai-explainer-response,
body.body_dark .webtron-ai-explainer-response {
    color: #d1d5db;
}

/* Children List - Compact inline style */
.webtron-docs-children-list {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
}

.webtron-docs-children-heading {
    display: none; /* Hide heading in compact mode */
}

.webtron-docs-children-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.webtron-docs-children-list li {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    transition: none;
}

.webtron-docs-children-list li:hover {
    border-color: transparent;
    box-shadow: none;
}

.webtron-docs-children-list a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-weight: 500;
    font-size: 13px;
    color: var(--docs-child-link-color, #4b5563);
    text-decoration: none;
    background: var(--docs-child-tag-bg, #f3f4f6);
    border: 1px solid var(--docs-child-tag-border, #e5e7eb);
    border-radius: 6px;
    transition: all 0.15s ease;
}

.webtron-docs-children-list a i {
    flex-shrink: 0;
    width: auto;
    color: var(--docs-primary, #3b82f6);
    font-size: 12px;
}

.webtron-docs-children-list a span {
    flex-grow: 0;
}

.webtron-docs-children-list a:hover {
    color: var(--docs-primary, #3b82f6);
    background: var(--docs-child-tag-hover-bg, #eff6ff);
    border-color: var(--docs-primary, #3b82f6);
}

.webtron-docs-children-list p {
    display: none; /* Hide excerpts in compact mode */
}

/* Children List Dark Mode */
body.dark-mode .webtron-docs-children-list,
body.body_dark .webtron-docs-children-list {
    background: none;
    border-color: transparent;
}

body.dark-mode .webtron-docs-children-heading,
body.body_dark .webtron-docs-children-heading {
    color: var(--text-color, #f3f4f6);
    border-bottom-color: var(--border-color, #374151);
}

body.dark-mode .webtron-docs-children-list li,
body.body_dark .webtron-docs-children-list li {
    background: none;
    border-color: transparent;
}

body.dark-mode .webtron-docs-children-list a,
body.body_dark .webtron-docs-children-list a {
    background: var(--card-bg, #374151);
    border-color: var(--border-color, #4b5563);
    color: #d1d5db;
}

body.dark-mode .webtron-docs-children-list a:hover,
body.body_dark .webtron-docs-children-list a:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--docs-primary, #3b82f6);
    color: #60a5fa;
}

body.dark-mode .webtron-docs-children-list li:hover,
body.body_dark .webtron-docs-children-list li:hover {
    border-color: var(--docs-primary, #3b82f6);
}

body.dark-mode .webtron-docs-children-list a,
body.body_dark .webtron-docs-children-list a {
    color: var(--text-color, #f3f4f6);
}

body.dark-mode .webtron-docs-children-list p,
body.body_dark .webtron-docs-children-list p {
    color: var(--text-muted, #9ca3af);
}

/* ==========================================================================
   Sidebar Dark Mode Styles
   ========================================================================== */

body.dark-mode .webtron-docs-sidebar,
body.body_dark .webtron-docs-sidebar {
    background: #1f2937;
    border-color: #374151;
}

body.dark-mode .webtron-docs-sidebar-toggle,
body.body_dark .webtron-docs-sidebar-toggle {
    background: #374151;
    color: #9ca3af;
}

body.dark-mode .webtron-docs-sidebar-toggle:hover,
body.body_dark .webtron-docs-sidebar-toggle:hover {
    background: #4b5563;
    color: #f3f4f6;
}

body.dark-mode .webtron-docs-nav-item,
body.body_dark .webtron-docs-nav-item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .webtron-docs-nav-item.has-children > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-link,
body.body_dark .webtron-docs-nav-item.has-children > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-link {
    color: #9ca3af;
}

body.dark-mode .webtron-docs-nav-item.has-children > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-link:hover,
body.body_dark .webtron-docs-nav-item.has-children > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-link:hover {
    color: #d1d5db;
}

body.dark-mode .webtron-docs-nav-toggle,
body.body_dark .webtron-docs-nav-toggle {
    color: #9ca3af;
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .webtron-docs-nav-toggle:hover,
body.body_dark .webtron-docs-nav-toggle:hover {
    color: #f3f4f6;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
}

body.dark-mode .webtron-docs-nav-toggle[aria-expanded="false"],
body.body_dark .webtron-docs-nav-toggle[aria-expanded="false"] {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.35);
    color: #60a5fa;
}

body.dark-mode .webtron-docs-nav-toggle[aria-expanded="false"]:hover,
body.body_dark .webtron-docs-nav-toggle[aria-expanded="false"]:hover {
    background: rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.5);
    color: #93c5fd;
}

body.dark-mode .webtron-docs-nav-toggle[aria-expanded="true"],
body.body_dark .webtron-docs-nav-toggle[aria-expanded="true"] {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.35);
    color: #4ade80;
}

body.dark-mode .webtron-docs-nav-toggle[aria-expanded="true"]:hover,
body.body_dark .webtron-docs-nav-toggle[aria-expanded="true"]:hover {
    background: rgba(74, 222, 128, 0.2);
    border-color: rgba(74, 222, 128, 0.5);
    color: #86efac;
}

body.dark-mode .webtron-docs-nav-link,
body.body_dark .webtron-docs-nav-link {
    color: #d1d5db;
}

body.dark-mode .webtron-docs-nav-link:hover,
body.body_dark .webtron-docs-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: #f3f4f6;
}

body.dark-mode .webtron-docs-nav-link-wrapper:hover,
body.body_dark .webtron-docs-nav-link-wrapper:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .webtron-docs-nav-item.current > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-link,
body.body_dark .webtron-docs-nav-item.current > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-link {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-left-color: #60a5fa;
}

body.dark-mode .webtron-docs-nav-item.current-ancestor > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-link,
body.body_dark .webtron-docs-nav-item.current-ancestor > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-link {
    color: #f3f4f6;
    background-color: rgba(59, 130, 246, 0.08);
    border-left-color: rgba(96, 165, 250, 0.4);
}

body.dark-mode .webtron-docs-nav-item.current-ancestor > .webtron-docs-nav-children,
body.body_dark .webtron-docs-nav-item.current-ancestor > .webtron-docs-nav-children {
    border-left-color: rgba(96, 165, 250, 0.35);
}

body.dark-mode .webtron-docs-nav-children,
body.body_dark .webtron-docs-nav-children {
    border-left-color: #0061fff2;
}

/* Section styling dark mode */
body.dark-mode .webtron-docs-nav-item.is-section > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-toggle,
body.body_dark .webtron-docs-nav-item.is-section > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-toggle {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .webtron-docs-nav-item.is-section > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-toggle:hover,
body.body_dark .webtron-docs-nav-item.is-section > .webtron-docs-nav-link-wrapper > .webtron-docs-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .webtron-docs-nav-item.is-section.current-ancestor > .webtron-docs-nav-link-wrapper,
body.body_dark .webtron-docs-nav-item.is-section.current-ancestor > .webtron-docs-nav-link-wrapper {
    box-shadow: 0 0 0 2px #60a5fa;
}

/* Sidebar Search Dark Mode */
body.dark-mode .webtron-docs-sidebar-search .webtron-docs-search-input,
body.body_dark .webtron-docs-sidebar-search .webtron-docs-search-input {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

body.dark-mode .webtron-docs-sidebar-search .webtron-docs-search-input::placeholder,
body.body_dark .webtron-docs-sidebar-search .webtron-docs-search-input::placeholder {
    color: #9ca3af;
}

body.dark-mode .webtron-docs-sidebar-search-btn,
body.body_dark .webtron-docs-sidebar-search-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #9ca3af;
}

body.dark-mode .webtron-docs-sidebar-search-btn:hover,
body.body_dark .webtron-docs-sidebar-search-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: #f3f4f6;
}

body.dark-mode .webtron-docs-sidebar-search-btn kbd,
body.body_dark .webtron-docs-sidebar-search-btn kbd {
    background: rgba(255, 255, 255, 0.1);
    color: #6b7280;
}

/* ==========================================================================
   Table of Contents Dark Mode Styles
   ========================================================================== */

body.dark-mode .webtron-docs-toc,
body.body_dark .webtron-docs-toc {
    background: #1f2937;
    border-color: #374151;
}

body.dark-mode .webtron-docs-toc-title,
body.body_dark .webtron-docs-toc-title {
    color: #9ca3af;
}

body.dark-mode .webtron-docs-toc-item a,
body.body_dark .webtron-docs-toc-item a {
    color: #9ca3af;
}

body.dark-mode .webtron-docs-toc-item a:hover,
body.body_dark .webtron-docs-toc-item a:hover {
    color: #f3f4f6;
}

body.dark-mode .webtron-docs-toc-item a.active,
body.body_dark .webtron-docs-toc-item a.active {
    color: #60a5fa;
    border-left-color: #60a5fa;
}

/* Breadcrumbs Dark Mode */
body.dark-mode .webtron-docs-breadcrumbs a,
body.body_dark .webtron-docs-breadcrumbs a {
    color: #9ca3af;
}

body.dark-mode .webtron-docs-breadcrumbs a:hover,
body.body_dark .webtron-docs-breadcrumbs a:hover {
    color: #f3f4f6;
}

body.dark-mode .webtron-docs-breadcrumbs [aria-current="page"],
body.body_dark .webtron-docs-breadcrumbs [aria-current="page"] {
    color: #f3f4f6;
}

body.dark-mode .webtron-docs-breadcrumbs-separator,
body.body_dark .webtron-docs-breadcrumbs-separator {
    color: #6b7280;
}

/* Page Navigation (Prev/Next) */
.webtron-docs-page-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--docs-nav-border, #e5e7eb);
}

.webtron-docs-page-nav-item {
    flex: 1;
}

.webtron-docs-page-nav-item--prev {
    grid-column: 1;
}

.webtron-docs-page-nav-item--next {
    grid-column: 2;
    text-align: right;
}

.webtron-docs-page-nav-link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03), rgba(59, 130, 246, 0.06));
    border: 1px solid var(--docs-page-nav-border, #e2e8f0);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
    height: 100%;
    box-sizing: border-box;
}

.webtron-docs-page-nav-item--next .webtron-docs-page-nav-link {
    align-items: flex-end;
}

.webtron-docs-page-nav-link:hover {
    border-color: var(--docs-primary, #3b82f6);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(59, 130, 246, 0.1));
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.12);
    transform: translateY(-2px);
}

.webtron-docs-page-nav-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--docs-primary, #3b82f6);
}

.webtron-docs-page-nav-item--prev .webtron-docs-page-nav-label::before {
    content: '←';
    font-size: 1rem;
}

.webtron-docs-page-nav-item--next .webtron-docs-page-nav-label::after {
    content: '→';
    font-size: 1rem;
}

.webtron-docs-page-nav-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--docs-nav-title-color, #1e293b);
    line-height: 1.4;
    transition: color 0.2s ease;
}

.webtron-docs-page-nav-link:hover .webtron-docs-page-nav-title {
    color: var(--docs-primary, #3b82f6);
}

/* Page Nav Dark Mode */
body.dark-mode .webtron-docs-page-nav,
body.body_dark .webtron-docs-page-nav {
    border-top-color: var(--border-color, #374151);
}

body.dark-mode .webtron-docs-page-nav-link,
body.body_dark .webtron-docs-page-nav-link {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.12));
    border-color: var(--border-color, #374151);
}

body.dark-mode .webtron-docs-page-nav-link:hover,
body.body_dark .webtron-docs-page-nav-link:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.18));
    border-color: var(--docs-primary, #3b82f6);
}

body.dark-mode .webtron-docs-page-nav-title,
body.body_dark .webtron-docs-page-nav-title {
    color: var(--text-color, #f3f4f6);
}

/* Page Nav Responsive */
@media (max-width: 640px) {
    .webtron-docs-page-nav {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .webtron-docs-page-nav-item--prev,
    .webtron-docs-page-nav-item--next {
        grid-column: 1;
    }
    
    .webtron-docs-page-nav-item--next {
        text-align: left;
    }
    
    .webtron-docs-page-nav-item--next .webtron-docs-page-nav-link {
        align-items: flex-start;
    }
    
    .webtron-docs-page-nav-link {
        padding: 16px 20px;
    }
}

.webtron-docs-page-nav-label {
    display: block;
    font-size: 12px;
    color: var(--docs-page-nav-label, #6b7280);
    margin-bottom: 4px;
}

.webtron-docs-page-nav-title {
    display: block;
    font-weight: 500;
    color: var(--docs-page-nav-title, #111827);
    font-size: 15px;
}

/* Responsive */
@media screen and (max-width: 1200px) {
    .webtron-docs-layout {
        gap: 24px;
    }
    
    .webtron-docs-layout > .webtron-docs-sidebar {
        flex: 0 0 220px;
        width: 220px;
    }
    
    .webtron-docs-layout > .webtron-docs-toc-wrapper {
        flex: 0 0 180px;
        width: 180px;
    }
}

@media screen and (max-width: 1024px) {
    .webtron-docs-layout {
        flex-direction: column;
        gap: 24px;
        padding: 24px 16px;
    }
    
    .webtron-docs-layout > .webtron-docs-sidebar {
        flex: none;
        width: 100%;
        position: static;
        max-height: none;
        order: 1;
    }
    
    .webtron-docs-content {
        order: 2;
        max-width: 100%;
    }
    
    .webtron-docs-layout > .webtron-docs-toc-wrapper {
        flex: none;
        width: 100%;
        order: 0;
    }
    
    .webtron-docs-sidebar {
        width: 100%;
        margin-bottom: 0;
    }
    
    .webtron-docs-toc {
        position: static;
        max-height: none;
    }
}

@media screen and (max-width: 640px) {
    .webtron-docs-page-nav {
        flex-direction: column;
    }
    
    .webtron-docs-page-nav-item {
        max-width: 100%;
    }
    
    .webtron-docs-page-nav-item--next {
        text-align: left;
    }
    
    .webtron-docs-children-list ul {
        grid-template-columns: 1fr;
    }
}

/* Meta Bar (Reading Time, Last Updated, Print) */
.webtron-docs-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--docs-meta-border, #e5e7eb);
    font-size: 14px;
    color: var(--docs-meta-text, #6b7280);
}

.webtron-docs-reading-time,
.webtron-docs-last-updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.webtron-docs-reading-time svg,
.webtron-docs-last-updated svg {
    opacity: 0.7;
}

.webtron-docs-meta .webtron-docs-print-btn {
    margin-left: auto;
}

@media screen and (max-width: 640px) {
    .webtron-docs-meta {
        gap: 12px;
    }
    
    .webtron-docs-meta .webtron-docs-print-btn {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        margin-top: 8px;
    }
}

/* Version Badge */
.webtron-doc-version-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.webtron-doc-version-info .version-badge,
.webtron-version-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    background: var(--docs-version-bg, #3858e9);
    color: var(--docs-version-color, #fff);
    border-radius: 6px;
    line-height: 1.2;
}

.webtron-version-full {
    font-size: 13px;
    color: var(--docs-version-text, #374151);
}

.webtron-version-full small {
    color: var(--docs-version-muted, #6b7280);
    font-weight: 400;
}

/* ==========================================================================
   Archive Page Styles
   ========================================================================== */

.webtron-docs-archive-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
}

.webtron-docs-archive-header {
    text-align: center;
    margin-bottom: 48px;
}

.webtron-docs-archive-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--docs-archive-title, #111827);
    margin: 0 0 12px;
}

.webtron-docs-archive-description {
    font-size: 18px;
    color: var(--docs-archive-desc, #6b7280);
    margin: 0 0 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.webtron-docs-search-box {
    max-width: 500px;
    margin: 0 auto;
}

/* Category Grid */
.webtron-docs-categories {
    margin-bottom: 48px;
}

.webtron-docs-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.webtron-docs-category-card {
    background: var(--docs-card-bg, #fff);
    border: 1px solid var(--docs-card-border, #e5e7eb);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s ease;
}

.webtron-docs-category-card:hover {
    border-color: var(--docs-card-hover-border, #3b82f6);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.webtron-docs-category-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--docs-icon-bg, #eff6ff);
    border-radius: 12px;
    margin-bottom: 16px;
    color: var(--docs-icon-color, #3b82f6);
}

.webtron-docs-category-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.webtron-docs-category-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
}

.webtron-docs-category-title a {
    color: var(--docs-card-title, #111827);
    text-decoration: none;
}

.webtron-docs-category-title a:hover {
    color: var(--docs-card-title-hover, #3b82f6);
}

.webtron-docs-category-description {
    font-size: 14px;
    color: var(--docs-card-text, #6b7280);
    margin: 0 0 16px;
    line-height: 1.5;
}

.webtron-docs-category-links {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.webtron-docs-category-links li {
    padding: 6px 0;
    border-bottom: 1px solid var(--docs-link-border, #f3f4f6);
}

.webtron-docs-category-links li:last-child {
    border-bottom: none;
}

.webtron-docs-category-links a {
    font-size: 14px;
    color: var(--docs-link-color, #374151);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.webtron-docs-category-links a:hover {
    color: var(--docs-link-hover, #3b82f6);
}

.webtron-docs-category-links a::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%;
    margin-right: 8px;
    opacity: 0.5;
}

.webtron-docs-category-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--docs-view-all, #3b82f6);
    text-decoration: none;
}

.webtron-docs-category-view-all:hover {
    color: var(--docs-view-all-hover, #1d4ed8);
}

/* Docs Grid */
.webtron-docs-section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--docs-section-title, #111827);
    margin: 0 0 24px;
}

.webtron-docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.webtron-docs-card {
    background: var(--docs-card-bg, #fff);
    border: 1px solid var(--docs-card-border, #e5e7eb);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.2s ease;
}

.webtron-docs-card:hover {
    border-color: var(--docs-card-hover-border, #3b82f6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.webtron-docs-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--docs-icon-bg, #eff6ff);
    border-radius: 10px;
    margin-bottom: 12px;
    color: var(--docs-icon-color, #3b82f6);
}

.webtron-docs-card-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.webtron-docs-card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
}

.webtron-docs-card-title a {
    color: var(--docs-card-title, #111827);
    text-decoration: none;
}

.webtron-docs-card-title a:hover {
    color: var(--docs-card-title-hover, #3b82f6);
}

.webtron-docs-card-excerpt {
    font-size: 13px;
    color: var(--docs-card-text, #6b7280);
    margin: 0 0 12px;
    line-height: 1.5;
}

.webtron-docs-card-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.webtron-docs-card-children li {
    padding: 4px 0;
}

.webtron-docs-card-children a {
    font-size: 13px;
    color: var(--docs-link-color, #6b7280);
    text-decoration: none;
}

.webtron-docs-card-children a:hover {
    color: var(--docs-link-hover, #3b82f6);
}

.webtron-docs-card-children .more a {
    color: var(--docs-view-all, #3b82f6);
    font-weight: 500;
}

/* Single Doc Article */
.webtron-doc-article {
    width: 100%;
}

.webtron-doc-header {
    margin-bottom: 24px;
}

.webtron-doc-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--docs-title-color, #111827);
    margin: 0 0 16px;
    line-height: 1.3;
}

.webtron-doc-content {
    font-size: 16px;
    line-height: 1.7;
    color: var(--docs-content-text, #374151);
}

.webtron-doc-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 32px 0 16px;
    padding-top: 16px;
}

.webtron-doc-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 28px 0 12px;
}

.webtron-doc-content h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 10px;
}

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

.webtron-doc-content ul,
.webtron-doc-content ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

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

.webtron-doc-content pre {
    background: var(--docs-pre-bg, #1f2937);
    color: var(--docs-pre-text, #f9fafb);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0 0 16px;
}

.webtron-doc-content code {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
}

.webtron-doc-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.webtron-doc-footer {
    margin-top: 48px;
}

/* Responsive Archive */
@media screen and (max-width: 768px) {
    .webtron-docs-archive-page {
        padding: 32px 16px;
    }
    
    .webtron-docs-archive-title {
        font-size: 28px;
    }
    
    .webtron-docs-archive-description {
        font-size: 16px;
    }
    
    .webtron-docs-category-grid,
    .webtron-docs-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   Copy Link Button for Headings
   ================================================ */

.webtron-docs-copy-link-wrapper {
    margin: 0 0 16px 0;
    padding-top: 6px;
}

/* ================================================
   Chapter List (Child Docs Display)
   ================================================ */

.webtron-docs-chapters {
    margin: 32px 0;
    padding: 24px;
    background: var(--docs-sidebar-bg, #f9fafb);
    border-radius: 12px;
    border: 1px solid var(--docs-sidebar-border, #e5e7eb);
}

body.dark-mode .webtron-docs-chapters,
body.body_dark .webtron-docs-chapters {
    background: var(--card-bg, #242729);
    border-color: var(--border-color, #3c4146);
}

.webtron-docs-chapters-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px 0;
    padding-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--docs-text, #374151);
    border-bottom: 1px solid var(--docs-sidebar-border, #e5e7eb);
}

body.dark-mode .webtron-docs-chapters-title,
body.body_dark .webtron-docs-chapters-title {
    color: #e0e0e0;
    border-color: var(--border-color, #3c4146);
}

.webtron-docs-chapters-title i {
    color: var(--docs-accent, #3b82f6);
}

.webtron-docs-chapters-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Card style (default) */
.webtron-docs-chapters--cards .webtron-docs-chapter-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-color, #ffffff);
    border: 1px solid var(--docs-sidebar-border, #e5e7eb);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

body.dark-mode .webtron-docs-chapters--cards .webtron-docs-chapter-card,
body.body_dark .webtron-docs-chapters--cards .webtron-docs-chapter-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color, #3c4146);
}

.webtron-docs-chapter-card:hover {
    border-color: var(--docs-accent, #3b82f6);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.webtron-docs-chapter-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--docs-accent, #3b82f6);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 10px;
}

.webtron-docs-chapter-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--docs-hover-bg, #f3f4f6);
    color: var(--docs-accent, #3b82f6);
    font-size: 18px;
    border-radius: 10px;
}

body.dark-mode .webtron-docs-chapter-icon,
body.body_dark .webtron-docs-chapter-icon {
    background: rgba(255, 255, 255, 0.1);
}

.webtron-docs-chapter-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.webtron-docs-chapter-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--docs-text, #374151);
    line-height: 1.4;
}

body.dark-mode .webtron-docs-chapter-card-title,
body.body_dark .webtron-docs-chapter-card-title {
    color: #e0e0e0;
}

.webtron-docs-chapter-card:hover .webtron-docs-chapter-card-title {
    color: var(--docs-accent, #3b82f6);
}

.webtron-docs-chapter-excerpt {
    font-size: 13px;
    color: var(--docs-text-light, #6b7280);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.dark-mode .webtron-docs-chapter-excerpt,
body.body_dark .webtron-docs-chapter-excerpt {
    color: #a0a0a0;
}

.webtron-docs-chapter-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--docs-text-light, #6b7280);
    margin-top: 4px;
}

.webtron-docs-chapter-meta i {
    font-size: 11px;
}

.webtron-docs-chapter-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--docs-hover-bg, #f3f4f6);
    color: var(--docs-text-light, #6b7280);
    border-radius: 8px;
    font-size: 12px;
    transition: all 0.2s ease;
}

body.dark-mode .webtron-docs-chapter-arrow,
body.body_dark .webtron-docs-chapter-arrow {
    background: rgba(255, 255, 255, 0.1);
}

.webtron-docs-chapter-card:hover .webtron-docs-chapter-arrow {
    background: var(--docs-accent, #3b82f6);
    color: #ffffff;
    transform: translateX(2px);
}

/* List style */
.webtron-docs-chapters--list .webtron-docs-chapter-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--docs-sidebar-border, #e5e7eb);
    text-decoration: none;
    transition: all 0.2s ease;
}

body.dark-mode .webtron-docs-chapters--list .webtron-docs-chapter-card,
body.body_dark .webtron-docs-chapters--list .webtron-docs-chapter-card {
    border-color: var(--border-color, #3c4146);
}

.webtron-docs-chapters--list .webtron-docs-chapter-card:last-child {
    border-bottom: none;
}

.webtron-docs-chapters--list .webtron-docs-chapter-number {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 13px;
    border-radius: 8px;
}

.webtron-docs-chapters--list .webtron-docs-chapter-arrow {
    background: transparent;
}

/* Timeline style */
.webtron-docs-chapters--timeline .webtron-docs-chapters-grid {
    position: relative;
    padding-left: 32px;
}

.webtron-docs-chapters--timeline .webtron-docs-chapters-grid::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--docs-sidebar-border, #e5e7eb);
}

body.dark-mode .webtron-docs-chapters--timeline .webtron-docs-chapters-grid::before,
body.body_dark .webtron-docs-chapters--timeline .webtron-docs-chapters-grid::before {
    background: var(--border-color, #3c4146);
}

.webtron-docs-chapters--timeline .webtron-docs-chapter-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    margin-left: 16px;
    background: var(--bg-color, #ffffff);
    border: 1px solid var(--docs-sidebar-border, #e5e7eb);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

body.dark-mode .webtron-docs-chapters--timeline .webtron-docs-chapter-card,
body.body_dark .webtron-docs-chapters--timeline .webtron-docs-chapter-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color, #3c4146);
}

.webtron-docs-chapters--timeline .webtron-docs-chapter-number {
    position: absolute;
    left: -48px;
    top: 16px;
    width: 24px;
    height: 24px;
    min-width: 24px;
    font-size: 12px;
    border-radius: 50%;
    z-index: 1;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .webtron-docs-chapters {
        padding: 16px;
        margin: 24px 0;
    }
    
    .webtron-docs-chapters--cards .webtron-docs-chapter-card {
        padding: 14px 16px;
    }
    
    .webtron-docs-chapter-number,
    .webtron-docs-chapter-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 14px;
    }
    
    .webtron-docs-chapter-arrow {
        display: none;
    }
}

.webtron-docs-copy-link {
    opacity: 1;
    visibility: visible;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    background: var(--docs-copy-link-bg, #f3f4f6);
    border: 1px solid var(--docs-copy-link-border, #e5e7eb);
    padding: 4px 10px;
    cursor: pointer;
    color: var(--docs-text-light, #6b7280);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.webtron-docs-copy-link-text {
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.webtron-docs-copy-link:hover {
    color: var(--docs-accent, #3b82f6);
    background: var(--docs-hover-bg, rgba(59, 130, 246, 0.1));
    border-color: var(--docs-accent, #3b82f6);
}

.webtron-docs-copy-link.copied {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

/* Focus visible for accessibility */
.webtron-docs-copy-link:focus-visible {
    outline: 2px solid var(--docs-accent, #3b82f6);
    outline-offset: 2px;
}

/* Responsive: adjust copy button on small screens */
@media screen and (max-width: 768px) {
    .webtron-docs-copy-link {
        padding: 3px 8px;
        font-size: 10px;
    }
}

/* ==========================================================================
   Mobile Navigation - Unified Panel with Tabs
   ========================================================================== */

/* Toggle button wrapper - positioned within FAB container or standalone */
.webtron-docs-mobile-toggle-wrapper {
    display: none;
    position: fixed;
    bottom: 175px;
    right: 35px;
    z-index: 9990;
}

/* When inside FAB container, reset positioning */
.webtron-fab-container .webtron-docs-mobile-toggle-wrapper {
    position: static;
    z-index: auto;
    order: 3; /* Top position in FAB stack */
}

/* Toggle button - matches dark mode toggle style */
.webtron-docs-mobile-toggle {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 0;
}

body.dark-mode .webtron-docs-mobile-toggle,
body.body_dark .webtron-docs-mobile-toggle {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.webtron-docs-mobile-toggle:hover {
    background: var(--docs-accent, #3b82f6);
    border-color: var(--docs-accent, #3b82f6);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.webtron-docs-mobile-toggle.active {
    background: var(--docs-accent, #3b82f6);
    border-color: var(--docs-accent, #3b82f6);
}

.webtron-docs-mobile-toggle svg {
    transition: all 0.3s ease;
}

.webtron-docs-mobile-toggle:hover svg {
    transform: rotate(5deg);
}

/* Mobile Panel - Pop-up from bottom (avoids header overlap) */
.webtron-docs-mobile-panel {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75vh;
    max-height: calc(100vh - 80px); /* Leave room for header */
    background: var(--docs-sidebar-bg, #ffffff);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    border-radius: 16px 16px 0 0;
}

.webtron-docs-mobile-panel.active {
    transform: translateY(0);
}

/* Overlay - between FAB and panel */
.webtron-docs-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9995; /* Above FAB (9990), below panel (10000) */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.webtron-docs-mobile-overlay.active {
    opacity: 1;
}

/* Panel Header with Tabs */
.webtron-docs-mobile-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--docs-sidebar-border, #e5e7eb);
    background: var(--docs-sidebar-bg, #f9fafb);
}

.webtron-docs-mobile-tabs {
    display: flex;
    gap: 4px;
    flex: 1;
}

.webtron-docs-mobile-tab {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--docs-sidebar-border, #e5e7eb);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--docs-text-light, #6b7280);
    cursor: pointer;
    transition: all 0.2s ease;
}

.webtron-docs-mobile-tab:hover {
    background: var(--docs-hover-bg, #f3f4f6);
    color: var(--docs-text, #374151);
}

.webtron-docs-mobile-tab.active {
    background: var(--docs-accent, #3b82f6);
    border-color: var(--docs-accent, #3b82f6);
    color: #ffffff;
}

.webtron-docs-mobile-panel-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--docs-text-light, #6b7280);
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.webtron-docs-mobile-panel-close:hover {
    background: var(--docs-hover-bg, #f3f4f6);
    color: var(--docs-text, #374151);
}

/* Panel Content */
.webtron-docs-mobile-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.webtron-docs-mobile-tab-content {
    display: none;
}

.webtron-docs-mobile-tab-content.active {
    display: block;
}

/* Reset sidebar/toc styling inside mobile panel */
.webtron-docs-mobile-panel .webtron-docs-sidebar,
.webtron-docs-mobile-panel .webtron-docs-toc-wrapper,
.webtron-docs-mobile-panel .webtron-docs-toc {
    position: static !important;
    max-height: none !important;
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
}

.webtron-docs-mobile-panel .webtron-docs-sidebar-header,
.webtron-docs-mobile-panel .webtron-docs-sidebar-search {
    display: none; /* Hide desktop-only elements in mobile panel */
}

/* ==========================================================================
   Page Navigation (Previous/Next Post Links)
   Fully clickable card-style navigation buttons
   Override WordPress is-layout-flex with high specificity
   ========================================================================== */

/* Override WordPress flex layout with grid - high specificity */
div.wp-block-group.docs-page-navigation,
div.wp-block-group.docs-page-navigation.is-layout-flex,
div.wp-block-group.docs-page-navigation.wp-block-group-is-layout-flex,
.docs-page-navigation.wp-block-group.is-layout-flex {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    flex-wrap: unset !important;
    flex-direction: unset !important;
}

.docs-page-navigation {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
}

/* Navigation link containers - card styling with full click coverage */
.docs-page-navigation > div.post-navigation-link-previous,
.docs-page-navigation > div.post-navigation-link-next,
.docs-page-navigation > .wp-block-post-navigation-link,
.docs-page-navigation > div[class*="post-navigation-link"] {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.docs-page-navigation > div.post-navigation-link-previous:hover,
.docs-page-navigation > div.post-navigation-link-next:hover,
.docs-page-navigation > .wp-block-post-navigation-link:hover,
.docs-page-navigation > div[class*="post-navigation-link"]:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
    background: #f1f5f9;
}

/* Previous - left aligned, first column */
.docs-page-navigation div.post-navigation-link-previous,
.docs-page-navigation .wp-block-post-navigation-link--previous {
    text-align: left;
    grid-column: 1;
    padding-left: 52px;
}

/* Next - right aligned, second column */
.docs-page-navigation div.post-navigation-link-next,
.docs-page-navigation .wp-block-post-navigation-link--next {
    text-align: right;
    grid-column: 2;
    padding-right: 52px;
}

/* Handle single items */
.docs-page-navigation div.post-navigation-link-previous:only-child,
.docs-page-navigation .wp-block-post-navigation-link--previous:only-child {
    grid-column: 1;
}

.docs-page-navigation div.post-navigation-link-next:only-child,
.docs-page-navigation .wp-block-post-navigation-link--next:only-child {
    grid-column: 2;
}

/* Arrow icons using Font Awesome via ::before/::after on the container */
.docs-page-navigation div.post-navigation-link-previous::before,
.docs-page-navigation .wp-block-post-navigation-link--previous::before {
    font-family: "Font Awesome 7 Pro", "Font Awesome 6 Pro", "Font Awesome 6 Free", "FontAwesome";
    font-weight: 900;
    content: "\f060"; /* fa-arrow-left */
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #3b82f6;
    transition: transform 0.2s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.docs-page-navigation div.post-navigation-link-previous:hover::before,
.docs-page-navigation .wp-block-post-navigation-link--previous:hover::before {
    transform: translateY(-50%) translateX(-4px);
}

.docs-page-navigation div.post-navigation-link-next::after,
.docs-page-navigation .wp-block-post-navigation-link--next::after {
    font-family: "Font Awesome 7 Pro", "Font Awesome 6 Pro", "Font Awesome 6 Free", "FontAwesome";
    font-weight: 900;
    content: "\f061"; /* fa-arrow-right */
    position: absolute;
    right: 20px !important;
    left: auto !important;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #3b82f6;
    transition: transform 0.2s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.docs-page-navigation div.post-navigation-link-next:hover::after,
.docs-page-navigation .wp-block-post-navigation-link--next:hover::after {
    transform: translateY(-50%) translateX(4px);
}

/* Hide WordPress built-in SVG arrows - we use Font Awesome pseudo-elements instead */
.docs-page-navigation .wp-block-post-navigation-link svg,
.docs-page-navigation div[class*="post-navigation-link"] svg {
    display: none !important;
}

/* The span that wraps "Previous" or "Next" text */
.docs-page-navigation .wp-block-post-navigation-link__label,
.docs-page-navigation .post-navigation-link__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 6px;
}

/* Next button - explicit right alignment for all inner elements */
.docs-page-navigation div.post-navigation-link-next .wp-block-post-navigation-link__label,
.docs-page-navigation div.post-navigation-link-next .post-navigation-link__label,
.docs-page-navigation .wp-block-post-navigation-link--next .wp-block-post-navigation-link__label {
    text-align: right;
}

.docs-page-navigation div.post-navigation-link-next a,
.docs-page-navigation .wp-block-post-navigation-link--next a {
    text-align: right;
    justify-content: flex-end;
}

/* The anchor link - stretched to cover entire card */
.docs-page-navigation .wp-block-post-navigation-link a,
.docs-page-navigation div[class*="post-navigation-link"] a {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.15s ease;
}

/* Stretch the link to cover the entire card */
.docs-page-navigation .wp-block-post-navigation-link a::after,
.docs-page-navigation div[class*="post-navigation-link"] a::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.docs-page-navigation .wp-block-post-navigation-link:hover a,
.docs-page-navigation div[class*="post-navigation-link"]:hover a {
    color: #3b82f6;
}

/* Dark mode */
body.dark-mode .docs-page-navigation,
body.body_dark .docs-page-navigation {
    border-top-color: #374151;
}

body.dark-mode .docs-page-navigation > .wp-block-post-navigation-link,
body.dark-mode .docs-page-navigation > div[class*="post-navigation-link"],
body.body_dark .docs-page-navigation > .wp-block-post-navigation-link,
body.body_dark .docs-page-navigation > div[class*="post-navigation-link"] {
    background: #1f2937;
    border-color: #374151;
}

body.dark-mode .docs-page-navigation > .wp-block-post-navigation-link:hover,
body.dark-mode .docs-page-navigation > div[class*="post-navigation-link"]:hover,
body.body_dark .docs-page-navigation > .wp-block-post-navigation-link:hover,
body.body_dark .docs-page-navigation > div[class*="post-navigation-link"]:hover {
    background: #263244;
    border-color: #60a5fa;
}

body.dark-mode .docs-page-navigation .wp-block-post-navigation-link__label,
body.dark-mode .docs-page-navigation .post-navigation-link__label,
body.body_dark .docs-page-navigation .wp-block-post-navigation-link__label,
body.body_dark .docs-page-navigation .post-navigation-link__label {
    color: #94a3b8;
}

body.dark-mode .docs-page-navigation .wp-block-post-navigation-link a,
body.dark-mode .docs-page-navigation div[class*="post-navigation-link"] a,
body.body_dark .docs-page-navigation .wp-block-post-navigation-link a,
body.body_dark .docs-page-navigation div[class*="post-navigation-link"] a {
    color: #f1f5f9;
}

body.dark-mode .docs-page-navigation .wp-block-post-navigation-link:hover a,
body.dark-mode .docs-page-navigation div[class*="post-navigation-link"]:hover a,
body.body_dark .docs-page-navigation .wp-block-post-navigation-link:hover a,
body.body_dark .docs-page-navigation div[class*="post-navigation-link"]:hover a {
    color: #60a5fa;
}

body.dark-mode .docs-page-navigation .wp-block-post-navigation-link--previous::before,
body.dark-mode .docs-page-navigation .wp-block-post-navigation-link--next::after,
body.dark-mode .docs-page-navigation div.post-navigation-link-previous::before,
body.dark-mode .docs-page-navigation div.post-navigation-link-next::after,
body.body_dark .docs-page-navigation .wp-block-post-navigation-link--previous::before,
body.body_dark .docs-page-navigation .wp-block-post-navigation-link--next::after,
body.body_dark .docs-page-navigation div.post-navigation-link-previous::before,
body.body_dark .docs-page-navigation div.post-navigation-link-next::after {
    color: #60a5fa;
}

/* Responsive */
@media screen and (max-width: 600px) {
    div.wp-block-group.docs-page-navigation,
    div.wp-block-group.docs-page-navigation.is-layout-flex {
        grid-template-columns: 1fr !important;
    }
    
    .docs-page-navigation .wp-block-post-navigation-link--next,
    .docs-page-navigation div.post-navigation-link-next {
        grid-column: 1 !important;
        text-align: right !important;
        padding-right: 52px !important;
        padding-left: 24px !important;
    }
    
    .docs-page-navigation div.post-navigation-link-next::after,
    .docs-page-navigation .wp-block-post-navigation-link--next::after {
        right: 20px !important;
        left: auto !important;
        content: "\f061" !important; /* fa-arrow-right */
    }
}

/* Mobile responsive - show unified panel */
@media screen and (max-width: 768px) {
    /* Show FAB container on mobile */
    .webtron-fab-container {
        display: flex;
    }
    
    /* Show toggle button wrapper (legacy fallback) */
    .webtron-docs-mobile-toggle-wrapper {
        display: block;
    }
    
    /* Show mobile panel (it's hidden by transform until active) */
    .webtron-docs-mobile-panel {
        display: flex;
    }
    
    /* Hide desktop sidebar and TOC columns */
    .docs-sidebar-column,
    .docs-toc-column {
        display: none !important;
    }
    
    /* Show overlay when mobile panel is open */
    .webtron-docs-mobile-overlay.active {
        display: block;
    }
    
    /* Hide desktop sidebar toggle on mobile */
    .webtron-docs-sidebar-toggle {
        display: none !important;
    }
    
    /* Prevent body scroll when mobile panel is open */
    body.mobile-panel-open {
        overflow: hidden !important;
    }
    
    /* Adjust FAB buttons for smaller screens */
    .webtron-fab-container .webtron-fab-button {
        width: 45px;
        height: 45px;
    }
    
    .webtron-fab-container .webtron-fab-button i,
    .webtron-fab-container .webtron-fab-button svg {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }
}
/* ==========================================================================
   ULTRAWIDE MONITOR RESPONSIVE STYLES
   ========================================================================== */

/* QHD / 2K Monitors (2560px) */
@media screen and (min-width: 2560px) {
    /* Block template columns layout */
    .docs-single-page .wp-block-columns {
        max-width: 2000px;
        margin: 0 auto;
        gap: 40px !important;
    }
    
    .docs-sidebar-column {
        flex-basis: 280px !important;
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
    }
    
    .docs-toc-column {
        flex-basis: 260px !important;
        width: 260px !important;
        min-width: 260px !important;
        max-width: 260px !important;
    }
    
    .docs-single-page.sidebar-collapsed .docs-sidebar-column {
        flex-basis: 64px !important;
        width: 64px !important;
        min-width: 64px !important;
    }
    
    /* Docs Layout - wider grid with more spacing (CSS Grid fallback) */
    .webtron-docs-layout {
        max-width: 2200px;
        grid-template-columns: 320px minmax(0, 1fr) 280px;
        gap: 48px;
        padding: 48px 64px;
    }
    
    .webtron-docs-layout.sidebar-collapsed {
        grid-template-columns: 72px minmax(0, 1fr) 280px;
    }
    
    .webtron-docs-layout.two-column {
        max-width: 1800px;
        grid-template-columns: 320px minmax(0, 1fr);
    }
    
    .webtron-docs-layout.single-column {
        max-width: 1200px;
    }
    
    /* Sidebar */
    .webtron-docs-sidebar {
        width: 280px;
        max-height: calc(100vh - 140px);
    }
    
    .webtron-docs-nav-link {
        font-size: 0.9375rem;
        padding: 0.625rem 0.875rem;
    }
    
    .webtron-docs-nav-toggle {
        width: 26px;
        height: 26px;
    }
    
    /* Content area */
    .webtron-docs-content {
        font-size: 1.0625rem;
        line-height: 1.75;
    }
    
    .webtron-docs-content h1 {
        font-size: 2.75rem;
    }
    
    .webtron-docs-content h2 {
        font-size: 2rem;
    }
    
    .webtron-docs-content h3 {
        font-size: 1.5rem;
    }
    
    .webtron-docs-content h4 {
        font-size: 1.25rem;
    }
    
    /* TOC */
    .webtron-docs-toc-wrapper {
        width: 280px;
    }
    
    .webtron-docs-toc {
        padding: 1.5rem;
    }
    
    .webtron-docs-toc-title {
        font-size: 0.9375rem;
    }
    
    .webtron-docs-toc a {
        font-size: 0.9375rem;
        padding: 0.5rem 0;
    }
    
    /* Breadcrumbs */
    .webtron-docs-breadcrumbs {
        font-size: 1rem;
        padding: 0.75rem 0;
    }
    
    /* Doc header */
    .webtron-doc-header h1 {
        font-size: 2.75rem;
    }
    
    /* Navigation links (prev/next) */
    .docs-page-navigation {
        margin-top: 4rem;
        padding: 2rem 0;
    }
    
    .post-navigation-link {
        font-size: 1.125rem;
        padding: 1.5rem 2rem;
    }
    
    /* Feedback widget */
    .webtron-docs-feedback {
        padding: 2rem;
        margin-top: 3rem;
    }
    
    .webtron-docs-feedback-title {
        font-size: 1.375rem;
    }
    
    /* Related docs */
    .webtron-docs-related {
        padding: 2rem;
    }
    
    .webtron-docs-related-title {
        font-size: 1.375rem;
    }
    
    .webtron-docs-related-item {
        padding: 1rem 1.25rem;
    }
}

/* 4K / Ultra-wide Monitors (3440px+) */
@media screen and (min-width: 3440px) {
    /* Block template columns layout */
    .docs-single-page .wp-block-columns {
        max-width: 2600px;
        margin: 0 auto;
        gap: 56px !important;
    }
    
    .docs-sidebar-column {
        flex-basis: 320px !important;
        width: 320px !important;
        min-width: 320px !important;
        max-width: 320px !important;
    }
    
    .docs-toc-column {
        flex-basis: 300px !important;
        width: 300px !important;
        min-width: 300px !important;
        max-width: 300px !important;
    }
    
    .docs-single-page.sidebar-collapsed .docs-sidebar-column {
        flex-basis: 72px !important;
        width: 72px !important;
        min-width: 72px !important;
    }
    
    /* Docs Layout - maximum width with generous spacing (CSS Grid fallback) */
    .webtron-docs-layout {
        max-width: 2800px;
        grid-template-columns: 380px minmax(0, 1fr) 340px;
        gap: 64px;
        padding: 64px 96px;
    }
    
    .webtron-docs-layout.sidebar-collapsed {
        grid-template-columns: 80px minmax(0, 1fr) 340px;
    }
    
    .webtron-docs-layout.two-column {
        max-width: 2400px;
        grid-template-columns: 380px minmax(0, 1fr);
    }
    
    .webtron-docs-layout.single-column {
        max-width: 1400px;
    }
    
    /* Sidebar */
    .webtron-docs-sidebar {
        width: 320px;
    }
    
    .webtron-docs-nav-link {
        font-size: 1.0625rem;
        padding: 0.875rem 1.25rem;
    }
    
    /* Content area - larger typography for readability */
    .webtron-docs-content {
        font-size: 1.125rem;
        line-height: 1.8;
    }
    
    .webtron-docs-content h1 {
        font-size: 3.25rem;
    }
    
    .webtron-docs-content h2 {
        font-size: 2.375rem;
    }
    
    .webtron-docs-content h3 {
        font-size: 1.75rem;
    }
    
    .webtron-docs-content h4 {
        font-size: 1.375rem;
    }
    
    .webtron-docs-content p,
    .webtron-docs-content li {
        margin-bottom: 1.25rem;
    }
    
    .webtron-docs-content pre {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .webtron-docs-content code {
        font-size: 0.9375em;
    }
    
    /* TOC */
    .webtron-docs-toc-wrapper {
        width: 340px;
    }
    
    .webtron-docs-toc {
        padding: 2rem;
    }
    
    .webtron-docs-toc-title {
        font-size: 1rem;
    }
    
    .webtron-docs-toc a {
        font-size: 1rem;
        padding: 0.625rem 0;
    }
    
    /* Breadcrumbs */
    .webtron-docs-breadcrumbs {
        font-size: 1.0625rem;
    }
    
    /* Doc header */
    .webtron-doc-header h1 {
        font-size: 3.25rem;
        margin-bottom: 1.5rem;
    }
    
    .webtron-doc-header .doc-meta {
        font-size: 1rem;
    }
    
    /* Navigation links */
    .post-navigation-link {
        font-size: 1.25rem;
        padding: 2rem 2.5rem;
    }
    
    /* Feedback widget */
    .webtron-docs-feedback {
        padding: 2.5rem;
        border-radius: 16px;
    }
    
    .webtron-docs-feedback-title {
        font-size: 1.5rem;
    }
    
    .webtron-docs-feedback-buttons button {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Related docs */
    .webtron-docs-related {
        padding: 2.5rem;
    }
    
    .webtron-docs-related-title {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    /* Hide everything except content column */
    body.webtron-print-active .docs-sidebar-column,
    body.webtron-print-active .docs-toc-column,
    body.webtron-print-active .webtron-docs-toc-wrapper,
    body.webtron-print-active .webtron-docs-sidebar,
    body.webtron-print-active .webtron-docs-breadcrumbs,
    body.webtron-print-active .webtron-docs-feedback,
    body.webtron-print-active .webtron-docs-related,
    body.webtron-print-active .webtron-docs-nav-prev-next,
    body.webtron-print-active .webtron-ai-explainer-tooltip,
    body.webtron-print-active .webtron-ai-explainer-modal,
    body.webtron-print-active .webtron-ai-chat-widget,
    body.webtron-print-active header,
    body.webtron-print-active footer,
    body.webtron-print-active nav,
    body.webtron-print-active .site-header,
    body.webtron-print-active .site-footer,
    body.webtron-print-active #masthead,
    body.webtron-print-active #colophon,
    body.webtron-print-active .admin-bar,
    body.webtron-print-active #wpadminbar {
        display: none !important;
    }
    
    /* Reset layout for print */
    body.webtron-print-active .docs-single-page,
    body.webtron-print-active .docs-single-page .wp-block-columns {
        display: block !important;
    }
    
    body.webtron-print-active .docs-content-column {
        width: 100% !important;
        max-width: 100% !important;
        flex-basis: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Ensure content is visible */
    body.webtron-print-active .docs-content-column * {
        visibility: visible !important;
    }
    
    /* Typography adjustments for print */
    body.webtron-print-active .docs-content-column {
        font-size: 12pt;
        line-height: 1.5;
        color: #000 !important;
        background: #fff !important;
    }
    
    body.webtron-print-active .docs-content-column h1 {
        font-size: 24pt;
    }
    
    body.webtron-print-active .docs-content-column h2 {
        font-size: 18pt;
    }
    
    body.webtron-print-active .docs-content-column h3 {
        font-size: 14pt;
    }
    
    /* Ensure images print properly */
    body.webtron-print-active .docs-content-column img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
    
    /* Prevent page breaks inside elements */
    body.webtron-print-active .docs-content-column p,
    body.webtron-print-active .docs-content-column li,
    body.webtron-print-active .docs-content-column pre,
    body.webtron-print-active .docs-content-column blockquote {
        page-break-inside: avoid;
    }
    
    /* Keep headings with following content */
    body.webtron-print-active .docs-content-column h1,
    body.webtron-print-active .docs-content-column h2,
    body.webtron-print-active .docs-content-column h3,
    body.webtron-print-active .docs-content-column h4 {
        page-break-after: avoid;
    }
    
    /* Links */
    body.webtron-print-active .docs-content-column a {
        color: #000 !important;
        text-decoration: underline;
    }
    
    /* Code blocks */
    body.webtron-print-active .docs-content-column pre,
    body.webtron-print-active .docs-content-column code {
        background: #f5f5f5 !important;
        border: 1px solid #ddd !important;
        color: #000 !important;
    }
}