@font-face {
	font-family: "Mono MMM 5";
	src: url("font/monoMMM_5.ttf");
}

:root {
    --title-font: arial,sans-serif;
    --body-font: arial,sans-serif;

    --dark:  #f9f9f9;
    --dark1:  #d0d0d0;
    --dark2: #b0b0b0;
    --light: #191f1f;
    --light1: #2a2f2f;
    --light2: #404949;
    --bad:   #ef3200;
    --good:  #44ee44;
    --action: #1d70b8;
    --button: #bbe0ff;
    --button-hover: #d4f7d4;

    --state-waiting: lightgrey;
    --state-claimed: lightcyan;
    --state-finished: lightgreen;
    --state-error: pink;
    --state-timeout: yellow;
    --state-skipped: gold;
    --state-retry: lightgrey;
    --state-delete: pink;
}

[data-theme="serious-dark"] {
    --title-font: "GDS Transport",arial,sans-serif;
    --body-font: "GDS Transport",arial,sans-serif;

    --dark: #191f1f;
    --dark1: #2a2f2f;
    --dark2: #404949;
    --light: #f9f9f9;
    --light1: #d0d0d0;
    --light2: #a0a0a0;
    --bad:   #e51;
    --good:  #00ee44;
    --action: #1d70b8;
    --button: #6fa4d2;
    --button-hover: #006611;

    --state-waiting: grey;
    --state-claimed: #10a9ee;
    --state-finished: #00790f;
    --state-error: #ac0303;
    --state-timeout: orange;
    --state-skipped: goldenrod;
    --state-retry: #10a9ee;
    --state-delete: #ac0303;

}

[data-theme="fanciful-dark"] {
    --title-font: "Mono MMM 5";
    --body-font: 'Barlow Semi Condensed', sans-serif;

    --dark: #191f1f;
    --dark1: #2a2f2f;
    --dark2: #404949;
    --light: #f9f9f9;
    --light1: #d0d0d0;
    --light2: #a0a0a0;
    --bad:   #e51;
    --good:  #00ee44;
    --action: var(--bad);
    --button: #3e1f11;
    --button-hover: #006611;

    --state-waiting: grey;
    --state-claimed: #10a9ee;
    --state-finished: #00790f;
    --state-error: #ac0303;
    --state-timeout: orange;
    --state-skipped: goldenrod;
    --state-retry: #10a9ee;
    --state-delete: #ac0303;
}

[data-theme="fanciful-light"] {
    --title-font: "Mono MMM 5";
    --body-font: 'Barlow Semi Condensed', sans-serif;

    --dark:  #f9f9f9;
    --dark1:  #d0d0d0;
    --dark2: #b0b0b0;
    --light: #191f1f;
    --light1: #2a2f2f;
    --light2: #404949;
    --bad:   #ef3200;
    --good:  #44ee44;
    --action: #d205ab;
    --button: #f1c8e9;
    --button-hover: #d4f7d4;

    --state-waiting: lightgrey;
    --state-claimed: lightcyan;
    --state-finished: lightgreen;
    --state-error: pink;
    --state-timeout: yellow;
    --state-skipped: gold;
    --state-retry: lightgrey;
    --state-delete: pink;
}

* { box-sizing: border-box; }

body {
    background: var(--dark);
    color: var(--light);
    font-family: var(--body-font);
    padding: 0;
    margin:0;
}

nav {
    background: var(--dark);
    color: var(--light);
    margin: 0;
    padding:0;
    align-items: center;
    padding-right:0.5em;
    padding-left:0.5em;
    border-bottom: 2px var(--light) solid;

    display: grid;
    gap: 1em;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: max-content;

}

.page-navbar {
    display: flex;
}

nav a {
    margin-left: 1em;
    text-transform: uppercase;
    font-size: 1.2em;
    font-family: var(--title-font);
}

.page-navbar .nav-name h1 {
    display: inline-block;
}
.page-navbar .nav-name a {
    text-transform: none;
    font-size: 1em;
}

nav .classification {
    text-align: center;
    flex-grow: 1;
}

nav .nav-links {
    text-align: right;
}

div#app {
    width: 100%;
    height:100vh;
    display:flex;
    flex-direction: column;
}

div#app > *:last-child {
    flex-grow: 1;
}

.main-view {
    overflow:auto;
    padding: 1em;
}

h1, h2, h3, h4, h5 {
    font-family: var(--title-font);
    background: var(--dark);
    color: var(--light);
    padding:2px;
    margin:0;
}

a {
    color:var(--action);
    font-weight: bold;
    text-decoration:none;
}

