/*------------------------------------------------------------------
Helpex Documentation Styles for WordPress
Integrated with Scisco Theme
-------------------------------------------------------------------*/

/*--------------------- [ Root Color Dark & Light Color ] ---------------------*/
:root {
    --docs-body-color: #f8f9fa;
    --docs-title-color: #040404;
    --docs-text-color: #040404;
    --docs-light-text-color: #040404d6;
    --docs-right-light-color: #777;
    --docs-hard-card-title: #161616;
    --docs-main-box-color: #dfe6ed4d;
    --docs-condac-color: #545454;
    --docs-box-shadow: 0px 2px 20px #02051214;
    --docs-line-color: #04040433;
    --docs-client-box: #FFFF;
    --docs-box-color: #fafbff;
    --docs-main-box-color-light: #ffffff;
    --docs-primary: #ff5500;
}

body.dark-docs-theme {
    --docs-body-color: #1a1c23;
    --docs-title-color: #FFFF;
    --docs-text-color: #FFFF;
    --docs-light-text-color: #FFFF;
    --docs-right-light-color: #b9b9b9;
    --docs-hard-card-title: #FFF;
    --docs-main-box-color: #dfe6ed14;
    --docs-condac-color: #9d9d9d;
    --docs-box-shadow: #959da500 0px 0px 4px;
    --docs-line-color: #ffffff24;
    --docs-client-box: #dfe6ed14;
    --docs-box-color: #22242b;
    --docs-main-box-color-light: #dfe6ed14;
}

/*--------------------- [ Documentation Layout ] ---------------------*/

/* Force overflow visible globally to enable sticky */
html,
body,
#scisco-wrapper,
#scisco-main-wrapper,
.site-content,
.site,
#page,
/* Common WP wrapper */
.elementor-section-wrap,
/* Elementor wrapper */
.elementor-section,
.elementor-column,
div[class*="elementor-"] {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
}

/* Specific containers that might block sticky */
.documentation-page .site-content {
    padding-top: 150px !important;
    /* Ensure content starts below header */
}

/* Modern anchor positioning fallback */
.documentation-page h2 {
    scroll-margin-top: 160px;
    /* Header height + buffer for direct anchors */
}

/* Specific containers that might block sticky */
.documentation-page .main-content,
.documentation-page .container-fluid,
.documentation-page .docs-wrapper,
.documentation-page .site-content {
    overflow: visible !important;
    height: auto !important;
}

/* Hide footer on documentation pages to avoid sticky sidebar conflicts */
.documentation-page footer,
.documentation-page #scisco-footer,
.documentation-page .site-footer {
    display: none !important;
}

.docs-wrapper {
    padding-top: 30px;
    padding-bottom: 50px;
    position: relative;
    /* Ensure it's a positioning context */
}

/* ... existing styles ... */

/*--------------------- [ Sidebar Styles ] ---------------------*/

/* Row layout - ensure items stretch to same height for sticky to work */
.docs-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    /* Critical for sticky: column must be full height */
    position: relative;
}

/* Ensure Elementor containers don't break sticky */
.elementor-section,
.elementor-column,
.elementor-widget-wrap,
.elementor-widget {
    overflow: visible !important;
}

/* Sidebar column - Container for the sticky element */
.docs-sidebar-col {
    position: static;
    /* Let inner element handle sticky */
    z-index: 100;
}

/* The actual sticky element */
.docs-topic-sidebar {
    /* Sticky magic */
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 100px !important;

    /* Scroll internal content if taller than view */
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;

    /* Appearance */
    margin-bottom: 24px;
    background-color: var(--docs-box-color);
    border-radius: 10px;
    box-shadow: var(--docs-box-shadow);

    /* Ensure it has width */
    width: 100%;
}

/* Scrollbar styling */
.docs-topic-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-topic-sidebar::-webkit-scrollbar-track {
    background: var(--docs-main-box-color-light);
    border-radius: 3px;
}

.docs-topic-sidebar::-webkit-scrollbar-thumb {
    background: var(--docs-border-color);
    border-radius: 3px;
}

.docs-topic-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--docs-primary-color);
}

/* Responsive - disable sticky on mobile/tablet */
@media (max-width: 991px) {
    .docs-sidebar-col {
        position: static !important;
        margin-bottom: 30px;
        z-index: 1;
        /* Reset z-index */
    }

    .docs-topic-sidebar {
        position: static !important;
        max-height: none !important;
        overflow-y: visible !important;
        width: auto !important;
    }
}

.docs-hx-card-header {
    padding: 24px;
    border-bottom: 1px solid var(--docs-line-color);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background: var(--docs-main-box-color-light);
}

