/**
 * wpForo Documentation Styles
 * Custom styles for weDocs plugin documentation pages
 *
 * @package wpForo_AI_Edition
 * @version 1.0.0
 */

/* ========================================
   CSS VARIABLES
======================================== */
:root {
    --docs-primary: #2b96de;
    --docs-primary-dark: #1e7ab8;
    --docs-primary-light: #e8f4fc;
    --docs-purple: #667eea;
    --docs-text-dark: #1a202c;
    --docs-text-medium: #4a5568;
    --docs-text-light: #718096;
    --docs-bg-white: #ffffff;
    --docs-bg-light: #f7fafc;
    --docs-bg-gray: #edf2f7;
    --docs-border-light: #e2e8f0;
    --docs-border-medium: #cbd5e0;
    --docs-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --docs-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --docs-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --docs-radius-sm: 6px;
    --docs-radius-md: 10px;
    --docs-radius-lg: 16px;
    --docs-transition: all 0.2s ease;
    --docs-sidebar-width: 300px;
    --docs-content-max-width: 900px;
}

/* ========================================
   GLOBAL LAYOUT
======================================== */
.wedocs-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
    background: var(--docs-bg-white);
}

.wedocs-single-wrap {
    display: flex;
    gap: 48px;
    align-items: flex-start;
    max-width: 1300px;
    margin: 30px auto;
}

/* ========================================
   SIDEBAR NAVIGATION
======================================== */
.wedocs-sidebar {
    width: var(--docs-sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding-right: 16px;
}

/* Custom scrollbar for sidebar */
.wedocs-sidebar::-webkit-scrollbar {
    width: 5px;
}

.wedocs-sidebar::-webkit-scrollbar-track {
    background: var(--docs-bg-light);
    border-radius: 3px;
}

.wedocs-sidebar::-webkit-scrollbar-thumb {
    background: var(--docs-border-medium);
    border-radius: 3px;
}

.wedocs-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--docs-primary);
}

/* Sidebar title */
.wedocs-sidebar-title,
.wedocs-sidebar > h3,
.wedocs-sidebar > .widget-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--docs-text-light);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--docs-border-light);
}

/* Sidebar menu */
.wedocs-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wedocs-sidebar > ul > li {
    margin-bottom: 4px;
}

.wedocs-sidebar ul li a {
    display: block;
    padding: 10px 14px;
    color: var(--docs-text-medium);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--docs-transition);
    border-left: 3px solid transparent;
}

.wedocs-sidebar ul li a:hover {
    background: var(--docs-primary-light);
    color: var(--docs-primary-dark);
    border-left-color: var(--docs-primary);
}

.wedocs-sidebar ul li.current_page_item > a,
.wedocs-sidebar ul li.current-menu-item > a,
.wedocs-sidebar ul li a.active {
    background: var(--docs-primary-light);
    color: var(--docs-primary-dark);
    font-weight: 600;
    border-left-color: var(--docs-primary);
    margin-top: 2px;
    margin-bottom: 2px;
}

/* Nested menu items */
.wedocs-sidebar ul ul {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--docs-border-light);
    margin-top: 4px;
}

.wedocs-sidebar ul ul li a {
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* Sidebar icons */
.wedocs-sidebar li a::before {
    display: none;
}

/* Collapsible sections */
.wedocs-sidebar .children,
.wedocs-sidebar .sub-menu {
    display: none;
}

.wedocs-sidebar li.current_page_item .children,
.wedocs-sidebar li.current_page_ancestor .children,
.wedocs-sidebar li.current-menu-ancestor .sub-menu,
.wedocs-sidebar li.open .children,
.wedocs-sidebar li.open .sub-menu {
    display: block;
}

/* weDocs toggle states */
.wedocs-sidebar li.wd-state-open > .children,
.wedocs-sidebar li.wd-state-open > .sub-menu,
.wedocs-sidebar li.wd-state-open > ul {
    display: block;
}

.wedocs-sidebar li.wd-state-closed > .children,
.wedocs-sidebar li.wd-state-closed > .sub-menu,
.wedocs-sidebar li.wd-state-closed > ul {
    display: none !important;
}

/* Caret toggle styling */
.wedocs-sidebar .wedocs-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-left: 4px;
    flex-shrink: 0;
}

