/* Docs UI (ported from XudoPay docs theme) */

body.xudo-docs {
    background:
        radial-gradient(1200px 600px at 30% 0%, rgba(240, 63, 0, 0.10), transparent 60%),
        radial-gradient(1000px 520px at 100% 0%, rgba(13, 110, 253, 0.10), transparent 60%),
        #05080b;
    color: rgba(226, 232, 240, 0.92);
    min-height: 100vh;
}

.xudo-docs-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1rem;
}

.xudo-docs-hidden {
    display: none !important;
}

.xudo-docs-desktop-only {
    display: none;
}

.xudo-docs-mobile-only {
    display: inline-grid;
}

@media (min-width: 768px) {
    .xudo-docs-desktop-only {
        display: inline-flex;
    }
}

@media (min-width: 1024px) {
    .xudo-docs-mobile-only {
        display: none;
    }
}

.xudo-docs-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(16px);
    background: rgba(5, 8, 11, 0.82);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.xudo-docs-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.xudo-docs-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.xudo-docs-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: rgba(226, 232, 240, 0.92);
    text-decoration: none;
    min-width: 0;
}

.xudo-docs-brandname {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.xudo-docs-mark {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(240, 63, 0, 0.95), rgba(13, 110, 253, 0.9));
    color: rgba(3, 7, 12, 0.9);
    box-shadow: 0 16px 36px rgba(240, 63, 0, 0.16);
    flex-shrink: 0;
}

.xudo-docs-logo {
    height: 32px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

.xudo-docs-iconbtn {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.34);
    color: rgba(226, 232, 240, 0.88);
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
}

.xudo-docs-iconbtn svg {
    width: 18px;
    height: 18px;
}

.xudo-docs-toplink {
    text-decoration: none;
    color: rgba(226, 232, 240, 0.72);
    font-weight: 650;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.xudo-docs-toplink:hover {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(148, 163, 184, 0.14);
    color: rgba(226, 232, 240, 0.92);
    transform: translateY(-1px);
}

.xudo-docs-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.xudo-docs-search {
    position: relative;
    flex: 1 1 680px;
    max-width: 760px;
    min-width: 0;
}

.xudo-docs-search-input {
    width: 100%;
    border-radius: 16px;
    padding-left: 2.5rem;
    padding-right: 5.5rem;
    height: 44px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: rgba(226, 232, 240, 0.92);
    outline: none;
}

.xudo-docs-search-input::placeholder {
    color: rgba(226, 232, 240, 0.55);
}

.xudo-docs-search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.72;
}

.xudo-docs-search-kbd {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    padding: 0.2rem 0.45rem;
    color: rgba(226, 232, 240, 0.62);
    font-size: 0.78rem;
    background: rgba(2, 6, 23, 0.35);
    gap: 0.25rem;
}

.xudo-docs-search-kbd kbd {
    color: rgba(226, 232, 240, 0.84);
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
    font-size: 0.78rem;
}

.xudo-docs-search-results {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 0;
    right: 0;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 6, 23, 0.88);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    z-index: 40;
}

.xudo-docs-search-result {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: rgba(226, 232, 240, 0.86);
    padding: 0.7rem 0.85rem;
    cursor: pointer;
    font-weight: 650;
}

.xudo-docs-search-result:hover {
    background: rgba(15, 23, 42, 0.55);
}

.xudo-docs-tabs {
    display: flex;
    align-items: center;
    gap: 1.35rem;
    padding-bottom: 0.8rem;
    border-top: 1px solid rgba(148, 163, 184, 0.10);
    padding-top: 0.9rem;
    overflow-x: auto;
}

.xudo-docs-tab {
    text-decoration: none;
    color: rgba(226, 232, 240, 0.66);
    font-weight: 700;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: color 160ms ease, border-color 160ms ease;
    white-space: nowrap;
}

.xudo-docs-tab:hover {
    color: rgba(226, 232, 240, 0.9);
}

.xudo-docs-tab.active {
    color: rgba(240, 63, 0, 0.95);
    border-bottom-color: rgba(240, 63, 0, 0.9);
}

.xudo-docs-shell {
    padding-top: 1.6rem;
    padding-bottom: 3rem;
}

.xudo-docs-shell-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
}

@media (min-width: 1024px) {
    .xudo-docs-shell-grid {
        grid-template-columns: 320px 1fr 240px;
        align-items: start;
    }
}

.xudo-docs-sidebar,
.xudo-docs-toc {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 6, 23, 0.32);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
    padding: 0.9rem 0.9rem;
}

@media (min-width: 1024px) {
    .xudo-docs-sidebar,
    .xudo-docs-toc {
        position: sticky;
        top: 132px;
        max-height: calc(100vh - 160px);
        overflow: auto;
    }
}

