/* Documentation Specific Styles */

/* Base Layout */
.docs-page-wrapper {
    background-color: #f8fafc;
    padding: 0px;
}

.docs-layout-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}

/* Sidebar Styling */
.docs-sidebar {
    flex: 0 0 25%;
    width: 25%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 120px;
    /* Adjust based on header height */
    align-self: flex-start;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

/* Hide scrollbar for cleaner look in sticky sidebar */
.docs-sidebar::-webkit-scrollbar {
    width: 4px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* Main Content Area */
.docs-content {
    flex: 1;
    background: #ffffff;
    border-radius: 12px;
    /* padding: 40px; */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    min-width: 0;
}

/* Sidebar Navigation (Grouped Steps) */
.docs-nav-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.docs-parent-item {
    display: block;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    color: #475569;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    font-family: var(--font-semibold);
}

.docs-parent-item:hover {
    background: #f8fafc;
    color: #0f172a;
}

.docs-parent-item.active-parent {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

.docs-child-list {
    list-style: none;
    margin: 0 0 8px 0;
    padding: 12px 0;
    background: #ffffff;
    border: 1px solid #4f46e5;
    border-radius: 8px;
    display: none;
    /* Hidden by default */
}

/* Show child list if it belongs to the active parent */
.docs-child-list.active-list {
    display: block;
}

.docs-child-list li {
    margin: 0;
    padding: 0px 10px;
}

.docs-child-list a {
    display: block;
    padding: 8px 20px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.docs-child-list a:hover {
    color: #4f46e5;
    background: #f1f5f9;
}

.docs-child-list a.current-item {
    color: #4f46e5;
    font-weight: 600;
    background: #eef2ff;
    border-left: 1px solid #4f46e5;
}

/* Documentation Content Typography */
.docs-content h1,
.docs-content h2,
.docs-content h3,
.docs-content .wp-block-heading {
    font-family: var(--font-semibold);
    color: #0f172a;
    margin-top: 10px;
    margin-bottom: 0.75em;
    font-weight: normal;
    /* Weight is handled by the font file */
    line-height: 1.3;
}

.docs-content h1 {
    font-size: 36px;
    margin-top: 0;
}

.docs-content h2 {
    font-size: 26px;
    border-bottom: 2px solid #4e2bcd;
    padding-bottom: 10px;
}

.docs-content h3 {
    font-size: 20px;
}

.docs-content p,
.docs-content .wp-block-paragraph {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 1.5em;
}

.docs-content a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.docs-content a:hover {
    text-decoration: underline;
    color: #4338ca;
}

.docs-content strong {
    color: #0f172a;
    font-weight: 600;
}

/* Lists */
.docs-content ul,
.docs-content ol,
.docs-content .wp-block-list {
    font-family: var(--font-body);
    padding-left: 24px;
    margin-bottom: 24px;
    color: #334155;
    font-size: 16px;
    line-height: 1.8;
}

.docs-content ul,
.docs-content ul.wp-block-list {
    list-style-type: disc;
}

.docs-content ol,
.docs-content ol.wp-block-list {
    list-style-type: decimal;
}

.docs-content ul li,
.docs-content ol li,
.docs-content .wp-block-list li {
    margin-bottom: 10px;
}

/* Tables in Documentation (Modernized) */
.docs-content .wp-block-table {
    margin-top: 10px;
    margin-bottom: 2em;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.docs-content table {
    width: 100%;
    min-width: 600px;
    /* Prevents columns from squishing on mobile */
    border-collapse: collapse;
    font-size: 15px;
    background: #ffffff;
}

.docs-content th,
.docs-content td {
    padding: 12px 16px;
    text-align: left;
    border: 1px solid #e2e8f0;
    /* Restored full grid borders */
}

.docs-content th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #cbd5e1;
}

/* Subdued text in tables */
.docs-content td {
    color: #475569;
    vertical-align: top;
}

.docs-content td strong {
    color: #0f172a;
}

/* Notice / Alert boxes */
.docs-alert {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
    display: flex;
    gap: 16px;
}

.docs-alert-icon {
    color: #d97706;
    font-size: 24px;
    line-height: 1;
}

.docs-alert-content h4 {
    margin: 0 0 8px 0;
    color: #92400e;
    font-size: 16px;
    font-weight: 600;
}

.docs-alert-content p {
    margin: 0;
    color: #b45309;
    font-size: 14px;
}

/* Image styles */
.docs-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin: 0px 0px 24px 0;
}

/* Responsive */
@media (max-width: 1280px) {
    .docs-layout-container {
        flex-direction: column;
    }

    .docs-sidebar {
        width: 100%;
        flex: none;
        position: unset;
    }
}