.wedocs-sidebar li.wd-state-open > a .wedocs-caret,
.wedocs-sidebar li.wd-state-open > .wedocs-caret {
    transform: rotate(180deg);
}

.wedocs-sidebar li.wd-state-closed > a .wedocs-caret,
.wedocs-sidebar li.wd-state-closed > .wedocs-caret {
    transform: rotate(0deg);
}

.wedocs-single-wrap .wedocs-sidebar ul.doc-nav-list li a{
    padding: 5px 10px 4px 20px !important;
}

footer.entry-footer.wedocs-entry-footer .feedback-content{
    width: 100%;
}

/* ========================================
   MAIN CONTENT AREA
======================================== */
.wedocs-single-content {
    flex: 1;
    max-width: var(--docs-content-max-width);
    min-width: 0;
}

/* Breadcrumbs */
.wedocs-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 0.875rem;
    color: var(--docs-text-light);
}

.wedocs-breadcrumb a {
    color: var(--docs-primary);
    text-decoration: none;
    transition: var(--docs-transition);
}

.wedocs-breadcrumb a:hover {
    color: var(--docs-primary-dark);
    text-decoration: underline;
}

.wedocs-breadcrumb .delimiter,
.wedocs-breadcrumb .separator,
.wedocs-breadcrumb span:not(:last-child)::after {
    content: '›';
    margin: 0 4px;
    color: var(--docs-border-medium);
}

/* Article container */
.wedocs-single-content article {
    background: var(--docs-bg-white);
}

/* ========================================
   AI DOCS FEATURE VIDEO
======================================== */
.ai-doc-video-wrapper {
    margin-bottom: 32px;
    border-radius: var(--docs-radius-lg);
    overflow: hidden;
    box-shadow: var(--docs-shadow-lg);
    background: var(--docs-bg-light);
    border: 1px solid var(--docs-border-light);
}

.ai-doc-video-container {
    position: relative;
    width: 100%;
    background: #f0f4f8;
}

.ai-doc-video-container video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--docs-radius-lg);
}

/* Video loading state */
.ai-doc-video-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--docs-border-light);
    border-top-color: var(--docs-primary);
    border-radius: 50%;
    animation: docs-video-spin 1s linear infinite;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.ai-doc-video-container.video-loaded::before {
    opacity: 0;
    pointer-events: none;
}

@keyframes docs-video-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ai-doc-video-wrapper {
        margin-bottom: 24px;
        border-radius: var(--docs-radius-md);
    }

    .ai-doc-video-container video {
        border-radius: var(--docs-radius-md);
    }
}

/* ========================================
   ARTICLE HEADER
======================================== */
.wedocs-single-content .entry-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--docs-border-light);
}

.wedocs-single-content .entry-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--docs-text-dark);
    line-height: 1.3;
    margin: 0;
}

/* Print button */
.wedocs-print-article {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--docs-bg-light);
    border-radius: var(--docs-radius-sm);
    color: var(--docs-text-light);
    transition: var(--docs-transition);
    flex-shrink: 0;
}

.wedocs-print-article:hover {
    background: var(--docs-primary-light);
    color: var(--docs-primary);
}

/* ========================================
   ARTICLE CONTENT
======================================== */
.wedocs-single-content .entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--docs-text-medium);
}

/* Headings */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: var(--docs-text-dark);
    font-weight: 700;
    line-height: 1.4;
    margin-top: 2em;
    margin-bottom: 0.75em;
}

.entry-content h1 { font-size: 2rem; }
.entry-content h2 {
    font-size: 1.625rem;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--docs-border-light);
}
.entry-content h3 { font-size: 1.375rem; }
.entry-content h4 { font-size: 1.125rem; }
.entry-content h5 { font-size: 1rem; }
.entry-content h6 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.5px; }

.entry-content h1:first-child,
.entry-content h2:first-child,
.entry-content h3:first-child {
    margin-top: 0;
}

/* Paragraphs */
.entry-content p {
    margin-bottom: 1.5em;
}

/* Links */
.entry-content a {
    color: var(--docs-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--docs-transition);
}

.entry-content a:hover {
    color: var(--docs-primary-dark);
    text-decoration: underline;
}

