:root {
  --border-radius: 3px;
  --color-text: #666;
  --color-bg: white;
  --color-link: #f40;
  /* brown theme */
  --color-accent: hsl(20, 50%, 30%);
  --color-accent-bg: hsl(20, 20%, 90%);

  /* colors */
  --color-highlight: hsl(55, 85%, 85%);
  --color-blue: hsl(190, 70%, 35%);
  --color-blue-bg: hsl(190, 70%, 85%);
  --color-green-bg: hsl(80, 70%, 85%);
  --color-orange-bg: hsl(40, 100%, 85%);

  --color-red: hsl(0, 100%, 40%);
  --color-red-bg: hsl(0, 80%, 90%);

  --line-height: 1.5em;
  --font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  margin: 0;
  line-height: var(--line-height);
}

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 1em;
}

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

a:hover {
  color: var(--color-link);
}

header {
  margin-bottom: 1em;
}

h1 {
  font-size: 1.2em;
}

h1 a:first-child {
  color: black;
}

h1 a.small {
  font-weight: normal;
}

h1 a:hover {
  color: var(--color-link);
}

h2 {
  color: var(--color-accent);
}

h3 {
  font-size: 1em;
  background-color: var(--color-accent-bg);
  color: var(--color-accent);
  padding: 0.1em 0.5em;
  margin: 10px 0 5px 0;
  font-weight: normal;
  clear: both;
}

h3 strong {
  color: inherit;
  font-weight: bold;
}

h3 img {
  height: 1.1em;
  width: 1.1em;
  vertical-align: text-top;
}

h4 {
  color: black;
  margin: 0;
}

h4 a {
  font-weight: normal;
}

.right, aside {
  float: right;
  text-align: right;
  font-family: var(--font-family);
}

ul {
  padding: 0;
  list-style: none;
}

li {
}

/* at the right of the title */
aside {
  margin-top: 1em;
  font-size: 0.8em;
  line-height: 1.5em;
}

strong {
  color: black;
  font-weight: normal;
}

summary h3 {
  display: inline-block;
}

.controls {
  margin-bottom: 1em;
  color: var(--color-blue);
}
.summary {
  margin-bottom: 5px;
}

.timeline {
  width: 70%;
  margin-top: 5px;
}

.timeline svg text {
  font-size: 30px;
}

svg .warning {
  fill: hsl(0, 100%, 40%);
}

.windy-map {
}

.windy-map img {
  vertical-align: text-top;
}

.front-maps {
  float: left;
  width: 47.4%;
}

.satelite-maps {
  float: right;
  width: 52%;
}

.satelite-image {
  display: block;
  height: 30%;
  position: relative;
  border: 1px solid black;
}

.satelite-image h5, .meteogram-aeroweb h5 {
  margin: 0;
  text-align: center;
  font-size: 0.7em;
  font-weight: normal;
  line-height: 1.3em;
  color: black;
}

.satelite-image img {
  filter: contrast(1.2) brightness(1.1);
}

.satelite-image img.radar {
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0.7;
}

.map-overlay {
  position: relative;
}

.map-overlay img {
  display: block;
  width: 100%;
}

.map-overlay svg {
  display: block;
  position: absolute;
  left: 0;
  bottom: 0;
}

.meteogram-aeroweb {
  position: relative;
  width: 50%;
  float: left;
}

.meteogram-aeroweb img {
  display: block;
  width: 100%;
  height: auto;
}

.meteogram-aeroweb img + img {
  position: absolute;
  left: 0;
  bottom: 0;
}

.meteogram-aeroweb h5 {
  position: absolute;
  width: 100%;
}


h2#metars {
  clear: both;
}

.metar {
  clear: both;
  font-size: 0.9em;
  font-family: Monaco, "Lucida Console", monospace;
}

mark {
  padding: 1px 3px;
  margin: -1px -1px;
}

mark { color: black; background-color: var(--color-highlight); }
mark.blue { color: black; background-color: var(--color-blue-bg); }
mark.green { color: black; background-color: var(--color-green-bg); }
mark.orange { color: black; background-color: var(--color-orange-bg); }
mark.red { color: black; background-color: var(--color-red-bg); font-weight: bold;  }

.metar .icon {
  background-position: 95% center;
  background-repeat: no-repeat;
  background-size: 1.2em;
  padding-right: 1.8em;
}

