/*
    These are adjustments to the Read The Docs Sphinx theme. The CSS that comes
    with ReadTheDocs is theme.css, so it is imported and they overrides applied
    here. https://docs.readthedocs.io/en/stable/guides/adding-custom-css.html
    and using the MS Edge DevTools to see what CSS is in effect.

    Bob Denny       29-Aug-2023
    Bob Denny       12-Nov-2024 Add styling for .. versionxxx and .. deprecated
    Bob Denny       07-Jul-2025 Style improvements per Peter
    Peter Simpson   08-Jul-2025 More style, boxing each member, color on member header
    Bob Denny       10-Jul-2025 Very slightly darken background further setting off member blocks.
 */
@import 'theme.css';    /* From Sphinx 7.2.4

    /*
        ----------------------------------------------------------------
        Reported errors (Edge DevTools) in the theme for modern browsers
        ----------------------------------------------------------------

        '-ms-text-size-adjust' is not supported by Chrome, Chrome Android, Edge, Firefox,
        Safari. Add 'text-size-adjust' to support Chrome 54+, Chrome Android 54+, Edge 79+.
        NOTE: Specifics should be listed before generics.
    */
    html {
        font-size: 100%;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    /*
        '-ms-filter' is not supported by Chrome, Chrome Android. Add 'filter' to
        support Chrome 53+, Chrome Android 53+.
    */
    .fa-rotate-90 {
        -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
        filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
        -webkit-transform: rotate(90deg);
        -ms-transform: rotate(90deg);
        transform: rotate(90deg);
    }
    /*
        'user-select' is not supported by Safari, Safari on iOS. Add '-webkit-user-select'
        to support Safari 3+, Safari on iOS 3+.
    */
    .rst-content .linenodiv pre {
        -webkit-user-select: none;
        user-select: none;
    }
    /*
        'filter' should be listed after '-ms-filter'.
    */
    @media print {
        * {
            box-shadow: none;
            text-shadow: none;
            -ms-filter: none;
            filter: none;
        }
    }
    /*
        Make the format expandable with browser width
        https://stackoverflow.com/a/28172705/159508 (I already had the overrides by importing theme.css)
        Original page background was #fcfcfc. Darken to make member blocks stand out a bit more.
    */
    .wy-nav-content {
        max-width: none;        /* No margin on the right, looks natural.*/
        background:#f8f8f8;
    }
    /*
        ---------------------------------
        Customization of content literals
        ---------------------------------

        Make the extremely ugly ``xxx`` code literals look better
    */
    .rst-content code.literal, .rst-content tt.literal {
        color: #000;
        white-space: normal;
        border: none;
        font-size: 95%;
        padding: 0px;
        font-family: Cascadia Code,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;
    }
    /*
        Same with the module and class xrefs
    */
    .rst-content code.xref, .rst-content tt.xref, a .rst-content code, a .rst-content tt {
        color: #2980b9 !important;
        overflow-wrap: normal;
        /* border: 1px solid; */
        /* padding: 2px 5px; */
        border: none;
        font-family: Cascadia Code,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;
        font-weight: 500;       /* Bold these a bit */
        font-size: 95%;
    }
    /*
        -------------------------------
        Customization of Sidebar Styles
        -------------------------------

        Make the extremely ugly ``xxx`` code literals look better
    */
    /*
        Increae font size of sidebar headings
    */
    .wy-menu-vertical a {
        font-size: 100%;
    }
    /*
        Increase font size for sidebar sub-headings
    */
    .wy-menu-vertical li.toctree-l3, .wy-menu-vertical li.toctree-l4
    {
        font-size: 1.0em;
    }
    /*
        Increase the sidebar font for member names and add Cascadia Code
    */
    .rst-content .wy-menu-vertical li tt, .wy-menu-vertical li .rst-content tt, .wy-menu-vertical li code {
        font-family: Cascadia Code,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;
        font-size:90% !important;
    }
    /*
        Reduce indentation and tighten line spacing of members listings
    */
    .wy-menu-vertical li.toctree-l3.current li.toctree-l4>a {
        padding: .3em 1em .3em 4em;
    }
    /*
        ------------------------------
        Customizing of Member Headings
        ------------------------------

        Increase size of member section headings
        Per Peter July 2025, embolden the section heading containing the member name and
        increase the font size to make the heading more obvious.
        I have no idea how this works, I got it by using the MSEdge Inspect tool
        Watch it, these are different, one starts with a dot, the other not.
    */
    .html.writer-html4 .rst-content dl:not(.docutils)>dt, html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt
    {
        font-size: 135%;
        letter-spacing: 1px;
        border-top: 24px solid #3385ff
    }

    dl.method, dl.property, dl.attribute, dl.exception {
        padding-bottom: 0px;
        border-width:1px;
        border-style: solid;
        background:white;               /* Force member blocks white */
        margin-bottom:12px;
        margin-block-end: 3em !important; /* Spreead oout members */
    }

    /* Peter - Reduce the field list margin to make the member entry feel more cohesive */
    dl.field-list {
        margin-bottom: 12px !important;
    }

    /* Peter - Remove empty space at the end of notes */
    dd {
        margin-bottom: 0px !important;
    }

    html.writer-html4 .rst-content dl:not(.docutils)>dt, html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt
    {
        display: inherit;  /* Required for full width bar above member block */
        margin-bottom: 8px;
        /* font-size: 90%; -- Seems useless */
        line-height: normal;
        background: #e7f2fa;
        color: #2980b9;
        /* border-top: 3px solid #6ab0de; -- Seems useless */
        padding: 6px;
        position: relative;
    }
    /*
        -----------------------
        Customizing Admonitions
        -----------------------

        Make these narrower to help focus on the member section headings
        Again I have no idea how this works,I got it by using the MSEdge Inspect tool and
        good old trial-and-error.
    */
    .rst-content .admonition, .rst-content .admonition-todo, .rst-content .attention, .rst-content .caution, .rst-content .danger, .rst-content .error, .rst-content .hint, .rst-content .important, .rst-content .note, .rst-content .seealso, .rst-content .tip, .rst-content .warning, .wy-alert
    {
        padding: 12px;
        line-height: 24px;
        margin-bottom: 18px;        /* Peter - Reduce space at bottom of notes and attributions etc. Was 24px */
        display: inline-block;      /* Narrows to width of content not page */
        width: 90%;
        padding-bottom: 0px         /* Peter - Remove excxess space at bottom of notes and attributions etc. */
    }
    /*
        -------------------------------------
        Customizing of version change legends
        -------------------------------------

        These should go immediately below the member section heading.
    */
    .rst-content .versionmodified {
        font-style: italic;
        font-weight: bold;
        background: #e7f2fa;    /* Matched background of member heading block */
     }