/* ========================================
   LISTS
======================================== */
.entry-content ul,
.entry-content ol {
    margin: 0 0 1.5em 0;
    padding-left: 1.5em;
}

.entry-content ul {
    list-style: none;
    padding-left: 0;
}

.entry-content ul li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 3px;
}

.entry-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--docs-primary);
    border-radius: 50%;
}

.entry-content ol li {
    margin-bottom: 10px;
    padding-left: 4px;
}

.entry-content ol li::marker {
    color: var(--docs-primary);
    font-weight: 600;
}

/* Nested lists */
.entry-content ul ul,
.entry-content ol ol,
.entry-content ul ol,
.entry-content ol ul {
    margin-top: 10px;
    margin-bottom: 0;
}

.entry-content ul ul li::before {
    background: transparent;
    border: 2px solid var(--docs-primary);
    width: 4px;
    height: 4px;
}

/* ========================================
   IMAGES
======================================== */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--docs-radius-md);
    box-shadow: var(--docs-shadow-md);
    margin: 1.5em 0;
    border: 1px solid var(--docs-border-light);
}

.entry-content img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.entry-content img.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.entry-content img.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

/* Image captions */
.entry-content .wp-caption {
    max-width: 100%;
    margin: 1.5em 0;
}

.entry-content .wp-caption img {
    margin-bottom: 0.5em;
}

.entry-content .wp-caption-text,
.entry-content figcaption {
    font-size: 0.875rem;
    color: var(--docs-text-light);
    text-align: center;
    font-style: italic;
    padding: 8px 0;
}

/* Image gallery */
.entry-content .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin: 1.5em 0;
}

.entry-content .gallery-item {
    margin: 0;
}

.entry-content .gallery-item img {
    margin: 0;
    width: 100%;
}

/* ========================================
   TABLES
======================================== */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
    border-radius: var(--docs-radius-md);
    overflow: hidden;
    box-shadow: var(--docs-shadow-sm);
    border: 1px solid var(--docs-border-light);
}

.entry-content table thead {
    background: linear-gradient(135deg, var(--docs-primary) 0%, var(--docs-purple) 100%);
}

.entry-content table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.entry-content table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--docs-border-light);
    color: var(--docs-text-medium);
}

.entry-content table tbody tr:last-child td {
    border-bottom: none;
}

.entry-content table tbody tr:nth-child(even) {
    background: var(--docs-bg-light);
}

.entry-content table tbody tr:hover {
    background: var(--docs-primary-light);
}

/* Responsive tables */
@media (max-width: 768px) {
    .entry-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ========================================
   CODE BLOCKS
======================================== */
.entry-content code {
    background: var(--docs-bg-gray);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
    color: var(--docs-primary-dark);
    border: 1px solid var(--docs-border-light);
}

.entry-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 24px;
    border-radius: var(--docs-radius-md);
    overflow-x: auto;
    margin: 1.5em 0;
    font-size: 0.9rem;
    line-height: 1.6;
    box-shadow: var(--docs-shadow-md);
}

.entry-content pre code {
    background: transparent;
    padding: 0;
    border: none;
    color: inherit;
    font-size: inherit;
}

/* ========================================
   BLOCKQUOTES
======================================== */
.entry-content blockquote {
    margin: 1.5em 0;
    padding: 20px 24px;
    background: var(--docs-primary-light);
    border-left: 4px solid var(--docs-primary);
    border-radius: 0 var(--docs-radius-md) var(--docs-radius-md) 0;
}

.entry-content blockquote p {
    margin-bottom: 0;
    font-style: italic;
    color: var(--docs-text-dark);
}

.entry-content blockquote cite {
    display: block;
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--docs-text-light);
    font-style: normal;
}

/* ========================================
   NOTICES / ALERTS
======================================== */
.entry-content .notice,
.entry-content .alert,
.entry-content .info-box,
.entry-content .warning-box,
.entry-content .note {
    padding: 16px 20px;
    border-radius: var(--docs-radius-md);
    margin: 1.5em 0;
    border-left: 4px solid;
}

.entry-content .notice-info,
.entry-content .alert-info,
.entry-content .note {
    background: #e8f4fc;
    border-left-color: #2b96de;
    color: #1e5b8a;
}

.entry-content .notice-warning,
.entry-content .alert-warning {
    background: #fef3cd;
    border-left-color: #f0ad4e;
    color: #856404;
}

