:root {
  --blue-1: #11446e;
  --blue-2: #28d;
  --blue-3: #bddcf5;
  --red-1: #c11;
  --red-2: #e22;
  --red-3: #f33;

  --grey-1: #444;
  --grey-2: #888;
  --grey-3: #ccc;
  --grey-4: #ddd;

  /* keep this in sync with pathAnimationDuration in app.js */
  --path-animation-duration: 0.5s;

  font: 14px Verdana, Arial, sans-serif;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 17px;
}

h4 {
  font-size: 15px;
}

h1, h2, h3, h4 {
  text-align: center;
}

a, a:visited {
  color: var(--blue-1);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  /*background: var(--grey-4);*/
}

input.error {
  background: var(--red-3);
  transition: background 0.25s;
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100svh;
  background: white;
}

.content header, .content main, .content footer {
  padding: 0.5em;
}

main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.start-and-finish {
  display: flex;
  /* flex-direction: row;
     flex-wrap: wrap; */
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

button {
  border: 1px solid var(--blue-2);
  border-radius: 8px;
  padding: 4px 8px;
  font-weight: bold;
  background: linear-gradient(0deg, #e0e0e0 0%, #e8e8e8 25%,#f0f0f0 75%, #f8f8f8 100%);
  color: black;
}

button:hover:not(:disabled) {
  cursor: pointer;
}

button:hover {
  background: var(--blue-3);
}

button:active {
  background: var(--blue-2);
  color: white;
}

button:focus {
  outline: 1px solid var(--blue-2);
}

.page-input {
  padding: 8px;
  display: flex;
  flex-direction: column;
}

.page-input label {
  font-size: 125%;
  font-weight: bold;
  padding: 0 8px 8px 8px;
}

.text-input-and-icon {
  display: flex;
  flex-direction: row;
}

.text-input-and-icon input {
  height: 24px;
  padding: 4px 12px;
}

.text-input-and-icon svg {
  padding: 0;
}

.text-input-and-icon input {
  border-radius: 20px;
  border: 1px solid var(--blue-2);
}

.text-input-and-icon input:focus {
  outline: 1px solid var(--blue-2);
}

.text-input-and-icon button {
	padding: 0;
  margin: 4px;
  width: 24px;
  height: 24px;

  border: 0;
  border-radius: 4px;

  margin-left: -36px;
  margin-right: 20px;  /* -(width + margin-left) */
}

.text-input-and-icon button:not(:active, :hover, :disabled) {
  background: rgba(255, 255, 255, 80%);
}

.text-input-and-icon button:focus {
  outline-width: 2px;
}

button:disabled,
.text-input-and-icon input:disabled {
  background: var(--grey-3);
  color: var(--grey-2);
  border-color: var(--grey-1);
  outline-color: var(--grey-1);
}

.search-buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 8px;
  padding: 4px;
}

.search-buttons button {
  min-width: 10em;
  margin: 1em 0;
}

.animation-control {
  text-align: center;
  padding-top: 4px;
}

.info-box {
  border: 1px solid black;
  margin: 16px;
}

.info-box header h4 {
  margin: 0;
  padding: 0;
}

.info-box header {
  background: var(--blue-3);
  padding: 8px 8px;
  text-align: center;
}

.info-box.error header {
  background: var(--red-1);
  display: flex;
  flex-direction: row;
}

#error-title, #error-close {
  color: white;
}

#error-title {
  flex-grow: 1;
}

#error-close {
  margin: 0;
  border: none;
  background: none;
}

.info-box content p,
.info-box content table {
  padding: 0 8px;
}

#path-found,
#path-not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.path-list {
  display: flex;
  flex-direction: column;
}

.path-list .row {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.path-list span.index {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 32px;
  background: black;
  color: white;
  text-align: center;
  margin-right: 8px;
  z-index: 1;
}

.path-list .row .page a {
  font-size: 125%;
}

.path-list .link {
  height: 48px;
  background: black;
  width: 8px;
  margin-left: 12px;
  margin-top: -16px;
  margin-bottom: -16px;
}

.path-list .link.animated {
  animation-name: path-list-link-animation;
  animation-timing-function: linear;
  animation-duration: var(--path-animation-duration);
  animation-fill-mode: both;
}

@keyframes path-list-link-animation {
  0% {
    height: 0px;
  }
  100% {
    height: 48px;
  }
}

.path-list .row .index.animated {
  opacity: 0%;
  animation-name: path-list-row-index-animation;
  animation-duration: var(--path-animation-duration);
  animation-fill-mode: forwards;
}

@keyframes path-list-row-index-animation {
  0%, 100% {
    opacity: 100%;
  }
}

.path-list .row .page.animated {
  animation-name: path-list-row-page-animation;
  animation-duration: var(--path-animation-duration);
  animation-fill-mode: both;
}

@keyframes path-list-row-page-animation {
  0%, 50% {
    opacity: 0%;
  }
  100% {
    opacity: 100%;
  }
}

.path-list .link-missing {
  height: 64px;  /* not sure why this is necessary... */
  margin-top: -8px;
  margin-bottom: -8px;
}

#corpus-info table,
#search-stats table {
  width: 100%
}

#corpus-info table th,
#search-stats table th {
  text-align: left;
  padding-right: 1em;
}

#corpus-graph {
  font: 12px "Courier New", monospace;
}

#corpus-pages, #corpus-links,
#vertices-reached, #vertices-expanded, #edges-expanded, #time-taken {
  text-align: right;
}
