/* ===== Global Typography ===== */
/* Body and general text - Inter */
body,
.rst-content,
.wy-nav-content {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* Headings - Space Grotesk */
h1, h2, h3, h4, h5, h6,
.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4,
.rst-content h5,
.rst-content h6 {
    font-family: "Space Grotesk", sans-serif !important;
    color: #4750c8 !important;
}

/* ===== Sidebar Background Upgrade ===== */
.wy-nav-side {
    background: linear-gradient(180deg, #131927 0%, #0f141f 50%, #131927 100%) !important;
}

.wy-side-nav-search {
    background: #131927 !important;
    border-bottom: solid 2px #f62def !important;
}

/* ===== Sidebar Typography Improvements ===== */
.wy-nav-side,
.wy-menu-vertical {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

/* ===== Section Captions (GETTING STARTED, etc.) ===== */
.wy-menu-vertical p.caption {
    color: #f62def !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 18px !important;
    margin-bottom: 6px !important;
    font-family: "Space Grotesk", sans-serif !important;
}

/* ===== Level 1 Items ===== */
.wy-menu-vertical li.toctree-l1 > a {
    padding: 8px 16px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Hover effect: softer, more premium feeling */
.wy-menu-vertical a:hover {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: #f62def !important;
}

/* Active Level 1 item */
.wy-menu-vertical li.current > a {
    background: linear-gradient(90deg, #4750c8 0%, #624df0 70%, #7d3dff 100%) !important;
    color: #ffffff !important;
    border-right: 3px solid #f62def !important;
    border-radius: 4px 0 0 4px;
}

/* ===== Level 2+ Items (Indented, softer color) ===== */
.wy-menu-vertical li.toctree-l2 > a {
    padding-left: 32px !important;
    font-size: 14px !important;
    color: #b8c5d6 !important;
}

.wy-menu-vertical li.toctree-l3 > a {
    padding-left: 46px !important;
    font-size: 13.5px !important;
    color: #a9b5c8 !important;
}

/* When inside a current section */
.wy-menu-vertical li.current li.toctree-l2 > a,
.wy-menu-vertical li.current li.toctree-l3 > a {
    border-right: none !important;
}

/* ===== Improved caret indicators (optional but highly recommended) ===== */
.wy-menu-vertical li.toctree-l1 > a:after {
    content: "▸";
    font-size: 10px;
    float: right;
    opacity: 0.55;
    margin-left: 6px;
    transition: transform 0.15s ease;
}

.wy-menu-vertical li.toctree-l1.current > a:after {
    transform: rotate(90deg);
    opacity: 0.9;
}

/* ===== Spacing between groups ===== */
.wy-menu-vertical li.toctree-l1 {
    margin-bottom: 3px;
}

/* ===== General link improvements ===== */
a {
    color: #f62def !important;
}

a:hover {
    color: #4750c8 !important;
}

a:visited {
    color: #d426d1 !important;
}
/* ===== Open section submenu readability ===== */

/* Dark background for children of the current section */
.wy-menu-vertical li.current > ul {
    background: #151b29 !important;   /* dark, but a bit lighter than sidebar */
    padding: 4px 0 6px !important;
}

/* Level 2 links inside an open section */
.wy-menu-vertical li.current > ul li.toctree-l2 > a {
    color: #dbe4f5 !important;        /* brighter text */
    font-size: 14px !important;
    padding: 6px 24px !important;
}

/* Level 3 links (if you have them) */
.wy-menu-vertical li.current > ul li.toctree-l3 > a {
    color: #c5d1e5 !important;
    font-size: 13.5px !important;
    padding: 6px 32px !important;
}

/* ===== Admonitions (Note, Warning, etc.) ===== */

/* Note blocks - using secondary color (#4750c8) */
.rst-content .note {
    background-color: rgba(71, 80, 200, 0.1) !important;
    border-left: 4px solid #4750c8 !important;
    border-radius: 4px;
}

.rst-content .note .admonition-title {
    background-color: #4750c8 !important;
    color: #ffffff !important;
    font-family: "Space Grotesk", sans-serif !important;
    font-weight: 600 !important;
}

/* Warning blocks - using primary color (#f62def) */
.rst-content .warning {
    background-color: rgba(246, 45, 239, 0.1) !important;
    border-left: 4px solid #f62def !important;
    border-radius: 4px;
}

.rst-content .warning .admonition-title {
    background-color: #f62def !important;
    color: #ffffff !important;
    font-family: "Space Grotesk", sans-serif !important;
    font-weight: 600 !important;
}

/* General admonition styling */
.rst-content .admonition {
    padding: 12px !important;
    margin-bottom: 16px !important;
}

.rst-content .admonition-title {
    padding: 8px 12px !important;
    margin: -12px -12px 12px -12px !important;
    font-size: 14px !important;
    letter-spacing: 0.05em;
}

.rst-content .admonition p {
    margin-bottom: 8px !important;
}

.rst-content .admonition p:last-child {
    margin-bottom: 0 !important;
}

/* ===== API Documentation - Class and Module Titles ===== */

/* Class/Function signatures and titles */
.rst-content dl.class > dt,
.rst-content dl.function > dt,
.rst-content dl.exception > dt {
    background-color: rgba(71, 80, 200, 0.1) !important;
    border-left: 4px solid #4750c8 !important;
    border-top: 3px solid #4750c8 !important;
    border-radius: 4px;
    color: #4750c8 !important;
    font-family: "Space Grotesk", sans-serif !important;
}

/* Methods and attributes - keep original purple/pink border */
.rst-content dl.method > dt,
.rst-content dl.attribute > dt {
    background-color: rgba(71, 80, 200, 0.1) !important;
    border-left: 4px solid #4750c8 !important;
    border-radius: 4px;
    color: #4750c8 !important;
    font-family: "Space Grotesk", sans-serif !important;
}

/* Class/function names within signatures */
.rst-content dl dt .sig-name,
.rst-content dl dt code.descname {
    color: #f62def !important;
    font-weight: 600 !important;
}

/* Module section headers */
.rst-content .section > h2,
.rst-content .section > h3 {
    color: #4750c8 !important;
    border-bottom: 2px solid #f62def !important;
    padding-bottom: 8px !important;
}

/* Method/attribute section headers within classes */
.rst-content dl.class dd > dl > dt {
    background-color: rgba(246, 45, 239, 0.05) !important;
    border-left: 3px solid #f62def !important;
}

/* Permalink anchors */
.rst-content .headerlink {
    color: #f62def !important;
    opacity: 0.5;
}

.rst-content .headerlink:hover {
    opacity: 1;
    color: #4750c8 !important;
}

