/* bartz/docs/_static/custom.css
 *
 * Copyright (c) 2024-2025, The Bartz Contributors
 *
 * This file is part of bartz.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

dl.py.method, dl.py.function {
    margin-top: 2em;
    margin-bottom: 2em;
}

dl.py.property {
    margin-top: 1em;
}

dl.py.class, dl.py.function {
    margin-top: 2.5em;
    margin-bottom: 2.5em;
}

h2 + dl.py.class, h2 + dl.py.function {
    margin-top: 1em;
}

/* space between parameter/attributes lists */
dl.field-list > dd {
    margin-bottom: 1em;
}

/* no additional space after last list in the block */
dl.field-list > dd:last-child {
    margin-bottom: 0em;
}

/* space between paragraphs in multi-paragraph param descriptions */
ul.simple > li > p:not(:first-child) {
    margin-top: 0.5em;
}

/* no space between param name and first paragraph in multi-paragraph param descriptions */
ul.simple > li > p:nth-child(2) {
    margin-top: 0em;
}

/* space between parameters */
ul.simple > li:not(:last-child) {
    margin-bottom: 0.5em;
}

/* highlight types that originate from type hints rather than the docstring */
span.sphinx_autodoc_typehints-type > code {
    background-color: #ee9;
}

/* viewcode extension */

span.linenos {
    padding-right: 2ex;
}

div.viewcode-block:target {
    margin: 0;
    padding-bottom: 2em;
}

:not(.notranslate) > div.highlight pre {
    padding-left: 1ex;
    padding-right: 1ex;
    font-size: 0.73em;
    background: #f4f4f4;
    margin-bottom: 2em;
}
