/* Custom CSS for Transmog documentation */

/* Improve code block styling */
div.highlight {
    border-left: 3px solid var(--color-brand-primary);
    background-color: var(--color-background-secondary);
    border-radius: 4px;
}

/* Improve table styling */
table.docutils {
    border: 1px solid var(--color-background-border);
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    margin-bottom: 24px;
}

table.docutils td,
table.docutils th {
    padding: 8px 16px;
    border: 1px solid var(--color-background-border);
}

table.docutils th {
    background-color: var(--color-background-secondary);
    font-weight: bold;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-foreground-primary);
    font-weight: 700;
}

/* Add a bit more spacing to list items */
ul li,
ol li {
    margin-bottom: 0.5em;
}

/* Improve note and warning boxes */
.admonition.note {
    background-color: var(--color-background-secondary);
    border-left-color: var(--color-brand-primary);
}

.admonition.warning {
    background-color: var(--color-background-secondary);
    border-left-color: #f0b37e;
}

/* API documentation parameter styling */
dl.field-list>dt {
    font-weight: bold;
    background-color: var(--color-background-secondary);
    padding: 3px 8px;
    border-radius: 3px;
}

/* Improve mermaid diagram styling */
.mermaid {
    margin: 1.5em 0;
    text-align: center;
}

/* Center the main content */
.content {
    margin: 0 auto;
    max-width: var(--content-width);
}

/* Make code blocks more readable in dark mode */
.highlight {
    border-radius: 4px;
}

/* Better link styling */
a {
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease-in-out;
}

a:hover {
    border-bottom: 1px solid var(--color-brand-primary);
}

/* Better spacing for sidebar navigation */
.sidebar-tree li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Make the page width wider */
article.bd-article {
    max-width: 1000px;
    margin: 0 auto;
}

/* Improve API documentation styling */
dl.py.class,
dl.py.function,
dl.py.method {
    padding: 1em;
    margin: 1em 0;
    border-radius: 4px;
    background-color: var(--color-background-secondary);
    border-left: 3px solid var(--color-brand-primary);
}

/* Improve code blocks */
pre {
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
}

/* Override default Furo theme font size for better readability */
:root {
    --font-size--normal: 16px;
    --font-size--small: 14px;
    --sidebar-item-spacing-vertical: 0.4rem;
}

/* Add shadow to code blocks */
div[class*="highlight-"] {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Dark mode toggle styling */
.theme-toggle-header {
    font-size: 1.2em;
    cursor: pointer;
}

/* Tutorial-Example Navigation Widget */
.tutorial-example-nav {
    margin: 1.5rem 0;
    padding: 0.8rem 1rem;
    border-radius: 0.3rem;
    background-color: var(--color-background-secondary);
    border-left: 4px solid var(--color-brand-primary);
}

.dark-mode .tutorial-example-nav {
    background-color: var(--color-background-secondary);
    border-left-color: var(--color-brand-primary);
}

.tutorial-example-nav-header {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--color-foreground-primary);
}

.dark-mode .tutorial-example-nav-header {
    color: var(--color-foreground-primary);
}

.tutorial-example-nav-link a {
    display: inline-block;
    font-family: monospace;
    padding: 0.3rem 0.5rem;
    background-color: var(--color-background-primary);
    border-radius: 0.2rem;
    text-decoration: none;
    transition: background-color 0.2s;
    color: var(--color-brand-primary);
}

.dark-mode .tutorial-example-nav-link a {
    background-color: var(--color-background-primary);
    color: var(--color-brand-primary);
}

.tutorial-example-nav-link a:hover {
    background-color: var(--color-background-secondary);
    text-decoration: none;
}

.dark-mode .tutorial-example-nav-link a:hover {
    background-color: var(--color-background-secondary);
}

/* Code block styling */
div.highlight {
    position: relative;
}

div.highlight pre {
    padding: 1rem;
    border-radius: 0.3rem;
    overflow-x: auto;
}

/* Copy button */
.copybutton {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: #777;
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
    border-radius: 0.2rem;
    transition: all 0.2s;
}

.copybutton:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: #333;
}

.dark-mode .copybutton {
    background-color: rgba(0, 0, 0, 0.3);
    color: #aaa;
}

.dark-mode .copybutton:hover {
    background-color: rgba(0, 0, 0, 0.4);
    color: #eee;
}

.sidebar-tree p[role="heading"] {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1.5em;
}

.toctree-l1 {
    margin: 0 !important;
}
