/**
 * Global CSS overrides for Docusaurus.
 * Infima is bundled by default.
 */

:root {
    --ifm-color-primary: #000;
    --ifm-color-primary-dark: #111;
    --ifm-color-primary-darker: #222;
    --ifm-color-primary-darkest: #333;
    --ifm-color-primary-light: #444;
    --ifm-color-primary-lighter: #555;
    --ifm-color-primary-lightest: #666;
    --ifm-code-font-size: 95%;
    --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.05);
    --ifm-link-color: #3531ff;
    --ifm-footer-link-hover-color: #3531ff;
}

[data-theme="dark"] {
    --ifm-color-primary: #fff;
    --ifm-color-primary-dark: #eee;
    --ifm-color-primary-darker: #ddd;
    --ifm-color-primary-darkest: #ccc;
    --ifm-color-primary-light: #bbb;
    --ifm-color-primary-lighter: #aaa;
    --ifm-color-primary-lightest: #999;
    --docusaurus-highlighted-code-line-bg: rgba(255, 255, 255, 0.1);
    --ifm-link-color: #a09fff;
    --ifm-link-hover-color: #c3c1ff;
    --ifm-footer-link-hover-color: #c3c1ff;
    --ifm-background-color: #090909 !important;
}

[data-theme="light"] .footer {
    border-top: 1px solid var(--ifm-toc-border-color);
    --ifm-footer-background-color: #fff !important;
    --ifm-footer-link-color: var(--ifm-color-gray-700);
    --ifm-footer-title-color: var(--ifm-color-dark);
}

[data-theme="dark"] .navbar {
    background-color: #090909 !important;
    --ifm-navbar-background-color: #090909 !important;
}

h1 {
    font-size: 2.25em;
}

h2 {
    font-size: 1.5em;
}

a:not([class]):hover {
    text-decoration: underline;
}

.footer--dark {
    border-top: 1px solid #333;
    --ifm-footer-background-color: #000;
}

[data-theme="light"] .logo [fill="#000"] {
    fill: #000;
}

[data-theme="dark"] .logo [fill="#000"] {
    fill: #fff;
}

.logo {
    width: -webkit-fill-available;
    height: 70px;
    padding-top: 16px;
    margin-top: 8px;
}

.alert--info {
    --ifm-alert-background-color: #f5f5f5;
    --ifm-alert-background-color-highlight: rgba(0, 0, 0, 0.05);
    --ifm-alert-foreground-color: #333333;
    --ifm-alert-border-color: var(--ifm-toc-border-color);

    background-color: var(--ifm-alert-background-color);
    color: var(--ifm-alert-foreground-color);
}

[data-theme="dark"] .alert--info {
    --ifm-alert-background-color: #1a1a1a;
    --ifm-alert-background-color-highlight: rgba(255, 255, 255, 0.1);
    --ifm-alert-foreground-color: #f5f5f5;
    --ifm-alert-border-color: var(--ifm-toc-border-color);

    background-color: var(--ifm-alert-background-color);
    color: var(--ifm-alert-foreground-color);
}

.tabs__item {
    margin-top: var(--ifm-list-item-margin);
}

@media (min-width: 1416px) {
    html.docs-doc-page .main-wrapper {
        align-self: center;
        max-width: 82rem;
        width: 82rem;
    }
}

.navbar .navbar__inner {
    margin: 0 auto;
    max-width: 82rem;
}

details {
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    padding: 0.5rem;
    border-radius: 4px;
}

summary {
    cursor: pointer;
    font-weight: bold;
}

details[open] summary {
    color: var(--ifm-color-primary);
}

/* Custom button styling */
.custom-button {
    background-color: #000;
    color: #fff !important;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-button:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.custom-button:active {
    transform: translateY(0);
}

/* Dark mode button styling */
[data-theme="dark"] .custom-button {
    background-color: #fff;
    color: #000 !important;
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .custom-button:hover {
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.15);
}

/* Position navbar items with flexbox order */
.navbar__items--right {
    display: flex;
}

/* Give the theme toggle a lower order */
.navbar__items--right > .dropdown {
    order: 10;
}

/* Make sure search is first */
.navbar__items--right > *:first-child {
    order: 5;
}

/* Give our custom button the highest order to ensure it's last */
.navbar__items--right > *:nth-child(3) {
    order: 100;
}