.entry-content .notice-danger,
.entry-content .alert-danger,
.entry-content .notice-error {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.entry-content .notice-success,
.entry-content .alert-success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

/* ========================================
   HORIZONTAL RULE
======================================== */
.entry-content hr {
    border: none;
    border-top: 2px solid var(--docs-border-light);
    margin: 3em 0;
}

/* ========================================
   CHILD ARTICLES
======================================== */
/* Article child pages list */
.article-child,
.article-child.well {
    background: var(--docs-bg-light);
    border: 1px solid var(--docs-border-light);
    border-radius: var(--docs-radius-md);
    padding: 28px;
    margin: 2.5em 0;
}

.article-child h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--docs-text-light);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--docs-border-light);
}

/* Main list - vertical layout */
.article-child > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-child > ul > li {
    padding: 0;
    margin: 0;
}

.article-child > ul > li::before {
    display: none;
}

/* Main level links */
.article-child > ul > li > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--docs-bg-white);
    border: 1px solid var(--docs-border-light);
    border-radius: var(--docs-radius-sm);
    color: var(--docs-text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--docs-transition);
    text-decoration: none;
}

.article-child > ul > li > a::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--docs-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.article-child > ul > li > a:hover {
    background: var(--docs-primary-light);
    border-color: var(--docs-primary);
    color: var(--docs-primary-dark);
    text-decoration: none;
    transform: translateX(4px);
}

/* Nested children list */
.article-child ul.children {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0 0 0 28px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-left: 2px solid var(--docs-border-light);
}

.article-child ul.children li {
    padding: 0;
    margin: 0;
}

.article-child ul.children li::before {
    display: none;
}

.article-child ul.children li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--docs-bg-white);
    border: 1px solid var(--docs-border-light);
    border-radius: var(--docs-radius-sm);
    color: var(--docs-text-medium);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--docs-transition);
    text-decoration: none;
}

.article-child ul.children li a::before {
    content: '↳';
    color: var(--docs-primary);
    font-weight: 700;
    font-size: 0.85rem;
}

.article-child ul.children li a:hover {
    background: var(--docs-primary-light);
    border-color: var(--docs-primary);
    color: var(--docs-primary-dark);
    text-decoration: none;
    transform: translateX(4px);
}

/* Page item states */
.article-child li.current_page_item > a {
    background: var(--docs-primary-light);
    border-color: var(--docs-primary);
    color: var(--docs-primary-dark);
}

.article-child li.page_item_has_children > a::after {
    content: '';
    margin-left: auto;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--docs-text-light);
}

/* ========================================
   TAGS
======================================== */
.tags-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2em;
    padding-top: 1.5em;
    border-top: 1px solid var(--docs-border-light);
}

.tags-links a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--docs-bg-light);
    border: 1px solid var(--docs-border-light);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--docs-text-medium);
    transition: var(--docs-transition);
}

.tags-links a:hover {
    background: var(--docs-primary-light);
    border-color: var(--docs-primary);
    color: var(--docs-primary);
    text-decoration: none;
}

/* ========================================
   DOC NAVIGATION (PREV/NEXT)
======================================== */
.wedocs-doc-nav,
.doc-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    margin: 3em 0;
    padding: 2em 0;
    border-top: 1px solid var(--docs-border-light);
    border-bottom: 1px solid var(--docs-border-light);
}

/* Hide screen reader text */
.wedocs-doc-nav .assistive-text,
.wedocs-doc-nav .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Nav prev/next spans */
.wedocs-doc-nav .nav-prev,
.wedocs-doc-nav .nav-next,
.doc-nav .nav-prev,
.doc-nav .nav-next {
    flex: 1;
    display: flex;
}

.wedocs-doc-nav .nav-prev,
.doc-nav .nav-prev {
    justify-content: flex-start;
}

.wedocs-doc-nav .nav-next,
.doc-nav .nav-next {
    justify-content: flex-end;
}

/* Links inside nav spans */
.wedocs-doc-nav .nav-prev a,
.wedocs-doc-nav .nav-next a,
.doc-nav .nav-prev a,
.doc-nav .nav-next a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--docs-bg-light);
    border: 1px solid var(--docs-border-light);
    border-radius: var(--docs-radius-md);
    text-decoration: none;
    transition: var(--docs-transition);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--docs-text-dark);
    min-width: 200px;
}