.docs-hx-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    font-family: "Play", sans-serif;
    color: var(--docs-hard-card-title);
    text-transform: capitalize;
}

.docs-gx-card-content {
    padding: 15px 20px;
}

.docs-gx-sb-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.docs-gx-sb-list li {
    padding: 5px 0;
}

.docs-condense-1 {
    padding: 10px 0;
    font-size: 14px;
    font-weight: 500;
    transition: all .3s ease-in-out;
    color: var(--docs-condac-color);
}

.docs-gx-drop-toggle {
    padding: 15px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    color: var(--docs-text-color);
    text-decoration: none;
}

.docs-gx-sb-list .docs-gx-sb-item a {
    width: 100%;
    font-size: 16px;
    line-height: normal;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--docs-text-color);
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.docs-gx-sb-item:hover .docs-gx-drop-toggle {
    transition: all .5s ease;
    color: var(--docs-primary);
}

/* Active state for sidebar items */
.docs-gx-sb-item.active>a,
.docs-gx-sb-item.active .docs-gx-drop-toggle,
.docs-drop-down.active {
    color: var(--docs-primary) !important;
}

.docs-gx-sb-item.active .docs-data-list i,
.docs-drop-down.active i {
    color: var(--docs-primary) !important;
}

.docs-data-list {
    display: flex;
    align-items: center;
    gap: 10px;
}

.docs-data-list i {
    font-size: 18px;
}

.docs-dropdown-data {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
}

.docs-dropdown-data.show {
    display: block;
}

.docs-dropdown-data li {
    padding: 5px 0 0 20px;
}

.docs-drop-down {
    transition: all 0.2s ease-in-out;
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    gap: 10px;
    color: var(--docs-text-color);
    text-decoration: none;
}

.docs-drop-down p {
    text-transform: capitalize;
    font-weight: 400;
    font-size: 15px;
    line-height: 20px;
    margin: 0;
}

.docs-drop-down i {
    font-weight: 400;
    font-size: 15px;
}

.docs-drop-down:hover {
    color: var(--docs-primary) !important;
}

.docs-drop-arrow {
    transform: rotate(270deg);
    transition: transform 0.3s ease;
}

.docs-drop-arrow.rotate {
    transform: rotate(360deg);
}

/*--------------------- [ Content Card Styles ] ---------------------*/
.docs-gx-page-block {
    width: 100%;
    margin-bottom: 25px;
    overflow: hidden;
    background-color: var(--docs-box-color);
    border-radius: 10px;
    box-shadow: var(--docs-box-shadow);
}

.docs-gx-card-header {
    padding: 25px;
    border-bottom: 1px solid var(--docs-line-color);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background-color: var(--docs-main-box-color-light);
}

.docs-second-main-title {
    font-size: 22px;
    font-weight: 600;
    font-family: "Play", sans-serif;
    line-height: 34px;
    color: var(--docs-title-color);
    margin: 0;
}

.docs-header-tools {
    height: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.docs-header-tools a {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--docs-right-light-color);
    border: 1px solid #eee;
    border-radius: 5px;
    text-decoration: none;
}

.docs-gx-content {
    padding: 25px;
}

.docs-intero {
    color: var(--docs-text-color);
}

.docs-popins-data-helpex {
    font-size: 15px;
    line-height: 1.8;
    color: var(--docs-light-text-color);
    margin-bottom: 15px;
}

.docs-step-detail-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--docs-title-color);
    margin: 20px 0 15px;
}

.docs-source-ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.docs-source-ul.docs-box-lix li {
    padding: 10px 15px;
    margin: 5px 0;
    background-color: var(--docs-main-box-color);
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--docs-light-text-color);
}

.docs-source-ul.docs-box-lix li strong {
    color: var(--docs-title-color);
}

.docs-source-ul.docs-box-lix li span {
    color: var(--docs-primary);
}

.docs-source-ul.docs-box-lix li a {
    color: var(--docs-primary);
    text-decoration: none;
}

.docs-source-ul.docs-box-lix li a:hover {
    text-decoration: underline;
}

.docs-source-ul.docs-box-lix img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: var(--docs-box-shadow);
}

