/* Custom GitBook-style Documentation Theme CSS */

/* Scrollbar styles */
.ss-docs-sidebar { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.ss-docs-sidebar::-webkit-scrollbar { width: 5px; }
.ss-docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.ss-docs-sidebar::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 3px; }

#ss-docs-right-sidebar { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
#ss-docs-right-sidebar::-webkit-scrollbar { width: 4px; }
#ss-docs-right-sidebar::-webkit-scrollbar-track { background: transparent; }
#ss-docs-right-sidebar::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 2px; }

/* Page Content Body & Animation */
.ss-docs-content-body { animation: ssFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes ssFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Headings */
.ss-docs-content-body h1 {
    font-size: 2.25rem; font-weight: 800; color: #0f172a; letter-spacing: -0.03em;
    margin-bottom: 1.25rem; margin-top: 0.5rem; line-height: 1.2;
}
.ss-docs-content-body h2 {
    font-size: 1.75rem; font-weight: 700; color: #1e293b; letter-spacing: -0.02em;
    margin-top: 2rem; margin-bottom: 1rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0; line-height: 1.3;
}
.ss-docs-content-body h3 {
    font-size: 1.25rem; font-weight: 600; color: #334155; letter-spacing: -0.01em;
    margin-top: 1.75rem; margin-bottom: 0.75rem; line-height: 1.4;
}
.ss-docs-content-body h4 {
    font-size: 1.05rem; font-weight: 600; color: #475569;
    margin-top: 1.5rem; margin-bottom: 0.5rem;
}

/* Paragraphs & Lists */
.ss-docs-content-body p {
    color: #334155; line-height: 1.75; margin-bottom: 1.25rem;
    font-size: 0.975rem;
}
.ss-docs-content-body ul, .ss-docs-content-body ol {
    padding-left: 1.5rem; margin-bottom: 1.25rem;
}
.ss-docs-content-body li {
    color: #334155; line-height: 1.75; margin-bottom: 0.4rem; font-size: 0.975rem;
}
.ss-docs-content-body ul { list-style-type: disc; }
.ss-docs-content-body ol { list-style-type: decimal; }

/* Links & Inline Formatting */
.ss-docs-content-body a { color: #3282b8; text-decoration: underline; text-underline-offset: 3px; font-weight: 500; transition: color 0.15s; }
.ss-docs-content-body a:hover { color: #1b4a6b; }
.ss-docs-content-body img { max-width: 100%; border-radius: 8px; margin: 2rem 0; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.ss-docs-content-body hr { border: none; border-top: 1px solid #e2e8f0; margin: 3rem 0; }
.ss-docs-content-body strong { color: #0f172a; font-weight: 600; }

/* Blockquotes */
.ss-docs-content-body blockquote {
    border-left: 4px solid #3282b8; background: #eaf3f8;
    padding: 1rem 1.5rem; margin: 1.5rem 0; border-radius: 0 8px 8px 0;
    color: #1b4a6b; font-style: italic; font-size: 0.95rem; line-height: 1.6;
}
.ss-docs-content-body blockquote p { margin: 0; color: #1b4a6b; }

/* Tables */
.ss-docs-table { min-width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 0.9rem; }
.ss-docs-table th { background: #f8fafc; font-weight: 600; color: #1e293b; text-align: left; }
.ss-docs-table th, .ss-docs-table td {
    padding: 0.8rem 1rem; border: 1px solid #e2e8f0; vertical-align: top; line-height: 1.5;
}
.ss-docs-table tr:nth-child(even) { background-color: #f8fafc; }

/* Hide inline TOC */
.ss-docs-toc-inline { display: none !important; }

/* Code Blocks Styling */
.ss-code-wrapper {
    position: relative;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #334155;
    background: #0f172a;
}
.ss-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e293b;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: #94a3b8;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    font-weight: 500;
    border-bottom: 1px solid #334155;
}
.ss-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.15s;
    font-size: 0.75rem;
}
.ss-copy-btn:hover { color: #f8fafc; }
.ss-copy-btn svg { width: 14px; height: 14px; }

.ss-docs-content-body pre {
    margin: 0 !important;
    padding: 1rem 1.25rem !important;
    overflow-x: auto;
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
    background: transparent !important;
}
.ss-docs-content-body pre code {
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: #e2e8f0 !important;
}
.ss-docs-content-body p code {
    background: #f1f5f9; color: #b45309; px: 0.35rem; py: 0.1rem;
    border-radius: 4px; font-size: 0.85rem; font-family: Menlo, Monaco, Consolas, monospace;
    font-weight: 500; padding: 0.15rem 0.35rem; border: 1px solid #e2e8f0;
}

/* Sidebar Nav Submenu */
.ss-sidebar-submenu {
    padding-left: 1.25rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    border-left: 1px solid #e2e8f0;
    margin-left: 0.75rem;
}

/* Next / Prev Cards Styling */
.ss-next-prev-container {
    display: flex;
    gap: 1rem;
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-t: 1px solid #e2e8f0;
    flex-wrap: wrap;
}
.ss-np-card {
    flex: 1;
    min-width: 240px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.ss-np-card:hover {
    border-color: #3282b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(50, 130, 184, 0.08);
}
.ss-np-card.ss-np-prev {
    align-items: flex-start;
    text-align: left;
}
.ss-np-card.ss-np-next {
    align-items: flex-end;
    text-align: right;
}
.ss-np-label {
    font-size: 0.725rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.ss-np-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    transition: color 0.15s;
}
.ss-np-card:hover .ss-np-title {
    color: #3282b8;
}

/* Feedback widgets */
.ss-feedback-row {
    display: flex; align-items: center; gap: 0.6rem;
    margin: 3rem 0 1rem; padding: 1rem 1.25rem;
    background: #f8fafc; border-radius: 8px; flex-wrap: wrap;
    border: 1px solid #e2e8f0;
}
.ss-feedback-label { font-size: 0.85rem; color: #64748b; font-weight: 500; }
.ss-feedback-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.35rem 0.8rem; border: 1px solid #e2e8f0;
    border-radius: 6px; background: #fff; color: #475569;
    cursor: pointer; font-size: 0.85rem; transition: all 0.2s;
    font-weight: 500;
}
.ss-feedback-btn:hover { border-color: #3282b8; color: #3282b8; background: #eaf3f8; }
.ss-feedback-btn:active { transform: scale(0.96); }
.ss-fb-count { font-weight: 600; font-size: 0.8rem; }
.ss-fb-comment-form { width: 100%; margin-top: 0.75rem; }
.ss-fb-comment-input {
    width: 100%; padding: 0.6rem 0.8rem; border: 1px solid #e2e8f0;
    border-radius: 6px; font-size: 0.875rem; font-family: inherit;
    resize: vertical; min-height: 60px;
}
.ss-fb-comment-input:focus { outline: none; border-color: #3282b8; box-shadow: 0 0 0 3px rgba(50,130,184,0.15); }
.ss-fb-comment-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.ss-fb-submit, .ss-fb-cancel {
    padding: 0.4rem 1rem; border: none; border-radius: 6px;
    font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.ss-fb-submit { background: #3282b8; color: #fff; }
.ss-fb-submit:hover { background: #286a96; }
.ss-fb-cancel { background: #f1f5f9; color: #475569; }
.ss-fb-cancel:hover { background: #e2e8f0; }
.ss-fb-msg { font-size: 0.85rem; font-weight: 600; margin-left: 0.5rem; }

/* Right Sidebar TOC Navigation styling */
#ss-docs-toc .ss-toc-link {
    display: block;
    padding: 0.25rem 0 0.25rem 0.75rem;
    border-left: 2px solid transparent;
    color: #64748b;
    text-decoration: none;
    transition: all 0.15s;
    font-weight: 500;
    font-size: 0.825rem;
}
#ss-docs-toc .ss-toc-link:hover {
    color: #0f172a;
    border-left-color: #cbd5e1;
}
#ss-docs-toc .ss-toc-link.active {
    color: #3282b8;
    border-left-color: #3282b8;
    font-weight: 600;
    background-color: #f8fafc;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}
#ss-docs-toc .ss-toc-link.pl-3 {
    padding-left: 1.25rem;
}



/* Scroll margin for heading links (prevents header overlap) */
h2, h3, h4 {
    scroll-margin-top: 80px;
}