.wedocs-doc-nav .nav-prev a {
    padding-left: 20px;
}

.wedocs-doc-nav .nav-next a {
    padding-right: 20px;
    text-align: right;
    justify-content: flex-end;
}

.wedocs-doc-nav .nav-prev a:hover,
.wedocs-doc-nav .nav-next a:hover,
.doc-nav .nav-prev a:hover,
.doc-nav .nav-next a:hover {
    background: var(--docs-primary-light);
    border-color: var(--docs-primary);
    color: var(--docs-primary-dark);
    text-decoration: none;
}

/* ========================================
   FOOTER / FEEDBACK
======================================== */
.wedocs-entry-footer {
    margin-top: 3em;
    padding-top: 2em;
    border-top: 1px solid var(--docs-border-light);
}

.help-content {
    margin-bottom: 24px;
}

.help-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--docs-bg-light);
    border-radius: var(--docs-radius-md);
    border: 1px solid var(--docs-border-light);
}

.help-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-icon svg {
    width: 24px;
    height: 24px;
}

.wedocs-help-link {
    font-size: 0.95rem;
    color: var(--docs-text-medium);
}

.wedocs-help-link a {
    color: var(--docs-primary);
    font-weight: 600;
}

.wedocs-help-link time {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--docs-text-light);
}

/* Feedback section */
.feedback-content {
    padding: 24px;
    background: var(--docs-bg-light);
    border-radius: var(--docs-radius-md);
    border: 1px solid var(--docs-border-light);
    text-align: center;
}

.feedback-content .feedback-title,
.feedback-content > span:first-child {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--docs-text-dark);
    margin-bottom: 16px;
}

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

.feedback-content button,
.feedback-content .wedocs-feedback-wrap a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 2px solid var(--docs-border-light);
    border-radius: var(--docs-radius-sm);
    background: var(--docs-bg-white);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--docs-text-medium);
    cursor: pointer;
    transition: var(--docs-transition);
}

.feedback-content button:hover,
.feedback-content .wedocs-feedback-wrap a:hover {
    border-color: var(--docs-primary);
    color: var(--docs-primary);
    background: var(--docs-primary-light);
}

.feedback-content button.positive:hover {
    border-color: #28a745;
    color: #28a745;
    background: #d4edda;
}

.feedback-content button.negative:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: #f8d7da;
}

/* ========================================
   SEARCH
======================================== */
.wedocs-search-form,
.docs-search-form {
    margin-bottom: 24px;
}

.wedocs-search-form input,
.docs-search-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--docs-border-light);
    border-radius: var(--docs-radius-sm);
    font-size: 0.95rem;
    transition: var(--docs-transition);
}

.wedocs-search-form input:focus,
.docs-search-form input:focus {
    outline: none;
    border-color: var(--docs-primary);
    box-shadow: 0 0 0 3px rgba(43, 150, 222, 0.1);
}

/* ========================================
   DOCS HOME PAGE - POST ID 143
   Full-width horizontal rectangles layout
======================================== */

/* Main wrapper - FULL WIDTH */
#post-143 .wedocs-shortcode-wrap {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto;
    padding: 40px 0;
}

/* Main list - FULL WIDTH */
#post-143 ul.wedocs-docs-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

/* Override any column classes */
#post-143 ul.wedocs-docs-list.col-1,
#post-143 ul.wedocs-docs-list.col-2,
#post-143 ul.wedocs-docs-list.col-3 {
    display: block !important;
    width: 100% !important;
}

#post-143 ul.wedocs-docs-list.col-1 > li,
#post-143 ul.wedocs-docs-list.col-2 > li,
#post-143 ul.wedocs-docs-list.col-3 > li {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

/* Main doc card - FULL WIDTH */
#post-143 li.wedocs-docs-single {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0px !important;
}

#post-143 .entry-content ul li::before{
    display: none;
}
#post-143 .wedocs-search-form{
    display: none;
}

/* Main title */
#post-143 li.wedocs-docs-single > h3 {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin: 0 !important;
    padding: 24px 28px !important;
    background: linear-gradient(135deg, #e8f4fc 0%, #f0f7fc 100%) !important;
    border-bottom: 3px solid #2b96de !important;
}