.metar svg {
  vertical-align: top;
}

.metar .wind { background-image: url('icons/wind.svg'); }
.metar .ts { background-image: url('icons/cloud-lightning.svg'); }
.metar .cloud { background-image: url('icons/cloud.svg'); }

.icing svg circle {
  fill: black;
  stroke: rgba(0, 0, 0, 0.2);
  stroke-width: 15;
}

.notam {
  position: relative;
  margin-top: 5px;
}

.notam-form {
  position: absolute;
  left: -4em;
  opacity: 0.1;
}

.notam-form:hover {
  opacity: 1;
}

.notam small, .ignored, s {
  color: #bbb;
}

.temsis {
  clear: both;
}

.wintems {
  width: 140%;
  margin: 0 -20% 0 -20%;
  display: flex;
}

.new-page {
  page-break-before: always;
  clear: both;
}

.flash {
  margin-bottom: 1em;
  padding: 1em 1em 1em 3em;
  color: var(--color-blue);
  border-radius: var(--border-radius);
  background: hsl(190, 80%, 95%) url('icons/info.svg') 1em center no-repeat;
}

.error {
  margin: 1em 0;
  padding: 1em 1em 1em 3em;
  color: var(--color-red);
  border-radius: var(--border-radius);
  background: #dd220011 url('icons/warning.svg') 1em center no-repeat;
}

table {
  width: 100%;
  border-collapse: collapse;
  line-height: 1.1em;
}

th {
  text-align: left;
  line-height: 3em;
  text-transform: uppercase;
  font-size: 0.8em;
  border-bottom: 1px solid #eee;
}

th.id { width: 15%; }
th.location { width: 20%; }
td.location small { white-space: nowrap; }
td.message {
  font-size: 0.8em;
}

tr:first-child td {
  padding-top: 1em;
}

code {
  font-size: 0.9em;
  font-family: Monaco, "Lucida Console", monospace;
  text-transform: uppercase;
  color: #777;
}

form {
}

form h2 {
  color: var(--color-blue);
  margin-top: 0;
}

input[type="range"] {
  padding: 0.4rem 0;
}

input, select, textarea {
  font-size: 1rem;
  border: 1px solid var(--color-blue-bg);
  border-radius: var(--border-radius);
  padding: 0.4rem 0.6rem;
}

label {
  color: var(--color-blue);
  display: block;
  margin-top: 0.6rem;
}

input[type=checkbox] {
  transform: scale(1.5);
  vertical-align: text-top;
  margin: 2px 4px;
}

input[type=checkbox] + label {
  display: inline-block;
}

button {
  margin-top: 0.6rem;
  font-size: 1rem;
  font-weight: bold;
  font-family: var(--font-family);
  background-color: var(--color-blue);
  border: 2px solid var(--color-blue);
  color: var(--color-bg);
  border-radius: var(--border-radius);
  padding: 0.4rem 0.6rem;
}

form.new-brief {
  float: right;
  box-sizing: border-box;
  width: 30%;
  border: 2px solid var(--color-blue-bg);
  background-color: hsl(190, 70%, 95%);
  border-radius: var(--border-radius);
  padding: 1em;
}

.new-brief input#route, .new-brief input#date {
  width: calc(100% - 1em);
}

.recent {
  width: 67%;
}

.recent a {
  display: block;
  text-decoration: none;
  padding: 0.5rem 0 0.5rem 0;
  border-top: 1px solid var(--color-accent-bg);

  &:hover h4 {
    color: var(--color-link);
  }
}

.compact {
  font-size: 0.8rem;
  line-height: 1rem;
}

@media print {
  .wintems {
    margin-bottom: 60%;
    transform: rotate(90deg) translateX(17%);
  }
  header, .notam-form, .controls, .flash, .noprint {
    display: none;
  }
}

@media screen and (max-width: 600px) {
  body {
    font-size: 14px;
  }

  .hide {
    display: none;
  }

  .front-maps, .satelite-maps {
    float: none;
    width: auto;
  }

  .wintems {
    width: auto;
    display: block;
    margin: 0;
  }
  .map-overlay {
    margin-top: 5px;
  }

  form.new-brief {
    float: none;
    width: auto;
  }
  table.recent {
    width: 100%;
  }
}