* {
    box-sizing: border-box;
}

:root {
    --primary-color: #20bae5;
    --secondary-color: #888;

    --color-dark: 20%;
    --color-darker: 40%;
    --color-disabled: 75%;
}

body {
    font-family: sans-serif;
    text-align: center;
    font-size: 18px;
    padding: 0;
    margin: 0;
    line-height: 1.2em;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: center;
}

h1 {
    background-color: var(--primary-color);
    color: white;
    margin: 0;
    padding: 15px 20px;
    font-size: 22px;
}

h1 span, .flap {
    display: inline-block;
    margin: auto 1px auto 0;
    width: 26px;
    padding: 6px 0;
    color: white;
    background-color: #333;
    border-radius: 5px;
    position: relative;
}

h1 span::after, .flap::after {
    display: block;
    content: ' ';
    width: 100%;
    height: 1px;
    background-color: #333;
    top: 50%;
    position: absolute;
}

h5 {
    color: color-mix(in srgb, var(--primary-color), black var(--color-darker));
    margin: 5px;
}

a {
    color: var(--primary-color);
}

p {
    color: color-mix(in srgb, var(--primary-color), black var(--color-darker));
}


button, input, select {
    border-radius: 6px;
    padding: 10px 14px;
    height: 2.625rem;
}

button, select {
    --bg-color: var(--primary-color);
    background-color: var(--bg-color);
    border: none;
    color: white;
    font-size: 20px;
}

button#cancel {
    --bg-color: var(--secondary-color);
}

button:hover, select:hover {
    background-color: color-mix(in srgb, var(--bg-color), black var(--color-dark));
}

button:hover {
    cursor: pointer;
}

button:active, select:focus-visible {
    background-color: color-mix(in srgb, var(--bg-color), black var(--color-darker));
}

button:disabled, select:disabled {
    background-color: color-mix(in srgb, var(--bg-color), white var(--color-disabled));
}

select {
    appearance: none;
    padding-right: 30px;
    background: url('select-bg.svg') no-repeat;
    background-color: var(--bg-color);
    background-size: 24px;
    background-position: calc(100% - 5px) 11px;
    background-repeat: no-repeat;
}

select:focus-visible {
    outline: none;
}

.container {
    max-width: 540px;
    padding: 0 20px;
    margin: 20px auto;
    flex-grow: 1;
    align-content: center;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 30px;
}

#console {
    width: 500px;
    height: 300px;
    background-color: black;
    color: white;
    margin: 20px 0;
    padding: 20px;
    text-align: left;
    font-family: monospace;
    overflow-y: scroll;
}

#wiring {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, .4);
    display: flex;
    justify-content: center;
    align-items: center;
}

#wiring img {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    width: 800px;
}

footer {
    padding: 10px;
}