/* 
Author: TfTHacker - more info  https://tfthacker.com/
Date:   2023-08-12

This file demonstrates a few "opinionated" tweaks when using cornell.css with a the below mentioned theme.

For use with Prism theme.
*/


@media screen {
    /* If using a banner, make the top margin shorter so the border line intersects with the banner image */
    .markdown-preview-view.cornell-border.banner-image .markdown-preview-section {
        margin-top: 118px !important;
    }

    .markdown-preview-view.cornell-border.banner-image.is-readable-line-width .markdown-preview-section {
        margin-top: 118px !important;
    }

    div:not(.markdown-embed-content) >  .markdown-preview-view.cornell-border:has([data-callout="summary-top"])   {
        margin-top: 144px !important;
    }

    /* Bring the callout title closer the child elements */
    .markdown-source-view.cornell-livepreview:where(.cornell-left, .cornell-right) [data-callout="cue"],
    .markdown-preview-view:where(.cornell-left, .cornell-right) .markdown-preview-section [data-callout="cue"],
    .markdown-preview-view:where(.cornell-left, .cornell-right) [data-callout="cue"] {
        .callout-content {
            padding-top: 10px;
            padding-left: 0px;
            padding-right: 0px;
        }
        .callout-content > * {
            margin-top: 0px !important;
        }
    }


    :is(.cornell-left, .cornell-right) .markdown-preview-section :has([data-callout="summary"], [data-callout="summary-top"]) {
        .callout-content > * {
            margin-top: 5px !important;
        }
    }

    /* LEFT hand margin Cue adjustments */
    /* Preview */
    .markdown-preview-view.cornell-left .markdown-preview-section [data-callout="cue"] {
        padding-right: 15px !important;
    }
    
    /* Live Preview */
    .markdown-source-view.cornell-livepreview.cornell-left  .cm-sizer .cm-embed-block:has([data-callout="cue"]) {
        padding-left: 10px;
        padding-right: 15px;
    }

    .markdown-source-view.cornell-livepreview.cornell-left.is-readable-line-width  .cm-sizer .cm-embed-block:has([data-callout="cue"]) {
        padding-right: 15px;
    }


    /* RIGHT hand margin Cue adjustments */
    /* Preview */
    .markdown-preview-view.cornell-right .markdown-preview-section [data-callout="cue"] {
    }
    
    /* Live Preview */
    .markdown-source-view.cornell-livepreview.cornell-right  .cm-sizer .cm-embed-block:has([data-callout="cue"]) {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .markdown-source-view.cornell-livepreview.cornell-right.is-readable-line-width  .cm-sizer .cm-embed-block:has([data-callout="cue"]) {
        padding-left: 10px !important;
    }


}

@media print {
    /* Bring the callout title closer the child elements */
    .markdown-preview-view:where(.cornell-left, .cornell-right) .markdown-preview-section [data-callout="cue"],
    .markdown-preview-view:where(.cornell-left, .cornell-right) [data-callout="cue"] {
        .callout-content > * {
            margin-top: 3px !important;
        }
    }

    :is(.cornell-left, .cornell-right) .markdown-preview-section :has([data-callout="summary"], [data-callout="summary-top"]) {
        .callout-content > * {
            margin-top: 5px !important;
        }
    }
}

.markdown-preview-view:is(.cornell-left, .cornell-right)  :is([data-callout="summary"], [data-callout="summary-top"]) {
    .callout-content {
        padding-top: 10px !important;
    }
}