/* ***** c2rust.com ***** */
:root {
    /* Color palette  */
    --black: rgb(26, 26, 26);
    --dark-gray: rgb(33, 39, 44);
    --light-gray: rgb(56, 56, 56);
    --galois-blue: rgb(55, 119, 188);
    --galois-turquoise: rgb(0, 157, 224);
    --galois-yellow:    rgb(255, 195, 46);
    --transparent-white: rgba(255, 255, 255, 0.1);
}

/* ***** Common structural elements ***** */
body {
    font-family: alternate-gothic-atf, sans-serif;
    line-height: 1.5;
    background-color: var(--black);
    color: white;
}

h1, h2 { font-weight: normal; }
h1 { font-size: 3rem; }
h2 { font-size: 2rem; }

a { color: var(--galois-yellow); }

dt { font-weight: bold; }
dd { margin-bottom: 1em; }

/* ***** Helper classes ***** */

/* *** Spacing *** */
img.centered-vert {
    display: inline-block;
    vertical-align: middle;
}
.fill { width: 100%; }
.spaced { margin: 0 8px; }

/* *** Flexboxes ***
 *
 * Use: Combine alignment, justification, and a flex-row classes to group
 *      content. Omitting alignment / justification uses CSS defaults.
 */
.align-center { align-items: center; }

.justify-center { justify-content: center; }
.justify-spaced { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

.flex-row, .flex-row-responsive-md, .flex-row-responsive-sm {
    display: flex;
    flex-direction: row;
}

/* *** For sticky elements intended to sit on top of other content *** */
.stuck {
    z-index: 5;
    position: sticky;
}

/* ***** Page Layout ***** */

/* *** Vertical marginals *** */
header, footer {
    min-height: 64px;
    background: var(--dark-gray);
}
header {
    top: 0;
    max-height: 64px;
    transition: max-height 0.1s ease-out;
}

/* *** Header logos *** */
figure#logos {
    padding: 0;
    margin: 0;
}
figure#logos img {
    padding: 16px 16px 15px;
    height: 32px;
    border-bottom: 1px solid transparent;
}
figure#logos img:hover { border-bottom: 1px dashed var(--galois-turquoise); }

/* *** Navigation menu (small screens) *** */
input#menu { display: none; }
input#menu +label {
    display: none;
    cursor: pointer;
}
input#menu +label img {
    padding: 16px;
    height: 32px;
    filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%);
}
input#menu:checked +label img {
    filter: brightness(0) saturate(100%) invert(77%) sepia(96%) saturate(1882%) hue-rotate(330deg) brightness(103%) contrast(107%);
}

/* *** Navigation links *** */
nav a {
    padding: 20px 16px;
    text-decoration: none;
    text-align: center;
}
nav a:hover {
    background: var(--galois-turquoise);
    color: white;
}

/* *** Demo code editors *** */
.editor { flex: 0 1 49%; }
.textedit { box-shadow: 0 6px 20px var(--transparent-white); }
.editor-title {
    background: var(--galois-blue);
    padding: 8px;
    border: 2px solid var(--transparent-white);
    border-top-left-radius:  4px;
    border-top-right-radius: 4px;
}
.src {
    height: 512px;
    border: 2px solid var(--light-gray);
    border-top: 0;
}
.editor button, .editor select {
    padding: 8px 8px;
    margin: 8px 0px;
    border-radius: 4px;
}
.editor button {
    background-color: var(--galois-blue);
    color: white;
    cursor: pointer;
    border: 0;
}
.editor button:hover { background-color: var(--galois-turquoise); }
.editor button:active { background-color: var(--galois-blue); }

/* *** Main body *** */
main { padding: 0 2.5%; }
input#uploadFile { display: none; }

/* ***** Media Queries ***** */
@media(max-width: 992px) {
    .flex-row-responsive-md {
        flex-direction: column;
        justify-content: center;
    }
}

@media(max-width: 640px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.5rem; }

    .flex-row-responsive-sm {
        flex-direction: column;
        justify-content: center;
    }

    input#menu +label { display: block; }

    header:has(input#menu:checked) {
        max-height: 200px;
        transition: max-height 0.1s ease-in;
    }
    header:has(input#menu:checked) nav { max-height: 100%; }

    nav {
        max-height: 0;
        overflow: hidden;
    }
    nav a {
        width: 100%;
        padding: 10px 0;
    }
}