a:visited {
    color:var(--action);
}

a:hover {
    filter: invert(1);
}

.center-both {
    display: flex;
    justify-content: center;
    align-items: center;
    width:100%;
}

.busy {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    background: rgba(100,0,0,0.5);
}


div.dialog {
    border: 2px var(--light) solid;
    background: var(--light);
    color: var(--dark)
}

div.dialog h1 {
    font-size: 1.2em;
    background: var(--action);
    padding: 0.2em;
}

.loader {
  width: 48px;
  height: 48px;
  border: 2px dotted var(--light);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  box-sizing: border-box;
  animation: rotation 2s linear infinite;
}
.loader::after,
.loader::before {
  content: '';
  box-sizing: border-box;
  position: absolute;
  left: 0;
  top: 0;
  background: var(--action);
  width: 6px;
  height: 6px;
  transform: translate(150%, 150%);
  border-radius: 50%;
}
.loader::before {
  left: auto;
  top: auto;
  right: 0;
  bottom: 0;
  transform: translate(-150%, -150%);
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

li::marker {content:"";}

li::before {
    content: "▷";
    color: var(--light);
    font-size: 0.8em;
    width: 1rem;
    height: 1rem;
    margin-right: .5rem;
    vertical-align: top;
}

li {
    padding-top: 0.2em;
    padding-bottom: 0.2em;
}

summary {
    font-family: var(--title-font);
    font-size:1.5em;
}

summary h2 {
    margin-top: 12px;
    margin-bottom: 12px;
}

.info-panel summary {
    font-family: unset;
    font-size: 1em;
}

.legend p {
    margin: 0;
}

.legend i {
    width: 14px;
    height: 14px;
    float: left;
    margin-right: 8px;
    opacity: 0.7;
}

.legend .line {
    width: 16px;
    height: 0px;
    margin-top: 7px;
    margin-bottom: 5px;
    float: left;
    margin-right: 8px;
    opacity: 0.7;
}

.greyscale {
    filter: grayscale(100%);
}


.grid-2 {
    display: grid;
    grid-template-columns: max-content max-content;
    grid-gap: 0.5em;
    align-items: start;
}

.grid-4 {
    display: grid;
    grid-template-columns: max-content max-content max-content max-content;
    grid-gap: 0.5em;
    align-items: start;
}

.grid-6 {
    display: grid;
    grid-template-columns: max-content max-content max-content max-content max-content max-content;
    grid-gap: 0.5em;
    align-items: start;
}

.grid-8 {
    display: grid;
    grid-template-columns: max-content max-content max-content max-content max-content max-content max-content max-content;
    grid-gap: 0.5em;
    align-items: start;
}

.cross-out::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background-image: linear-gradient(to left top, transparent 47.75%, var(--action) 48%, var(--action) 52.5%, transparent 53.25%),
    linear-gradient(to left bottom, transparent 47.75%, var(--action) 48%, var(--action) 52.5%, transparent 53.25%);
}

.cross-out {
      position: relative;
      border: 2px var(--action) solid;
}

.fr {
    display: flex;
    flex-direction: row;
}

.fc {
    display: flex;
    flex-direction:column;
}

.m1 { margin: 1em; }
.ml1 { margin-left: 1em; }
.mla {
    margin-left: auto;
}

table {
    border-collapse: collapse;
    width:100%;
}

tr:nth-child(even) {
    background: var(--dark1);
    color: var(--light);
}

tr:nth-child(odd) {
    background: var(--dark);
    color: var(--light);
}

thead tr:last-child {
    border-bottom: 1px var(--light) solid;
}

thead th {
    text-align:left;
}

.hover tbody tr:hover {
    background: var(--dark2);
}

.model-runs-summary, .zone-summary {
    white-space: nowrap;
}

tr td:first-child, tr th:first-child {
    padding-left: 0;
}

tr td, tr th {
    padding-left: 1em;
}

.maplibregl-ctrl-attrib {
    color: black;
    max-width: 60vw;
}

div.tabs *[title] {
    pointer:help;
}

div.tabs *[title]::after {
    content:' ℹ';
    color: #00bfff;
    vertical-align:super;
    font-size:0.5em;
    margin-right:-0.5em;
}

/* New project form */
.new-project-form {
    max-width: 500px;
    margin-bottom: 2rem;
}
.new-project-form > label {
    display: block;
    margin-top: 1rem;
}
.new-project-form input {
    width: 100%;
    margin-top: 0.5rem;
}
.new-project-form select {
    margin-top: 0.5rem;
}

/* Some margin utility classes */
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
