/*
 * Copyright (c) 2024. Amazon.com, Inc. or its affiliates. All rights reserved.
 */

@font-face {
    font-family: 'Ember W Rg';
    src: url('/font/AmazonEmber_W_Rg.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

body {
    background-color: black;
    /* must account for header and footer */
    padding: 80px 20px 140px 20px;
}

h1,
h2,
h3,
h4,
h5,
strong {
    font-family: 'Ember W Rg', sans-serif;
}

#stage {
    padding: 10px;
    position: relative;
    z-index: 2;
    display: flex;
    margin-left: 25px;
    margin-top: 20px;
    justify-content: center;
    min-width: 350px;
}

.markdown {
    font-family: 'Ember W Lt', sans-serif;
    max-width: 1600px;
    width: 100%;
    padding: 10px 30px 20px 30px;
    background-color: rgba(17, 17, 17, 0.5);
    border-radius: 4px;
    overflow: hidden;
}

@media (max-width: 600px) {
    .markdown {
        border-radius: 0;
    }

    #stage {
        padding: 0;
        margin: 0;
        justify-content: unset;
    }

    body {
        padding-left: 0;
        padding-right: 0;
    }
}

.markdown a {
    /* markdown can contain long links */
    word-wrap: break-word;
    word-break: break-all;
}

@media (prefers-color-scheme: light) {
    .markdown {
        background-color: rgba(255, 255, 255, 0.8);
    }

    #header {
        box-shadow: 0 16px 16px rgba(0, 0, 0, 0.3);
    }
}

@media (prefers-color-scheme: light) {
    a {
        color: #632893;
        text-decoration: none;
    }

    a:visited {
        color: #251c87;
    }

    body {
        color: #111;
    }
}

/* side menu */

#sideMenu {
    top: 110px;
    left: 10px;
    position: fixed;
    z-index: 6;
    padding-top: 2px;

    font-family: 'Ember W Lt', sans-serif;
    color: white;
}

@media (prefers-color-scheme: light) {
    #sideMenu {
        color: #111;
    }
}

.openMenu #sideMenu {
    width: 300px;
    background-color: rgba(17, 17, 17, 0.5);
    border-radius: 8px;
}

@media (prefers-color-scheme: light) {
    .openMenu #sideMenu {
        background-color: rgba(255, 255, 255, 0.8);
    }

    .openMenu .button {
        filter: brightness(0%);
    }
}

.openMenu #stage {
    margin-left: 300px;
}

#menuContents {
    display: none;
}

.openMenu #menuContents {
    display: block;
}

#menuContents > ul {
    text-decoration: none;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#menuContents a {
    display: block;
    padding: 8px;
}

#menuContents > ul > li:last-child {
    border-radius: 0 0 8px 8px;
}

#menuContents > ul > li {
    padding: 0;
    cursor: pointer;
    transition:
        background-color 0.1s,
        color 0.1s;
}

#menuContents > ul > li:hover {
    background-color: #333339;
}

@media (prefers-color-scheme: light) {
    #menuContents > ul > li:hover {
        background-color: #c3c3d8;
    }
}

#menuBtn {
}

@media (max-width: 600px) {
    #sideMenu,
    .openMenu #sideMenu {
        position: relative;
        z-index: 1;
        top: unset;
        left: unset;
        width: unset;
        margin: 20px 10px 10px 10px;
    }

    #stage,
    .openMenu #stage {
        margin-left: 0;
    }
}

.language-typescript {
    white-space: pre-wrap;
}

.markdown pre > code {
    width: 100%;
    display: block;
    overflow-x: auto;
}
