/*
 * NVIDIA-styled theme for GRAIL docs.
 * Mirrors GR00T-WholeBodyControl / Isaac Lab styling.
 */

/* light theme */
html[data-theme="light"] {
    --pst-color-primary: #76B900;
    --pst-color-secondary: #5b8e03;
    --pst-color-secondary-highlight: #5b8e03;
    --pst-color-inline-code-links: #76B900;
    --pst-color-info: var(--pst-color-primary);
    --pst-color-info-highlight: var(--pst-color-primary);
    --pst-color-info-bg: #daedb9;
    --pst-color-attention: #ffc107;
    --pst-color-text-base: #323232;
    --pst-color-text-muted: #646464;
    --pst-color-shadow: #d8d8d8;
    --pst-color-border: #c9c9c9;
    --pst-color-inline-code: #76B900;
    --pst-color-target: #fbe54e;
    --pst-color-background: #fff;
    --pst-color-on-background: #fff;
    --pst-color-surface: #f5f5f5;
    --pst-color-on-surface: #e1e1e1;
    --pst-color-link: var(--pst-color-primary);
    --pst-color-link-hover: #789841;
    --pst-color-table-row-hover-bg: #daedb9;
    --pst-color-accent: var(--pst-color-primary);
}

/* dark theme */
html[data-theme="dark"] {
    --pst-color-primary: #76B900;
    --pst-color-secondary: #c2f26f;
    --pst-color-secondary-highlight: #c2f26f;
    --pst-color-inline-code-links: #b6e664;
    --pst-color-info: var(--pst-color-primary);
    --pst-color-info-highlight: var(--pst-color-primary);
    --pst-color-info-bg: #3a550b;
    --pst-color-attention: #dca90f;
    --pst-color-text-base: #cecece;
    --pst-color-text-muted: #a6a6a6;
    --pst-color-shadow: #212121;
    --pst-color-border: silver;
    --pst-color-inline-code: #76B900;
    --pst-color-target: #472700;
    --pst-color-background: #121212;
    --pst-color-on-background: #1e1e1e;
    --pst-color-surface: #212121;
    --pst-color-on-surface: #373737;
    --pst-color-link: var(--pst-color-primary);
    --pst-color-link-hover: #aee354;
    --pst-color-table-row-hover-bg: #3a550b;
    --pst-color-accent: var(--pst-color-primary);
}

a {
    text-decoration: none !important;
}

.bd-header-announcement a,
.bd-header-version-warning a {
    color: #7FDBFF;
}

.form-control {
    border-radius: 0 !important;
    border: none !important;
    outline: none !important;
}

.navbar-brand {
    padding-top: 0.0rem !important;
    padding-bottom: 0.0rem !important;
}

.navbar-icon-links {
    padding-top: 0.0rem !important;
    padding-bottom: 0.0rem !important;
}

/* Hide "Built with Sphinx" attribution */
.footer-item__copyright,
.footer-item__theme {
    display: none !important;
}

div.footer-item:has(.theme-switcher) ~ div.footer-item {
    display: none !important;
}

footer.bd-footer {
    border-top: 1px solid var(--pst-color-border);
    padding-top: 1rem;
}

/* Cap inline images/GIFs to viewport width and round corners slightly. */
article img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Two-column showcase grid for tables of GIFs (degrades to one column on
 * narrow screens). */
@media (max-width: 768px) {
    article table img {
        max-width: 100%;
    }
}
