/* ==============================================
   Elementor Documentation Builder — v1.1.0
   Light Theme | Clean Design | SEO-Ready
   ============================================== */

/* ── CSS Custom Properties (Primary color auto-fetched via PHP inline style) ── */
.edb-wrapper {
    --edb-primary:        #4f46e5;
    --edb-primary-light:  #eef2ff;
    --edb-primary-hover:  #4338ca;
    --edb-sidebar-bg:     #f8fafc;
    --edb-sidebar-border: #e2e8f0;
    --edb-text-muted:     #64748b;
    --edb-text-body:      #334155;
    --edb-text-heading:   #0f172a;
    --edb-surface:        #ffffff;
    --edb-border:         #e2e8f0;
    --edb-radius:         14px;
    --edb-transition:     .18s ease;
}

/* ── Reset ── */
.edb-wrapper *,
.edb-wrapper *::before,
.edb-wrapper *::after { box-sizing: border-box; }

/* ── Wrapper ── */
.edb-wrapper {
    display: flex;
    align-items: stretch;
    border-radius: var(--edb-radius);
    overflow: hidden;
    border: 1px solid var(--edb-border);
    box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 8px 32px rgba(0,0,0,.04);
    min-height: 600px;
    font-family: inherit;
    background: var(--edb-surface);
}

.edb-wrapper.edb-sidebar-right { flex-direction: row-reverse; }

/* ── SIDEBAR ── */
.edb-sidebar {
    width: 280px;
    min-width: 280px;
    background-color: var(--edb-sidebar-bg);
    border-right: 1px solid var(--edb-sidebar-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
}

.edb-wrapper.edb-sidebar-right .edb-sidebar {
    border-right: none;
    border-left: 1px solid var(--edb-sidebar-border);
}

.edb-wrapper.edb-sticky-sidebar .edb-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
}

/* ── Search ── */
.edb-search-wrap {
    padding: 16px 14px 12px;
    background: var(--edb-surface);
    border-bottom: 1px solid var(--edb-border);
    position: relative;
}

.edb-search-icon {
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--edb-text-muted);
    pointer-events: none;
    margin-top: 2px;
}

.edb-search-input {
    width: 100%;
    background-color: #f1f5f9;
    border: 1.5px solid transparent;
    border-radius: 8px;
    color: var(--edb-text-heading);
    font-size: 13px;
    padding: 9px 12px 9px 36px !important;
    outline: none;
    transition: border-color var(--edb-transition), background-color var(--edb-transition);
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}

.edb-search-input:focus {
    border-color: var(--edb-primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--edb-primary) 12%, transparent);
}

.edb-search-input::placeholder { color: #94a3b8; }
.edb-search-input::-webkit-search-cancel-button { display: none; }

/* ── Nav List ── */
.edb-nav-list,
.edb-nav-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.edb-nav-list { padding: 10px 0 24px; }

/* ── Parent Group ── */
.edb-nav-parent { margin-bottom: 2px; }

.edb-nav-parent-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px 5px;
    cursor: pointer;
    user-select: none;
    border-radius: 6px;
    margin: 0 6px;
    transition: background var(--edb-transition);
}

.edb-nav-parent-label:hover { background: rgba(0,0,0,.04); }

.edb-nav-parent-text {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0;
    padding: 0;
    flex: 1;
    line-height: 1;
}

/* Collapse arrow SVG */
.edb-collapse-icon {
    display: inline-flex;
    align-items: center;
    color: #cbd5e1;
    transition: transform .22s ease;
    flex-shrink: 0;
}

.edb-nav-parent.edb-collapsed .edb-collapse-icon { transform: rotate(-90deg); }

/* Children */
.edb-nav-children {
    overflow: hidden;
    max-height: 2000px;
    opacity: 1;
    transition: max-height .28s ease, opacity .22s ease;
    padding: 2px 0 6px;
}

.edb-nav-parent.edb-collapsed .edb-nav-children {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    padding: 0;
}

/* Child item */
.edb-nav-child { display: block; }

.edb-nav-child a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 28px;
    color: var(--edb-text-body);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.4;
    margin: 1px 8px;
    border-left: 2px solid transparent;
    transition: background var(--edb-transition), color var(--edb-transition), border-color var(--edb-transition);
    position: relative;
}

.edb-nav-child a:hover {
    background: rgba(0,0,0,.05);
    color: var(--edb-text-heading);
}

.edb-nav-child.edb-active a {
    background: var(--edb-primary-light);
    color: var(--edb-primary);
    font-weight: 600;
    border-left-color: var(--edb-primary);
}

/* Active dot indicator */
.edb-nav-child.edb-active a::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: var(--edb-primary);
    border-radius: 0 2px 2px 0;
    display: none; /* handled by border-left */
}

/* Nav child arrow */
.edb-nav-child-arrow {
    margin-left: auto;
    width: 12px;
    height: 12px;
    color: #cbd5e1;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity var(--edb-transition);
}
.edb-nav-child a:hover .edb-nav-child-arrow,
.edb-nav-child.edb-active a .edb-nav-child-arrow {
    opacity: 1;
    color: var(--edb-primary);
}

/* Filtered */
.edb-nav-child.edb-filtered-out,
.edb-nav-parent.edb-filtered-out { display: none; }

