/* LAYOUT =========================================================== */
body {
    box-sizing: border-box;
    margin: 0;
    display: flex;
    min-height: 100vh;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

aside {
    position: fixed;
    top: 0;
    left: 0;
    width: 330px;
    height: 100vh;
    background: #2c3e50;
    color: white;
    padding: 20px;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
    :is(h1, h2, h3):not(:first-child) {
        margin-top: 40px;
    }
    a {
        color: white;
        font-weight: bold;
        text-decoration: none;
    }
    a:hover {
        color: cyan;
    }
}

.content, .content-benchmark {
    flex: 1;
    margin-left: 330px;
    min-width: 0;
}

.content {
    background: #f5f5f5;
    padding: 20px;
    margin-left: 330px;
}

.menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    right: 16px;
    left: auto;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    background: #2c3e50;
    color: white;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    white-space: nowrap;
    z-index: 1100;
}

/* Tablet/mobile ==================================================== */
@media (max-width: 1024px) {
    aside {
        width: 330px;
        transform: translateX(-100%);
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.25);
    }

    aside.open {
        transform: translateX(0);
    }

    .content, .content-benchmark {
        margin-left: 0;
        width: 100%;
        padding-top: 72px;
    }

    .menu-toggle {
        display: inline-block;
    }
}

/* OTHERS =========================================================== */
hr.dotted {
    border-top: 1px dotted gray;
}

kbd {
    padding: 1px 2px 0;
    border-radius: 3px;
    border: 1px solid #666;
    border-color: grey;
    font-family: monospace;
    box-shadow: 2px 2px grey;
}

/* FIGURES ========================================================== */
figure.right,
figure.left,
figure.center {
    display: block;
    padding: 0px;
    text-align: center;
    font-size: small;
}

figure.right {
    clear: right;
    float: right;
    margin: 0px 0px 0px 10px;
}

figure.left {
    clear: left;
    float: left;
    margin: 0px 10px 0px 0px;
}

figure.center {
    clear: center;
    float: center;
    margin: 0px 10px 0px 10px;
    figcaption { margin: 0 auto; }
}

.figure figcaption {
    max-width: 100%;
}

/* DIV: ADMONITIONS ================================================= */
div.admonition {
    width: fit-content;
    padding: 6px 12px 0 10px; /* top right down left OR vert horiz */
    margin: 30px 0;
    background-repeat: no-repeat;
    background-position: 8px 8px;
    background-color: #ffffcb;
    border: 0.1em solid;
    border-left: 7px solid;
    border-radius: 7px;
    min-height: 26px;
    p { margin: 10px 0 10px 0; }
}

.admonition.important {
    background-color: #d3f2fb;
    border-color: #4fc3f7;
}
.admonition.note {
    background-color: #dbe4ff;
    border-color: #7c9cff;
}
.admonition.tip {
    background-color: #e3efed;
    border-color: #00bfa5;
}
.admonition.warning {
    background-color: #fff8e1;
    border-color: #ffc107;
}
.admonition.caution {
    background-color: #feefee;
    border-color: #ea3158;
}
.admonition.quote {
    background-color: #ececec;
    border-color: #9e9e9e;
}
.admonition.example {
    background-color: #f5f0ff;
    border-color: #8b5cf6;
}

.admonition.important::before,
.admonition.note::before,
.admonition.tip::before,
.admonition.warning::before,
.admonition.caution::before,
.admonition.quote::before,
.admonition.example::before {
    font-weight: bold;
    font-size: large;
    letter-spacing: .02em;
}

.admonition.important::before {
    content: "ℹ️ Important";
    color: #0ba9f0;
}
.admonition.note::before {
    content: "📝 Note";
    color: #6389ff;
}
.admonition.tip::before {
    content: "💡 Tip";
    color: #00a68f;
}
.admonition.warning::before {
    content: "⚠️ Warning";
    color: #e69500;
}
.admonition.caution::before {
    content: "🔥 Caution";
    color: #ea3158;
}
.admonition.quote::before {
    content: "💬 Quote";
    color: #757575;
}
.admonition.example::before {
    content: "🔍 Example";
    color: #8b5cf6;
}

body.no-scroll {
    overflow: hidden;
}

/* CODE AND TABLES ================================================== */
code {
    background: #e6e8eb;
    border-radius: 4px;
    padding: 1px 4px;
}

pre {
    background: #2c3e50;
    color: white;
    border-radius: 7px;
    padding: 12px;
    overflow-x: auto;
    code {
        background: none;
        padding: 0;
    }
}

table {
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    border: 1px solid #bbb;
    padding: 6px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #dde1e6;
}

/* GITHUB LINK ====================================================== */
.github-link {
    margin-top: 40px;
    a {
        display: flex;
        align-items: center;
        gap: 8px;
        line-height: 1;
    }
    svg {
        display: block;
        flex-shrink: 0;
    }
}

#github-stars:not([hidden]) {
    display: inline-flex;
    align-items: center;
    height: 20px;
    border: 1px solid currentColor;
    border-radius: 10px;
    padding: 0 8px;
    font-size: small;
}
