/* The plain look-up pages under /look, served by the Worker (worker/look.js). */
:root {
  --green: #00703c;
  --orange: #e86a10;
  --ink: #17201c;
  --muted: #55625b;
  --line: #e1e7e2;
  --page: #f5f7f4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

header {
  padding: 12px 16px;
  background: #fff;
  border-bottom: 3px solid var(--green);
  box-shadow: inset 0 -3px 0 var(--orange);
}

header a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

main,
footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

h1 {
  margin: 20px 0 8px;
  font-size: 1.5rem;
  line-height: 1.25;
}

h2 {
  margin-top: 28px;
  font-size: 1.15rem;
}

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

code {
  overflow-wrap: anywhere;
  font-size: 0.9em;
}

.checked,
.none,
.from {
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #eaf0eb;
  font-size: 0.85rem;
}

td time {
  font-weight: 700;
  white-space: nowrap;
}

.soon {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.timetabled td time {
  font-weight: 500;
}

form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: end;
  padding: 12px;
  background: #fff;
  border-radius: 10px;
}

label {
  display: grid;
  gap: 2px;
  font-size: 0.9rem;
}

input,
button {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

button {
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

footer {
  margin-top: 32px;
  padding-bottom: 24px;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  th,
  td {
    padding: 7px 6px;
    font-size: 0.9rem;
  }

  /* With an Arrives column there are five, which only fit a phone this way. */
  .arrives th,
  .arrives td {
    padding: 6px 4px;
    font-size: 0.82rem;
  }

  .arrives .soon {
    white-space: normal;
  }
}

.columns {
  columns: 2 12rem;
  padding-left: 1.2rem;
}

.alert {
  padding: 8px 12px;
  border-radius: 8px;
  background: #fdecea;
  color: #8a1c14;
  font-weight: 600;
}

/* The app's name links to the app; "Look-up" to the look-up index, and on a site in more
   than one language, the page in the other ("English" on the Dutch site). */
header {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

header .look-home {
  margin-left: auto;
  font-weight: 600;
}

/* "Add to the app" under a page's summary. */
.to-app {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.to-app span {
  color: var(--muted);
  font-size: 0.9rem;
}

.button {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