.xudo-docs-sidebar-title,
.xudo-docs-toc-title {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.55);
    margin-bottom: 0.8rem;
    font-weight: 800;
}

.xudo-docs-nav {
    display: grid;
    gap: 0.35rem;
}

.xudo-docs-nav-group {
    margin-top: 0.6rem;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.5);
    font-weight: 850;
    padding: 0.35rem 0.55rem;
}

.xudo-docs-nav a {
    text-decoration: none;
    color: rgba(226, 232, 240, 0.74);
    padding: 0.45rem 0.55rem;
    border-radius: 14px;
    border: 1px solid transparent;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.xudo-docs-nav a:hover {
    background: rgba(15, 23, 42, 0.42);
    border-color: rgba(148, 163, 184, 0.12);
    color: rgba(226, 232, 240, 0.92);
}

.xudo-docs-main {
    min-width: 0;
}

.xudo-docs-content {
    padding: 0.2rem 0;
}

.xudo-docs-article {
    max-width: 900px;
    margin: 0 auto;
}

.xudo-docs-article h1 {
    font-weight: 900;
    letter-spacing: -0.03em;
    font-size: clamp(2rem, 3vw, 2.6rem);
    color: rgba(226, 232, 240, 0.95);
}

.xudo-docs-article h2 {
    margin-top: 2.1rem;
    font-weight: 850;
    letter-spacing: -0.02em;
    color: rgba(226, 232, 240, 0.95);
}

.xudo-docs-article h3 {
    margin-top: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: rgba(226, 232, 240, 0.92);
}

.xudo-docs-article .lead {
    color: rgba(226, 232, 240, 0.72);
    max-width: 60ch;
}

.xudo-docs-article p,
.xudo-docs-article li {
    color: rgba(226, 232, 240, 0.74);
    line-height: 1.7;
}

.xudo-docs-article a {
    color: rgba(240, 63, 0, 0.92);
    text-decoration: none;
}

.xudo-docs-article a:hover {
    text-decoration: underline;
}

.xudo-docs-callout {
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
    border-radius: 18px;
    border: 1px solid rgba(240, 63, 0, 0.18);
    background: rgba(240, 63, 0, 0.08);
    padding: 1rem 1.1rem;
}

.xudo-docs-callout-title {
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
    color: rgba(226, 232, 240, 0.92);
}

.xudo-docs-callout-body {
    color: rgba(226, 232, 240, 0.72);
}

.xudo-docs-codeblock {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.55);
    overflow: hidden;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
    margin-top: 0.7rem;
    margin-bottom: 0.7rem;
}

.xudo-docs-codeblock-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.38);
}

.xudo-docs-codeblock-label {
    font-weight: 750;
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.9rem;
}

.xudo-docs-codeblock pre {
    margin: 0;
    padding: 0.95rem 1rem;
    overflow: auto;
}

.xudo-docs-codeblock code {
    color: rgba(226, 232, 240, 0.9);
    font-size: 0.9rem;
}

.xudo-docs-codeblock-copy {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.25);
    color: rgba(226, 232, 240, 0.82);
    font-weight: 750;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
}

.xudo-docs-codeblock-copy:hover {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(148, 163, 184, 0.24);
    color: rgba(226, 232, 240, 0.92);
}

.xudo-docs-codeblock-copy.is-copied {
    border-color: rgba(240, 63, 0, 0.35);
    background: rgba(240, 63, 0, 0.14);
}

.xudo-docs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .xudo-docs-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.xudo-docs-endpoint {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0.6rem 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 6, 23, 0.30);
}

.xudo-docs-method {
    font-weight: 900;
    color: rgba(240, 63, 0, 0.92);
    letter-spacing: 0.08em;
    font-size: 0.78rem;
}

.xudo-docs-path code {
    color: rgba(226, 232, 240, 0.9);
}

.xudo-docs-muted {
    grid-column: 2 / -1;
    color: rgba(226, 232, 240, 0.62);
    font-size: 0.92rem;
}

.xudo-docs-toc-nav {
    display: grid;
    gap: 0.35rem;
}

.xudo-docs-toc-item {
    text-decoration: none;
    color: rgba(226, 232, 240, 0.7);
    font-weight: 650;
    padding: 0.35rem 0.5rem;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.xudo-docs-toc-item:hover {
    background: rgba(15, 23, 42, 0.42);
    border-color: rgba(148, 163, 184, 0.12);
    color: rgba(226, 232, 240, 0.9);
}

.xudo-docs-toc-item-sub {
    padding-left: 0.95rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.62);
}

.xudo-docs-desktop-sidebar,
.xudo-docs-desktop-toc {
    display: none;
}

