:root {
  font-size: calc(0.5em + 1vw);
  --darkness: hsl(24, 10%, 5%);
  --light: hsl(24, 100%, 98%);
  --deep-blue: hsl(200, 50%, 30%);
  --light-blue: hsl(200, 100%, 80%);
}
@media (min-width: 1200px) {
  :root {
    font-size: 0.8em;
  }
}

a:link {
  color: var(--light-blue);
}
a:visited {
  color: var(--deep-blue);
}

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

li {
  margin: 0;
  padding: 0;
}

body {
  padding: 0;
  max-width: 1080px;
  margin: 0 auto;
  background-color: var(--darkness);
  color: var(--light);
}
@media (prefers-color-scheme: light) {
  body {
    background-color: var(--light);
    color: var(--darkness);
  }
}

div.loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Header */

header {
  font-size: 4em;
  margin: auto;
  padding: 0.6em 0 0.6em 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.35em;
}

header ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.15em;
}

header li {
  display: flex;
}
header li > button.enabled {
  background: var(--light);
  color: var(--darkness);
  opacity: 1;
}
header li > button {
  border-radius: 6px;
  padding: 0.1em 0.3em;
  background: var(--darkness);
  font-family: monospace;
  border-color: dimgray;
  color: var(--light);
  font-size: 0.4em;
}

div.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35em;
}
h1 {
  font-weight: normal;
  font-size: 1em;
  margin: 0;
}
@media (min-width: 1200px) {
  header {
    flex-direction: row;
    gap: 0;
  }
  div.logo {
    flex-grow: 1;
  }
  header ul {
    flex: 0 0 50%;
  }
}
header span.pod {
  color: hsl(24, 90%, 80%);
}
form {
  margin: 0;
  padding: 0;
  display: flex; /* Vertical align */
  flex-direction: column;
  justify-content: center;
}
input[type="search"] {
  background-color: var(--light);
  color: var(--darkness);
  font-family: inherit;
  font-size: 0.5em;
  border-radius: 0.1em;
  flex-grow: 0;
}
input:disabled {
  background-color: var(--darkness);
  color: var(--light);
}

div.some-results {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-size: 0.5em;
  text-wrap: nowrap; /* needed for chrome... */
}
div.some-results > * {
  margin: 0 0.2em;
}
div.some-results > div.npodcasts {
  display: none;
}
@media (min-width: 1200px) {
  div.some-results > div.npodcasts {
    display: block;
  }
}

/* ----------------- */

footer {
  text-align: center;
  padding: 1em 0em;
}

main {
  display: flex;
  flex-direction: column;
}
svg {
  margin: 1em auto; /* center spinner when bare on main */
  display: block;
}

/* Feeds */

details {
  border: 1px solid #aaa;
  border-radius: 5px;
  padding: 0.5em 0.5em 0;
}
details summary {
  font-size: 3rem;
  font-weight: bold;
  margin: -0.5em -0.5em 0;
  padding: 0.5em;
  list-style: none;
  display: flex;
  justify-content: space-between;
}
details[open] summary {
  background-color: var(--light);
  color: var(--darkness);
}
@media (prefers-color-scheme: light) {
  details[open] summary {
    background-color: var(--darkness);
    color: var(--light);
  }
}

/* Feed */

.feed-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center; /* for the "..." */
  padding: 0 0.4em;
}
.feed-details img {
  object-fit: contain;
  width: 100%; /* needed with align-items above */
}
@media (min-width: 1200px) {
  .feed-details {
    flex-direction: row;
    padding: 2em;
  }
  .feed-details img {
    max-width: 30%;
  }
}
.feed-bio {
  font-size: 1.4em;
  padding: 0 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.feed-links {
  display: flex;
  justify-content: space-around;
}
@media (min-width: 1200px) {
  .feed-bio {
    padding: 0 0 0 3em;
  }
}

/* Episode */

div.episode {
  padding: 1.2em 0.5em;
  overflow: auto; /* needed for chrome, otherwise links would change the box layout */
}
div.episode:nth-child(even) {
  background-color: hsl(24, 5%, 13%);
}
@media (prefers-color-scheme: light) {
  div.episode:nth-child(even) {
    background-color: lightgray;
  }
}
div.episode-title {
  font-size: 2em;
}
div.episode-date {
  font-size: 1.2em;
  display: flex;
  justify-content: space-between;
}
div.episode-content {
  font-family: monospace, sans-serif;
  font-size: 1.2em;
}
div.episode-content code {
  font-size: 1.2em;
  background-color: var(--light-blue);
  color: var(--darkness);
}