/*--------------------- [ Dark Mode Toggle ] ---------------------*/
.docs-theme-toggle {
    background-color: var(--docs-box-color);
    box-shadow: var(--docs-box-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--docs-title-color);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.docs-theme-toggle:hover {
    background-color: var(--docs-primary);
    color: #fff;
}

/*--------------------- [ Responsive Styles ] ---------------------*/
@media (max-width: 1199px) {
    .docs-topic-sidebar {
        position: relative;
        height: auto;
        top: 0;
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .docs-main-title-right {
        font-size: 24px;
        line-height: 36px;
    }

    .docs-page-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .docs-gx-card-header,
    .docs-gx-content {
        padding: 15px;
    }

    .docs-second-main-title {
        font-size: 18px;
    }
}

/*--------------------- [ Code Highlighting (Prism) ] ---------------------*/
code[class*="language-"],
pre[class*="language-"] {
    color: #f8f8f2;
    background: none;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    line-height: 1.5;
    tab-size: 4;
    hyphens: none;
}

pre[class*="language-"] {
    padding: 1em;
    margin: .5em 0;
    overflow: auto;
    border-radius: .3em;
    background: #272822;
}

:not(pre)>code[class*="language-"] {
    padding: .1em;
    border-radius: .3em;
    white-space: normal;
    background: #272822;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #8292a2;
}

.token.punctuation {
    color: #f8f8f2;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
    color: #f92672;
}

.token.boolean,
.token.number {
    color: #ae81ff;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #a6e22e;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
    color: #f8f8f2;
}

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
    color: #e6db74;
}

.token.keyword {
    color: #66d9ef;
}

.token.regex,
.token.important {
    color: #fd971f;
}

.token.important,
.token.bold {
    font-weight: bold;
}

.token.italic {
    font-style: italic;
}

.token.entity {
    cursor: help;
}

/*--------------------- [ Scrollbar Styles ] ---------------------*/
.docs-topic-sidebar::-webkit-scrollbar {
    width: 4px;
}

.docs-topic-sidebar::-webkit-scrollbar-thumb {
    background: var(--docs-line-color);
    border-radius: 4px;
}

.docs-topic-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

/*--------------------- [ Archive List Styles ] ---------------------*/
.docs-archive-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.docs-archive-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--docs-main-box-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--docs-text-color);
    transition: all 0.3s ease;
}

.docs-archive-item:hover {
    background-color: var(--docs-primary);
    color: #fff;
    transform: translateX(5px);
}

.docs-archive-item>i:first-child {
    font-size: 24px;
    margin-right: 15px;
}

.docs-archive-item-content {
    flex: 1;
}

.docs-archive-item-content h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.docs-archive-item-content p {
    margin: 5px 0 0;
    font-size: 13px;
    opacity: 0.8;
}

.docs-archive-item>i:last-child {
    font-size: 20px;
    opacity: 0.5;
}

.docs-count-badge {
    padding: 5px 12px;
    background-color: var(--docs-primary);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/*--------------------- [ Navigation Styles ] ---------------------*/
.docs-navigation {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--docs-line-color);
}

.docs-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: var(--docs-main-box-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--docs-text-color);
    transition: all 0.3s ease;
    font-weight: 500;
}

.docs-nav-link:hover {
    background-color: var(--docs-primary);
    color: #fff;
}

.docs-nav-prev {
    flex-direction: row;
}

.docs-nav-next {
    flex-direction: row;
}

/*--------------------- [ Elementor Content Styles ] ---------------------*/
.docs-elementor-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--docs-light-text-color);
}

.docs-elementor-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--docs-title-color);
    margin: 30px 0 15px;
    padding-top: 20px;
    border-top: 1px solid var(--docs-line-color);
}

.docs-elementor-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.docs-elementor-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--docs-title-color);
    margin: 25px 0 12px;
}

.docs-elementor-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--docs-title-color);
    margin: 20px 0 10px;
}

.docs-elementor-content p {
    margin-bottom: 15px;
}

.docs-elementor-content ul,
.docs-elementor-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.docs-elementor-content li {
    margin-bottom: 8px;
}

.docs-elementor-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: var(--docs-box-shadow);
}

.docs-elementor-content a {
    color: var(--docs-primary);
    text-decoration: none;
}

.docs-elementor-content a:hover {
    text-decoration: underline;
}

.docs-elementor-content blockquote {
    margin: 20px 0;
    padding: 20px 25px;
    background-color: var(--docs-main-box-color);
    border-left: 4px solid var(--docs-primary);
    border-radius: 0 8px 8px 0;
}

.docs-elementor-content table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.docs-elementor-content th,
.docs-elementor-content td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--docs-line-color);
}

.docs-elementor-content th {
    background-color: var(--docs-main-box-color);
    font-weight: 600;
}

/*--------------------- [ Active States ] ---------------------*/
.docs-gx-sb-item.active>a {
    color: var(--docs-primary);
}

.docs-drop-down.active {
    color: var(--docs-primary) !important;
}

.docs-drop-down.active i {
    color: var(--docs-primary);
}