table {
    padding: 10px;
    background-color: white;
    border: 1px solid hsl(0, 0%, 80%);
}

tr {
    padding: 0.5em 0.5em;
    border-collapse: collapse;
}

td, th {
    padding: 0.3em 0.5em;
    vertical-align: middle;
    white-space: nowrap;
    line-height: 150%;
}

th {
    font-size: 100%;
    background-color: hsl(200, 40%, 10%);
    color: white;
    padding-left: 10px;
    padding-right: 10px;
}

.full-width {
    width: 100%;
}

table.key-value {
    width: 100%;
}

table.key-value tbody th {
    background-color: hsl(220, 20%, 35%);
    width: 25%;
    text-align: left;
}

table.key-value thead th {
    text-align: center;
    background-color: hsl(200, 40%, 10%);
}

table.info {
    width: 100%;
}

table.alternating tr:nth-child(even) {
    background-color: hsla(0, 0%, 80%, 0.4);
}

div.partition table {
    width: 100%;
}

tr.spacer {
    padding: 0;
    height: 0;
    background-color: hsla(200, 40%, 10%, 1);
}

tr.spacer td {
    padding: 0.15em;
}

tr.active {
    background-color: hsl(110, 70%, 90%) !important;
}

tr.max-light {
    font-weight: bold;
}

tr.total {
    background-color: hsl(240, 20%, 80%) !important;
}

tr.subgroup th, th.subgroup {
    background-color: hsl(220, 20%, 25%);
}

tr.subnetwork th, th.subnetwork {
    background-color: hsl(220, 20%, 35%);
}

th.station {
    background-color: hsl(220, 20%, 45%);
}

th.subnetwork {
    font-size: 120%;
    text-align: center;
    padding: 0 2mm;
}

span.sname {
    height: 100%;
}

th a {
    color: white;
}

table td a {
    text-decoration: none;
}

td {
    border-collapse: collapse;
    width: auto;
}

td.shrink, th.shrink {
    width: 0;
}

td.arrow {
    width: 20px;
}

td.orderable {
    width: 150px;
}

td.multihead {
    vertical-align: middle;
}

td.data {
    text-align: right;
}

td.name {
    text-align: center;
}

td.timestamp {
    text-align: center;
}

td.station {
    text-align: center;
    width: 1%;
}

td.camera {
    text-align: center;
}

td.text {
    width: 100%;
    text-align: left;
    word-break: break-word;
    white-space: pre-line;
    line-height: 1.5;
}

td.verbatim {
    font-family: "DejaVu Sans Mono", monospace;
    width: 150px;
}

td.since {
    text-align: right;
    min-width: 70px;
}
td.since[state="invalid"] {
}

td.heartbeat { font-weight: 600; }

td.l { text-align: left; !important }
td.c { text-align: center; !important }
td.r { text-align: right; !important }

td.boolean {
    text-align: center;
    width: 60px;
}

td.on { text-align: center; }
td.on[state="on"] { color: hsl(120, 100%, 30%); }
td.on[state="off"] { color: red; }

td.cv {
    font-weight: 500;
    text-align: center;
}

td.code {
    font-family: "Droid Sans Mono", "Consolas", monospace;
    font-size: 110%;
    text-align: center;
}

td.altitude, td.angle, td.distance, td.speed {
    text-align: right;
}
td.source {
    text-align: center;
}

/*
 * A dot beside a magnitude, as large as that frame was bright, in a cell of its own.
 *
 * Its own cell so that the numbers line up on their own edge: a dot in front of each would push
 * every number along by its own width, and a column of magnitudes is read by comparing digits. It
 * hugs the number from the left -- this cell gives up its right padding and the number's cell keeps
 * the padding on its side -- and the header above the pair spans both.
 *
 * The size is a hard cap and the reason is here rather than in the template: the box is a fixed 1em
 * and the dot a percentage of it, so 100% is the largest thing that can be drawn, and 1em sits well
 * inside the 1.5em line-height every cell already reserves. A row cannot grow no matter what
 * magnitude comes out of a reduction -- and they have been as absurd as -39.70. max-width and
 * max-height say it a second time, for whatever sets --dot next.
 */
td.magnitude-dot {
    text-align: right;
    padding-right: 0;
}

.mag-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    vertical-align: middle;
}

.mag-dot > i {
    width: var(--dot, 0);
    height: var(--dot, 0);
    max-width: 100%;
    max-height: 100%;
    border-radius: 50%;
    background-color: currentColor;
}

td.magnitude::after {
    content: "m";
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
    top: -0.5em;
}
td.altitude::after { content: " m"; }
td.angle::after, td.latitude::after, td.longitude::after, td.azimuth::after { content: "°"; }
td.duration::after { content: " s"; }
td.speed::after { content: " km/s"; }
td.distance::after { content: " m"; }
td.file-size::after { content: " MB"; }
td.fps::after { content: " fps"; }
td.mm::after { content: " mm"; }
td.um::after { content: " µm"; }
td.pixels::after { content: " px"; }
td.proj-linear::after { content: " rad/mm"; }
td.proj-linexp::after { content: " rad¯¹"; }
td.proj-quadexp::after { content: " rad¯²"}

td.type, td.seen, td.station {
    padding: 0;
    width: 0;
}

td.type {
    font-size: 140%;
    vertical-align: middle;
}

td.subnetwork { text-align: center; }

td.tags {
    text-align: right;
    padding: 1mm;
    text-overflow: ellipsis;
}

td.user {
    text-align: center;
}

td.seen { text-align: center; }
td.seen > span {
    margin: 0 1mm !important;
}

td.edit {
    text-align: center;
    padding: 1mm;
    width: 0%;
}

td.edit img { height: 16px; }

/* station status colours */

td abbr.status { font-weight: 600; }

td.merge {
    width: 10px;
    text-align: center;
}

td.merge > label {
    text-align: center;
}

td.merge > label > input {
    display: inline;
}

span.enabled { color: hsl(120, 100%, 30%); }
span.disabled { color: hsl(0, 100%, 40%); }

ul.meteor-sighting-list {
    display: inline-flex;
    gap: 2mm;
}

li.meteor-sighting-item {
    display: inline;
}