/* ── DIVIDER between parent groups ── */
.edb-nav-parent + .edb-nav-parent { border-top: 1px solid #f1f5f9; padding-top: 4px; }

/* ── CONTENT AREA ── */
.edb-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px 48px;
    background-color: var(--edb-surface);
    min-width: 0; /* prevent overflow */
}

/* ── Breadcrumb ── */
.edb-breadcrumb { margin-bottom: 24px; }

.edb-breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.edb-breadcrumb-item {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.edb-breadcrumb-sep {
    font-size: 11px;
    color: #cbd5e1;
}

.edb-breadcrumb-current { color: var(--edb-text-muted); }

/* ── Section ── */
.edb-section { animation: edb-fade-in .2s ease; }

@keyframes edb-fade-in {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.edb-section[hidden] { display: none; }

/* Section header */
.edb-section-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1.5px solid #f1f5f9;
}

.edb-section-icon-wrap {
    width: 44px;
    height: 44px;
    background: var(--edb-primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--edb-primary);
}

.edb-section-icon-wrap svg { width: 22px; height: 22px; }

.edb-section-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--edb-text-heading);
    margin: 0;
    padding: 0;
    line-height: 1.3;
    padding-top: 2px;
}

/* ── Content Body ── */
.edb-section-body {
    color: var(--edb-text-body);
    line-height: 1.8;
    font-size: 15px;
}

.edb-section-body > *:first-child { margin-top: 0; }

.edb-section-body h1,
.edb-section-body h2,
.edb-section-body h3,
.edb-section-body h4,
.edb-section-body h5,
.edb-section-body h6 {
    color: var(--edb-text-heading);
    font-weight: 600;
    line-height: 1.4;
    margin-top: 2em;
    margin-bottom: .6em;
    scroll-margin-top: 80px;
}

.edb-section-body h2 { font-size: 21px; border-bottom: 1px solid #f1f5f9; padding-bottom: .4em; }
.edb-section-body h3 { font-size: 18px; }
.edb-section-body h4 { font-size: 15px; color: var(--edb-text-muted); text-transform: uppercase; letter-spacing: .04em; }

.edb-section-body p { margin-bottom: 1.25em; }

.edb-section-body ul,
.edb-section-body ol {
    margin-bottom: 1.25em;
    padding-left: 1.4em;
}

.edb-section-body li { margin-bottom: .4em; }

.edb-section-body a {
    color: var(--edb-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: color-mix(in srgb, var(--edb-primary) 30%, transparent);
    transition: text-decoration-color var(--edb-transition);
}

.edb-section-body a:hover { text-decoration-color: var(--edb-primary); }

/* Inline code */
.edb-section-body code {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 2px 6px;
    color: #be123c;
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 13px;
}

/* Code block */
.edb-section-body pre {
    background: #0f172a;
    border-radius: 10px;
    padding: 20px 24px;
    overflow-x: auto;
    margin-bottom: 1.5em;
    border: 1px solid #1e293b;
    line-height: 1.65;
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

.edb-section-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: #e2e8f0;
    font-size: 13px;
}

/* Tables */
.edb-section-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    font-size: 14px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--edb-border);
}

.edb-section-body th,
.edb-section-body td {
    border-bottom: 1px solid var(--edb-border);
    padding: 11px 16px;
    text-align: left;
}

.edb-section-body th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--edb-text-heading);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.edb-section-body tr:last-child td { border-bottom: none; }
.edb-section-body tr:nth-child(even) td { background: #fafbfc; }

/* Images */
.edb-section-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--edb-border);
    margin: 12px 0;
    display: block;
}

/* Blockquote */
.edb-section-body blockquote {
    border-left: 4px solid var(--edb-primary);
    margin: 1.5em 0;
    padding: 14px 20px;
    background: var(--edb-primary-light);
    border-radius: 0 10px 10px 0;
    color: var(--edb-primary-hover);
    font-style: normal;
}

/* Notice boxes */
.edb-section-body .edb-notice {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 1.25em;
    font-size: 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

/* Horizontal rule */
.edb-section-body hr {
    border: none;
    border-top: 1.5px solid #f1f5f9;
    margin: 2em 0;
}

/* ── No results ── */
.edb-no-results {
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
}

.edb-no-results svg { width: 48px; height: 48px; color: #e2e8f0; margin-bottom: 12px; }
.edb-no-results p { font-size: 15px; margin: 0; }
.edb-no-results[hidden] { display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .edb-wrapper { flex-direction: column !important; }

    .edb-sidebar {
        width: 100% !important;
        min-width: 100% !important;
        max-height: 340px;
        border-right: none !important;
        border-left: none !important;
        border-bottom: 1px solid var(--edb-border);
        position: static !important;
    }

    .edb-content { padding: 28px 24px; }
    .edb-section-title { font-size: 20px; }
}

@media (max-width: 480px) {
    .edb-content { padding: 20px 16px; }
    .edb-section-title { font-size: 18px; }
    .edb-section-icon-wrap { width: 36px; height: 36px; }
}

/* ── Accessibility ── */
.screen-reader-text {
    border: 0;
    clip: rect(1px,1px,1px,1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.edb-nav-parent-label:focus-visible,
.edb-nav-child a:focus-visible {
    outline: 2px solid var(--edb-primary);
    outline-offset: 2px;
}

/* ── Print Styles (SEO/accessibility) ── */
@media print {
    .edb-sidebar { display: none; }
    .edb-section[hidden] { display: block !important; }
    .edb-content { padding: 0; }
}
