/* cammont · transportfoxie.pl */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Lexend', monospace;
  background-image: url('repeatyblaufox.png');
}

a {
  color: #004A7F;
}

/* top-left logo */
.toplogo {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3;
  line-height: 0;
}
.toplogo img {
  width: 320px;
  height: auto;
}

/* The side navigation menu */
.sidebar {
  position: fixed;
  top: 120px;
  left: 0;
  bottom: 0;
  width: 200px;
  margin: 0;
  padding: 0;
  background-color: #004A7F;
  overflow: auto;
  z-index: 2;
}

/* Sidebar links */
.sidebar a {
  display: block;
  color: white;
  padding: 10px;
  text-decoration: none;
  font-weight: bold;
}

/* Active/current link */
.sidebar a.active {
  background-color: #0094FF;
  color: white;
}

/* Links on mouse-over */
.sidebar a:hover:not(.active),
.sidebar a:focus-visible:not(.active) {
  background-color: #FFFFFF;
  color: black;
}

/* scrolling notice bar */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  overflow: hidden;
  background-color: #0094FF;
  color: white;
  text-align: center;
  z-index: 1;
}

.header p {
  margin: 0;
  white-space: nowrap;
  line-height: 50px;
  display: inline-block;
  transform: translateX(50%);
  animation: scroll-left 20s linear infinite;
}

@keyframes scroll-left {
  0%   { transform: translateX(50vw); }
  100% { transform: translateX(-100%); }
}

/* if someone's asked their device for less motion, just let it sit still and wrap */
@media (prefers-reduced-motion: reduce) {
  .header p {
    animation: none;
    transform: none;
    white-space: normal;
    line-height: 1.3;
    padding: 6px 10px 6px 330px;
  }
}

/* everything right of the sidebar. flex column = sticky footer, no <br> pile needed */
.page {
  margin-left: 200px;
  padding-top: 50px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1 0 auto;
  padding: 1px 16px 40px;
  text-align: center;
}

h1 {
  margin: 22px 0 10px;
  overflow-wrap: anywhere;
}

/* info boxes */
.infobox {
  position: relative;
  display: block;
  width: 100%;
  max-width: 450px;
  margin: 25px auto 0;
  padding: 10px 12px;
  background-color: #ededed;
  color: black;
  text-align: left;
  line-height: 1.5;
}
.infobox.wide {
  max-width: 760px;
}
.infobox h2 {
  margin: 4px 0 8px;
  font-size: 1.2em;
  color: #004A7F;
}
.infobox p {
  margin: 8px 0;
}

.foxxo {
  display: block;
  width: 100%;
  height: auto;
}

/* the server address */
.address {
  display: inline-block;
  font-family: 'Lexend', monospace;
  font-weight: bold;
  background-color: #004A7F;
  color: white;
  padding: 2px 10px;
  user-select: all;
  overflow-wrap: anywhere;
}

.subinfo {
  position: relative;
  background-color: #dedede;
  color: black;
  margin: 0.5%;
  display: inline-block;
  text-align: left;
  padding: 0.5%;
}

/* dependencies table */
.placeholder-note {
  background-color: #fff4c2;
  border-left: 4px solid #0094FF;
  padding: 6px 10px;
}
.table-wrap {
  overflow-x: auto;
}
table.deps {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}
table.deps th {
  background-color: #004A7F;
  color: white;
  text-align: left;
  padding: 8px;
  white-space: nowrap;
}
table.deps td {
  padding: 8px;
  border-bottom: 1px solid #cfcfcf;
}
table.deps tbody tr:nth-child(even) {
  background-color: #dedede;
}
table.deps td.tbc {
  color: #6b6b6b;
  font-style: italic;
}
table.deps .ask {
  color: #6b6b6b;
  font-style: italic;
  white-space: nowrap;
}
/* rp table: keep version/link on one line, let notes wrap */
table.deps.rp td:nth-child(2),
table.deps.rp td:nth-child(3) {
  white-space: nowrap;
}
table.deps.rp td:nth-child(4) {
  min-width: 12em;
}

/* footer */
footer {
  flex-shrink: 0;
}
.footergradient {
  display: block;
  width: 100%;
  height: 50px;
  margin: 0;
}
.footer {
  padding: 5px 0;
  width: 100%;
  background-color: #373738;
  color: white;
  text-align: center;
}

/* phones and small windows: sidebar becomes a top bar */
@media screen and (max-width: 700px) {
  .header {
    position: static;
    height: 40px;
  }
  .header p {
    line-height: 40px;
    font-size: 0.9em;
  }

  .toplogo {
    position: static;
    display: block;
    background-color: #004A7F;
  }
  .toplogo img {
    width: 200px;
  }

  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    overflow: visible;
  }
  .sidebar a {
    flex: 1 1 auto;
    text-align: center;
  }

  /* stack header, logo, nav and page; page stretches so the footer still hugs the bottom */
  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .page {
    margin-left: 0;
    padding-top: 0;
    min-height: 0;
    flex: 1 0 auto;
  }

  .content {
    padding: 1px 12px 30px;
  }
  h1 {
    font-size: 1.5em;
  }
}

@media screen and (max-width: 700px) and (prefers-reduced-motion: reduce) {
  .header { height: auto; }
  .header p { padding: 6px 10px; }
}

.footer p { margin: 0; }
.footer .footer-sub { font-size: 0.8em; opacity: 0.75; margin-top: 2px; }

@media screen and (max-width: 700px) {
  table.deps.rp td:nth-child(4) { min-width: 9em; }
}