#post-143 li.wedocs-docs-single > h3 a {
    color: inherit !important;
    text-decoration: none !important;
}

/* Inside container - NO HEIGHT LIMIT */
#post-143 li.wedocs-docs-single .inside {
    padding: 24px !important;
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
}

/* REMOVE ALL BULLETS */
#post-143 .wedocs-doc-sections,
#post-143 .wedocs-doc-sections li,
#post-143 .wedocs-doc-sections ul {
    list-style: none !important;
    list-style-type: none !important;
    padding-left: 0 !important;
}

#post-143 .wedocs-doc-sections::before,
#post-143 .wedocs-doc-sections li::before,
#post-143 .wedocs-doc-sections ul::before {
    display: none !important;
    content: none !important;
}

/* Hide SVG toggles */
#post-143 .wedocs-doc-sections svg {
    display: none !important;
}

/* The sections list - NO HEIGHT LIMIT */
#post-143 ul.wedocs-doc-sections {
    padding: 0 !important;
    margin: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
}

/* PARENT ITEMS - li with a.icon-view - full width rectangles */
#post-143 ul.wedocs-doc-sections > li {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px 12px 0 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

#post-143 ul.wedocs-doc-sections > li > a.icon-view {
    display: block !important;
    padding: 18px 24px !important;
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    color: #1a202c !important;
    text-decoration: none !important;
    background: #fff !important;
    transition: all 0.2s ease !important;
}

#post-143 ul.wedocs-doc-sections > li > a.icon-view:hover {
    background: #e8f4fc !important;
    color: #1e7ab8 !important;
}

/* CHILDREN - ul.children is SIBLING of li, horizontal flex */
#post-143 ul.wedocs-doc-sections > ul.children {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 16px 24px 20px !important;
    margin: 0 0 20px 0 !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-top: none !important;
    border-radius: 0 0 12px 12px !important;
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
}

/* Child items - small pills */
#post-143 ul.wedocs-doc-sections > ul.children > li {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
}

#post-143 ul.wedocs-doc-sections > ul.children > li > a {
    display: inline-block !important;
    padding: 10px 18px !important;
    background: #fff !important;
    border: 1px solid #cbd5e0 !important;
    border-radius: 8px !important;
    color: #4a5568 !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

#post-143 ul.wedocs-doc-sections > ul.children > li > a:hover {
    background: #2b96de !important;
    border-color: #2b96de !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(43, 150, 222, 0.3) !important;
}

/* Divider */
#post-143 li.wedocs-docs-single hr.divider {
    margin: 0 !important;
    border: none !important;
    border-top: 1px solid #e2e8f0 !important;
}

/* View Details */
#post-143 .wedocs-doc-link {
    padding: 20px 24px !important;
}

#post-143 .wedocs-doc-link a {
    display: inline-block !important;
    padding: 14px 28px !important;
    background: #2b96de !important;
    color: #fff !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

#post-143 .wedocs-doc-link a:hover {
    background: #1e7ab8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(43, 150, 222, 0.3) !important;
}

/* Responsive */
@media (max-width: 768px) {
    #post-143 .wedocs-shortcode-wrap {
        padding: 20px 16px;
    }

    #post-143 li.wedocs-docs-single .inside {
        padding: 16px !important;
    }

    #post-143 ul.wedocs-doc-sections > li > a.icon-view {
        padding: 14px 18px !important;
        font-size: 1rem !important;
    }

    #post-143 ul.wedocs-doc-sections > ul.children {
        padding: 12px 18px 16px !important;
    }

    #post-143 ul.wedocs-doc-sections > ul.children > li > a {
        padding: 8px 14px !important;
        font-size: 0.9rem !important;
    }
}

/* ========================================
   DOCS LISTING PAGE (ARCHIVE)
======================================== */
.wedocs-docs-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.wedocs-docs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.wedocs-docs-list .wedocs-doc-item,
.wedocs-docs-list article {
    background: var(--docs-bg-white);
    border: 1px solid var(--docs-border-light);
    border-radius: var(--docs-radius-lg);
    padding: 28px;
    transition: var(--docs-transition);
}

