body {
    font-family: "Arial", sans-serif;
}

input, select {
    margin-right: .5em;
}

.error {
    border-left: 5px double rgb(175, 39, 47);
    padding: .5em;
    background-color: rgba(175, 39, 47, 0.2);
}

.container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    padding-bottom: 30px;
    max-width: 99vw;    
}

h1 {
    display: none;
}

h2 {
    font-size: 1.2em;
    margin-top: 0;
}

aside {
    max-width: 300px;
}

fieldset {
    border-color: var(--soft-divider-color);
}

fieldset label {
    display: block;
}

fieldset label select,
fieldset label input:not([type=radio]) {
    float: right;
}

#wavelength fieldset {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
}

label:has(#playback-speed) {    
    display: flex;
}

#playback-speed-value {
    display: inline-block;
    text-align: right;
    width: 3em;
    white-space: nowrap;
    font-size: .8em;
}

#play-toggle {
    /* make ::before and ::after work in Firefox */
    -moz-appearance: initial;
    visibility: hidden;
    position: relative;
    font-size: 1rem;
    line-height: 1rem;
    height: 2rem;
}

#play-toggle::before,
#play-toggle::after {
    position: absolute;
    visibility: visible;
    color: var(--fg-color);
    font-size: 1rem;
    border: 1px solid var(--soft-divider-color);
    background-color: var(--bg-alt-color);
    padding: .5em;
}

#play-toggle::before {
    content: "⏵";    
    text-align: center;
    z-index: 10;
    border-right: none;
}

#play-toggle::after {
    left: 1.5rem;
    content: "Play";
    width: 5em;
}

#play-toggle:checked::before {
    content: "⏸";
}
#play-toggle:checked::after {
    content: "Pause";
}

.canvas-wrapper {
    width: 100%;
    position: relative;
    display: flex;
    /* space for minute mark */
    padding-top: 1.5em;
}

canvas {
    margin-top: 25px;
}

#frames {
    margin-left: 60px;
    width: 128px;
    margin-right: 2px;
}

input {
    background-color: buttonface;
    color: fieldtext;
}

.legend {
    position: absolute;    
    z-index: 10;
    display: flex;
    font-weight: bold;
}

.legend header div {
    height: 25px;  
}

.legend header .station {
    font-size: 2.5em;
    line-height: 120px;
    width: 60px;
    height: 130px;
    padding: 0;
}

.station abbr {
    text-decoration: none;
}

.legend .hours {
    display: flex;
    margin-left: 130px;    
}

.legend .hours div {
    width: 59px;
    font-weight: normal;
    text-align: center;
    border-right: 1px solid var(--hard-divider-color);
    opacity: .5;
}

.legend .hours div:last-of-type {
    border-right: none;
}

.minute {
    position: absolute;
    cursor: col-resize;
    z-index: 30;
    left: 187px;
    width: 3px;
    border-right: 2px solid var(--fg-color);
    border-left: 2px solid var(--fg-color);
    height: 100%;    
}
.minute::before {
    content: attr(data-value);
    display: block;
    width: 2em;
    position: absolute;
    top: -1.5em;
    left: -1.2em;
    font-weight: normal;
    text-align: center;
}

[role="meter"] {
    position: absolute;
    padding: 2px;
    width: 80%;
    top: 10%;
    left: 10%;
    height: 25px;
    border: 1px solid var(--hard-divider-color);
    background-color: var(--bg-color);
    border-radius: 5px;
    z-index: 20;
}

[role="meter"]::before {
    position: absolute;
    left: 1em;
    content: "Loading: " attr(aria-valuenow) "%";
    color: var(--bg-color);
}
  
.fill {
    width: 100%;
    height: 100%;
    box-sizing: border-box;    
    border-radius: 3px;
    color: var(--fg-color);
    background-color: var(--bg-color);
}