/* Custom styles for PanelBox documentation */

/* Home page logo */
.home-logo {
    text-align: center;
    margin: 1rem 0 0.5rem;
}

.home-logo img {
    max-width: 400px;
    width: 100%;
    height: auto;
}

/* Header customization */
.md-header {
    background-color: #ffffff !important;
    color: #333333 !important;
    box-shadow: 0 0 0.2rem rgba(0,0,0,.1), 0 0.2rem 0.4rem rgba(0,0,0,.2);
}

[data-md-color-scheme="slate"] .md-header {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

/* Header title and links */
.md-header__title,
.md-header__button,
.md-header__topic,
.md-header .md-search__input::placeholder {
    color: #333333 !important;
}

[data-md-color-scheme="slate"] .md-header__title,
[data-md-color-scheme="slate"] .md-header__button,
[data-md-color-scheme="slate"] .md-header__topic {
    color: #ffffff !important;
}

/* Increase logo size */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
    width: 2.5rem !important;
    height: 2.5rem !important;
    padding: 0.2rem;
    background: white;
    border-radius: 0.3rem;
}

[data-md-color-scheme="slate"] .md-header__button.md-logo img,
[data-md-color-scheme="slate"] .md-header__button.md-logo svg {
    background: rgba(255, 255, 255, 0.95);
}

/* Improve code block appearance */
.highlight pre {
    padding: 1em;
    border-radius: 0.3em;
}

/* Better table styling */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

table th {
    background-color: var(--md-primary-fg-color);
    color: var(--md-primary-bg-color);
    font-weight: 600;
    padding: 0.6em 1em;
}

table td {
    padding: 0.6em 1em;
    border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

/* Admonition customization */
.admonition {
    margin: 1.5em 0;
}

/* Math rendering improvements */
.MathJax {
    font-size: 1.1em !important;
}

/* Improve inline code */
code {
    padding: 0.2em 0.4em;
    border-radius: 0.2em;
    background-color: var(--md-code-bg-color);
}

/* Footer improvements */
.md-footer-meta {
    background-color: var(--md-footer-bg-color);
}

/* Navigation improvements */
.md-nav__item--active > .md-nav__link {
    font-weight: 600;
}

/* Improve API doc spacing */
.doc-contents {
    margin-top: 1em;
}

/* Better heading anchors */
.headerlink {
    opacity: 0;
    transition: opacity 0.2s;
}

h1:hover .headerlink,
h2:hover .headerlink,
h3:hover .headerlink,
h4:hover .headerlink {
    opacity: 1;
}

/* Improve search results */
.md-search-result__teaser {
    max-height: 4em;
    overflow: hidden;
}

/* Custom badges */
.badge {
    display: inline-block;
    padding: 0.25em 0.5em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-primary {
    background-color: var(--md-primary-fg-color);
    color: var(--md-primary-bg-color);
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

/* Improve parameter tables in API docs */
.field-list dt {
    font-weight: 600;
    color: var(--md-primary-fg-color);
}

.field-list dd {
    margin-left: 2em;
    margin-bottom: 0.5em;
}

/* Better signature formatting */
.doc-heading code {
    background-color: transparent;
    font-size: 0.9em;
}

/* Improve examples in docstrings */
.doc-section-title {
    font-weight: 600;
    margin-top: 1em;
    margin-bottom: 0.5em;
}