.wedocs-docs-list .wedocs-doc-item:hover,
.wedocs-docs-list article:hover {
    border-color: var(--docs-primary);
    box-shadow: var(--docs-shadow-lg);
    transform: translateY(-4px);
}

.wedocs-docs-list .doc-title,
.wedocs-docs-list h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--docs-text-dark);
    margin: 0 0 12px 0;
}

.wedocs-docs-list .doc-title a,
.wedocs-docs-list h2 a {
    color: inherit;
    text-decoration: none;
}

.wedocs-docs-list .doc-title a:hover,
.wedocs-docs-list h2 a:hover {
    color: var(--docs-primary);
}

.wedocs-docs-list .doc-excerpt {
    color: var(--docs-text-medium);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.wedocs-docs-list .doc-count {
    font-size: 0.85rem;
    color: var(--docs-text-light);
    font-weight: 500;
}

.wedocs-single-wrap .wedocs-single-content article .entry-content pre{
    color: #333;
}


/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 1024px) {
    .wedocs-single-wrap {
        flex-direction: column;
    }

    .wedocs-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        padding-right: 0;
        margin-bottom: 32px;
        padding-bottom: 24px;
        border-bottom: 1px solid var(--docs-border-light);
    }

    .wedocs-sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .wedocs-sidebar ul li {
        margin-bottom: 0;
    }

    .wedocs-sidebar ul li a {
        padding: 8px 14px;
        font-size: 0.9rem;
        border: 1px solid var(--docs-border-light);
        border-radius: 0;
        border-left-width: 1px;
    }

    .wedocs-sidebar ul li a:hover,
    .wedocs-sidebar ul li.current_page_item > a {
        border-left-width: 1px;
    }

    .wedocs-sidebar ul ul {
        display: none;
    }

    .wedocs-single-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .wedocs-wrapper {
        padding: 24px 16px;
    }

    .wedocs-single-content .entry-title {
        font-size: 1.75rem;
    }

    .wedocs-single-content .entry-header {
        flex-direction: column;
        gap: 16px;
    }

    .entry-content h2 {
        font-size: 1.375rem;
    }

    .entry-content h3 {
        font-size: 1.2rem;
    }

    .wedocs-doc-nav,
    .doc-nav {
        flex-direction: column;
    }

    .wedocs-doc-nav .nav-prev a,
    .wedocs-doc-nav .nav-next a {
        width: 100%;
        min-width: auto;
        justify-content: center;
        text-align: center;
    }

    .article-child > ul > li > a {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .article-child ul.children {
        padding-left: 20px;
    }

    .article-child ul.children li a {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .entry-content img.alignleft,
    .entry-content img.alignright {
        float: none;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .wedocs-single-content .entry-title {
        font-size: 1.5rem;
    }

    .entry-content {
        font-size: 1rem;
    }

    .entry-content table th,
    .entry-content table td {
        padding: 10px 12px;
    }

    .entry-content pre {
        padding: 16px;
        font-size: 0.85rem;
    }
}

/* ========================================
   IMAGE LIGHTBOX
======================================== */
.docs-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.docs-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.docs-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.docs-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.docs-lightbox.active .docs-lightbox-content {
    transform: scale(1);
}

.docs-lightbox-content img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: var(--docs-radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin: 0;
    border: none;
}

.docs-lightbox-close {
    position: absolute;
    top: -40px;
    right: -10px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.docs-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Lightbox trigger styling */
.entry-content a.docs-lightbox-trigger {
    display: inline-block;
    position: relative;
}

.entry-content a.docs-lightbox-trigger img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.entry-content a.docs-lightbox-trigger:hover img {
    transform: scale(1.02);
    box-shadow: var(--docs-shadow-lg);
}

/* Zoom icon on hover */
.entry-content a.docs-lightbox-trigger::after {
    content: '🔍';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: var(--docs-shadow-sm);
}

.entry-content a.docs-lightbox-trigger:hover::after {
    opacity: 1;
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    .wedocs-sidebar,
    .wedocs-print-article,
    .wedocs-doc-nav,
    .wedocs-entry-footer,
    .wedocs-hide-print {
        display: none !important;
    }

    .wedocs-single-wrap {
        display: block;
    }

    .wedocs-single-content {
        max-width: 100%;
    }

    .entry-content img {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