@media (min-width: 1024px) {
    .xudo-docs-desktop-sidebar,
    .xudo-docs-desktop-toc {
        display: block;
    }
}

/* Mobile nav */
.xudo-docs-mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 60;
}

.xudo-docs-mobile-nav-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
}

.xudo-docs-mobile-nav-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(92vw, 360px);
    background: rgba(5, 8, 11, 0.98);
    border-right: 1px solid rgba(148, 163, 184, 0.14);
    padding: 0.9rem 0.9rem;
    overflow: auto;
}

.xudo-docs-mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

/* Light theme */
html[data-docs-theme="light"] body.xudo-docs {
    background:
        radial-gradient(1200px 600px at 30% 0%, rgba(240, 63, 0, 0.14), transparent 60%),
        radial-gradient(1000px 520px at 100% 0%, rgba(13, 110, 253, 0.12), transparent 60%),
        #f6f8fc;
    color: rgba(11, 18, 32, 0.9);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-topbar {
    background: rgba(246, 248, 252, 0.85);
    border-bottom-color: rgba(11, 18, 32, 0.10);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-tab {
    color: rgba(11, 18, 32, 0.62);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-tab:hover {
    color: rgba(11, 18, 32, 0.9);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-tab.active {
    color: rgba(240, 63, 0, 1);
    border-bottom-color: rgba(240, 63, 0, 0.95);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-toplink {
    color: rgba(11, 18, 32, 0.66);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-toplink:hover {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(11, 18, 32, 0.10);
    color: rgba(11, 18, 32, 0.92);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-iconbtn {
    border-color: rgba(11, 18, 32, 0.10);
    background: rgba(255, 255, 255, 0.76);
    color: rgba(11, 18, 32, 0.82);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-search-input {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(11, 18, 32, 0.14);
    color: rgba(11, 18, 32, 0.9);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-search-input::placeholder {
    color: rgba(11, 18, 32, 0.52);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-sidebar,
html[data-docs-theme="light"] body.xudo-docs .xudo-docs-toc {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(11, 18, 32, 0.10);
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.08);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-sidebar-title,
html[data-docs-theme="light"] body.xudo-docs .xudo-docs-toc-title {
    color: rgba(11, 18, 32, 0.55);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-nav a,
html[data-docs-theme="light"] body.xudo-docs .xudo-docs-toc-item {
    color: rgba(11, 18, 32, 0.72);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-nav-group {
    color: rgba(11, 18, 32, 0.55);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-nav a:hover,
html[data-docs-theme="light"] body.xudo-docs .xudo-docs-toc-item:hover {
    background: rgba(248, 250, 252, 0.95);
    border-color: rgba(11, 18, 32, 0.10);
    color: rgba(11, 18, 32, 0.92);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-article h1,
html[data-docs-theme="light"] body.xudo-docs .xudo-docs-article h2,
html[data-docs-theme="light"] body.xudo-docs .xudo-docs-article h3 {
    color: rgba(11, 18, 32, 0.92);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-article p,
html[data-docs-theme="light"] body.xudo-docs .xudo-docs-article li,
html[data-docs-theme="light"] body.xudo-docs .xudo-docs-article .lead {
    color: rgba(11, 18, 32, 0.7);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-article a {
    color: rgba(240, 63, 0, 1);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-search-kbd {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(11, 18, 32, 0.12);
    color: rgba(11, 18, 32, 0.62);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-search-kbd kbd {
    color: rgba(11, 18, 32, 0.82);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-callout {
    border-color: rgba(240, 63, 0, 0.22);
    background: rgba(240, 63, 0, 0.08);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-callout-title {
    color: rgba(11, 18, 32, 0.92);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-callout-body {
    color: rgba(11, 18, 32, 0.72);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-codeblock {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(11, 18, 32, 0.12);
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.08);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-codeblock-top {
    background: rgba(248, 250, 252, 0.95);
    border-bottom-color: rgba(11, 18, 32, 0.10);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-codeblock-label {
    color: rgba(11, 18, 32, 0.72);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-codeblock code,
html[data-docs-theme="light"] body.xudo-docs .xudo-docs-path code {
    color: rgba(11, 18, 32, 0.9);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-codeblock-copy {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(11, 18, 32, 0.14);
    color: rgba(11, 18, 32, 0.8);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-method {
    color: rgba(240, 63, 0, 1);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-endpoint {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(11, 18, 32, 0.10);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-muted {
    color: rgba(11, 18, 32, 0.6);
}

html[data-docs-theme="light"] body.xudo-docs .xudo-docs-mobile-nav-panel {
    background: rgba(246, 248, 252, 0.98);
    border-right-color: rgba(11, 18, 32, 0.10);
    color: rgba(11, 18, 32, 0.9);
}

