/********************************************************************

	Figures and Asides and Chats

*********************************************************************/

article aside,
article blockquote,
article figure {
    clear: both;
    color: var(--clr_Panel_Text);
    display: flex;
    font-family: var(--fnt_Panel_Text);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    border-radius: var(--DefaultBorderRadius);
    box-shadow: var(--DefaultBoxShadow);
    background-color: var(--clr_Panel_Background);
    text-align: center;
    text-align-last: center;
    font-style: italic;
    overflow: auto;
    padding: 2%;
    margin: 0 auto 24pt auto;
    max-width: 95%;
    min-height: 50px;
}

    article aside i,
    article blockquote i,
    article figure i {
        font-style: normal;
        font-weight: bold;
    }

    article aside a,        article aside a:visited,        article aside a:hover,      article aside a:active,
    article blockquote a,   article blockquote a:visited,   article blockquote a:hover, article blockquote a:active,
    article figure a,       article figure a:visited,       article figure a:hover,     article figure a:active
        {
        color: red;
        }

    /* Default (no class): everything centered, but li always left */
    article aside ol,
    article aside ul,
    article blockquote ol,
    article blockquote ul,
    article figure ol,
    article figure ul {
        align-self: center;
        text-align: center;
        text-align-last: center;
    }

    /* Default (no class): p is always left-justified */
    article aside p,
    article blockquote p,
    article figure p {
        text-align: left;
        text-align-last: left;
    }
    
    article aside li,
    article blockquote li,
    article figure li {
        text-align: left;
        text-align-last: left;
    }

    /* .Left: everything left-justified */
    article aside.Left,
    article blockquote.Left,
    article figure.Left {
        align-items: flex-start;
        text-align: left;
        text-align-last: left;
    }

        article aside.Left p,
        article blockquote.Left p,
        article figure.Left p,
        article aside.Left h1,
        article blockquote.Left h1,
        article figure.Left h1,
        article aside.Left h2,
        article blockquote.Left h2,
        article figure.Left h2 {
            text-align: left;
            text-align-last: left;
            margin-left: 0;
            margin-right: auto;
        }

        article aside.Left ol,
        article aside.Left ul,
        article blockquote.Left ol,
        article blockquote.Left ul,
        article figure.Left ol,
        article figure.Left ul {
            align-self: flex-start;
            text-align: left;
            text-align-last: left;
        }

    /* .Right: everything right-justified, li still left */
    article aside.Right,
    article blockquote.Right,
    article figure.Right {
        align-items: flex-end;
        text-align: right;
        text-align-last: right;
    }

        article aside.Right p,
        article blockquote.Right p,
        article figure.Right p,
        article aside.Right h1,
        article blockquote.Right h1,
        article figure.Right h1,
        article aside.Right h2,
        article blockquote.Right h2,
        article figure.Right h2 {
            text-align: right;
            text-align-last: right;
            margin-left: auto;
            margin-right: 0;
        }

        article aside.Right ol,
        article aside.Right ul,
        article blockquote.Right ol,
        article blockquote.Right ul,
        article figure.Right ol,
        article figure.Right ul {
            align-self: flex-end;
            text-align: right;
            text-align-last: right;
        }

        article aside.Right li,
        article blockquote.Right li,
        article figure.Right li {
            text-align: left;
            text-align-last: left;
        }

    /* Default (centered) blockquote: however many tagged blocks (p/div) it holds,
       they share one left edge while the whole group stays centered. The box shrinks
       to its widest line (fit-content) and is centered by the inherited margin:auto;
       stretching the children lines up their left edges. Untagged text still follows
       the box's centered text-align. Single-child blockquotes look unchanged. */
    article blockquote:not(.Left):not(.Right) {
        width: fit-content;
        align-items: stretch;
    }

        article blockquote:not(.Left):not(.Right) p,
        article blockquote:not(.Left):not(.Right) div {
            width: auto;
        }

    /* .Right: untagged text stays right-aligned (handled above), but tagged blocks
       read left-aligned while remaining shrink-wrapped ("no more space than needed")
       over on the right. */
    article blockquote.Right p,
    article blockquote.Right div {
        text-align: left;
        text-align-last: left;
    }

    article aside:not(:has(p, h1, h2, ul, ol, blockquote)) {
        display: block;
    }

    article aside:has(code) {
        display: block;
    }

    article aside.Small {
        font-size: 70%;
    }

article blockquote {
    overflow: initial;
}

blockquote::before,
blockquote::after {
    position: absolute;
    font-family: 'Arial Rounded MT Bold';
    font-size: 750%;
    line-height: 30px;
    text-shadow: 7px 5px 10px rgba(0, 0, 0, 0.5);
    color: purple;
}

blockquote::before {
    content: open-quote;
    top: 10px;
    left: 10px;
    bottom: -45px;
    right: initial;
}

blockquote::after {
    content: close-quote;
    top: initial;
    right: 30px;
    left: initial;
    bottom: -45px;
}

blockquote.Transcript p {
    text-align: left;
    margin-left: 0.5in;
    text-indent: -0.5in;
    font-weight: normal;
}

article aside h1,
article aside h2,
article blockquote h1,
article blockquote h2,
article figure figuretitle,
article figure h1,
article figure h2 {
    color: var(--clr_Panel_Heading);
    width: fit-content;
    margin-top: 0px;
    margin-left: auto;
    margin-right: auto;
    font-weight: bold;
}

article aside p,
article blockquote p,
article figure figcaption,
article figure p {
    font-size: 90%;
    width: fit-content;
    font-family: var(--fnt_Panel_Text);
    color: var(--clr_Panel_Text);
}

article aside a,
article blockquote a,
article figure a {
    color: var(--clr_Panel_Link);
}

article aside div,
article blockquote div,
article figure div {
    position: relative;
    display: block;
    max-width: 100%;
    min-width: fit-content;
    width: fit-content;
}

article aside.Horizontal,
article figure.Horizontal {
    flex-direction: row;
    text-align: left;
    text-align-last: left;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    justify-content: space-between;
}

@media only screen and (max-width: 1000px) {
    article aside.Horizontal,
    article figure.Horizontal {
        flex-direction: column;
    }
}

article aside.Horizontal div,
article figure.Horizontal div {
    display: flex;
    flex-direction: column;
    width: fit-content;
    max-width: 40%;
    padding: 2%;
}

article aside.Horizontal p,
article figure.Horizontal p {
    text-align: left;
    text-align-last: left;
    max-width: 40%;
    width: fit-content;
    padding: 2%;
}

article aside.Horizontal img,
article figure.Horizontal img {
    max-width: 50%;
    margin: 0;
    object-fit: contain;
}

cite {
    font-size: 75%;
    text-align: right;
    margin-top: 6pt;
}

article aside cite,
article blockquote cite,
article figure cite {
    color: var(--clr_Panel_Text);
}

article aside.Script {
    align-items: flex-start;
}

