@charset "UTF-8";
:root {
  --primary-color: blue;
  --secondary-color: white;
  --tertiary-color: red;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: Verdana, sans-serif;
}

*:focus {
  outline: 3px dotted var(--tertiary-color);
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

a,
select,
button,
input,
p,
label {
  font-size: 1.5rem;
  line-height: 1.5;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
  height: 1.5rem;
  border: 0;
  padding: 0;
  color: red;
  display: block;
  position: relative;
  mix-blend-mode: lighten;
}

input[type=range]::-moz-range-track {
  width: 100%;
  height: 100%;
  cursor: pointer;
  transition: 0.2s;
  background: transparent;
}

input[type=range]::-moz-range-progress {
  background: red;
  height: 100%;
}

input[type=range]::-webkit-slider-runnable-track {
  color: red;
  background: linear-gradient(to right, currentColor var(--value, 0), transparent var(--value, 0));
  content: "";
  height: 1.5rem;
  pointer-events: none;
}

input[type=range]::-moz-range-thumb {
  box-shadow: none;
  border: 0;
  height: 1.5rem;
  width: 0;
  border-radius: 0;
  background: red;
  cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
  box-shadow: none;
  border: 0;
  height: 1.5rem;
  width: 0;
  border-radius: 0;
  background: red;
  cursor: pointer;
  -webkit-appearance: none;
}

input[type=checkbox] {
  visibility: hidden;
}

input[type=checkbox] + label:before {
  content: "";
  display: flex;
  justify-content: center;
  align-items: center;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--primary-color);
  border: 0.1rem solid var(--secondary-color);
  font-size: 0.75rem;
  color: var(--secondary-color);
  position: absolute;
  box-shadow: inset 0 0 0.1rem rgba(0, 0, 0, 0.8);
  left: 0;
  top: 0.625rem;
  border-radius: 0.1875rem;
}

input[type=checkbox]:hover + label:before,
input[type=checkbox]:checked + label:before {
  content: "✔";
}

input[type=checkbox]:hover + label:before {
  color: rgba(255, 255, 255, 0.5);
}

input[type=checkbox]:active + label:before {
  background: rgba(255, 255, 255, 0.3);
}

label.btn,
button,
input,
select {
  display: inline-block;
  background: var(--primary-color);
  color: var(--secondary-color);
  border: 0.125rem solid var(--secondary-color);
  border-radius: 0.1875rem;
  padding: 0.2rem 0.5rem;
}

label + button {
  margin: 0.5rem 0 0;
}

main button {
  border-color: var(--primary-color);
}

select:hover,
select:focus,
label.btn:hover,
label.btn:focus,
button:hover,
button:focus {
  background: var(--secondary-color);
  color: #000;
}

.invisible,
[type=file] {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  white-space: nowrap;
  width: 1px;
}

h1,
h2,
p {
  margin-bottom: 1rem;
}

a {
  padding-bottom: 0.125rem;
  text-decoration: underline;
  text-underline-offset: 0.6rem;
  text-decoration-thickness: 0.2rem;
  line-height: 1.8;
}

a:visited {
  color: var(--primary-color);
}

a.active,
a:hover,
a:focus,
a:visited:hover,
a:visited:focus {
  color: var(--tertiary-color);
}

main ul > li > a {
  font-weight: bold;
  hyphens: auto;
}

ul {
  padding: 0;
  list-style: none;
  line-height: 1.5;
}

.show-mobile {
  display: none;
}

.dialog {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 1000;
  background: var(--primary-color);
  transform: translate3d(0, 100%, 0);
  transition: transform 0.3s;
}

.dialog header {
  padding: 1rem;
  height: 4rem;
  color: var(--secondary-color);
  background: var(--primary-color);
}

.dialog section {
  background: var(--secondary-color);
  padding: 1rem;
  height: calc(100vh - 8rem);
  overflow-y: scroll;
  border-top: 0.125rem solid var(--secondary-color);
  border-bottom: 0.125rem solid var(--secondary-color);
}

.dialog section input {
  border-color: var(--primary-color);
  background: var(--secondary-color);
  color: #000;
}

.dialog section button,
.dialog section label.btn {
  border-color: var(--primary-color);
}

.dialog footer {
  padding: 0.5rem 1rem;
  height: 4rem;
  display: flex;
  flex-direction: row-reverse;
  align-content: center;
  align-items: center;
  justify-content: left;
  background: var(--primary-color);
}

.dialog footer button {
  margin-right: 0.5rem;
}

.show.dialog,
.toast.dialog {
  transform: translate3d(0, 0, 0);
}

#add.dialog input {
  max-width: 20rem;
  width: 100%;
}

.toast.dialog {
  background: rgba(255, 255, 255, 0.7);
}

.toast .inner {
  background: var(--primary-color);
  max-width: 64rem;
  width: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
}

.toast .inner section {
  height: auto;
}

body > header {
  height: 4rem;
  display: flex;
  justify-content: left;
  align-items: center;
  padding: 1rem;
  background: var(--primary-color);
  border-bottom: 0.125rem solid var(--secondary-color);
}

nav {
  display: flex;
}

nav ol {
  display: flex;
  list-style: none;
}

nav ol.search {
  flex-grow: 1;
}

nav ol.search input {
  width: 100%;
}

nav > ol > li {
  position: relative;
  margin-right: 0.5rem;
}

nav ol > li > ol {
  position: absolute;
  z-index: 99;
  min-width: 12.5rem;
  flex-direction: column;
  background: var(--primary-color);
  padding-top: 0.5rem;
  box-sizing: border-box;
  width: calc(100% + 1rem);
  transform: translate3d(-0.5rem, 0, 0);
  border-bottom: 0.125rem solid var(--secondary-color);
}

nav ol > li > ol > li {
  padding: 0 0.5rem 0.5rem;
  border-left: 0.125rem solid var(--secondary-color);
  border-right: 0.125rem solid var(--secondary-color);
}

nav ol button[aria-expanded=false] + ol {
  display: none;
}

nav ol button[aria-expanded=true] + ol {
  display: flex !important;
}

nav ol > li > ol button {
  width: 100%;
}

nav ol li:hover ol {
  display: block;
  z-index: 100;
}

main {
  display: flex;
  height: calc(100% - 4rem);
  overflow: hidden;
  transition: height 0.3s;
  border-bottom: 0.125rem solid var(--secondary-color);
}

body.playerloaded main {
  height: calc(100% - 13rem);
}

main ul,
main > div {
  overflow-y: scroll;
  height: 100%;
  width: 100%;
  padding: 1rem 1rem 0 1rem;
}

main ul > li {
  padding: 0 0 1.5rem 0;
}

main time {
  display: block;
  font-size: 0.875rem;
  margin-top: 1rem;
}

main span.description {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
  hyphens: auto;
}

main span.description.show {
  white-space: normal;
}

#podcasts li.hide,
#episodes li.hide {
  display: none;
}

audio {
  display: none;
}

#player {
  background: var(--primary-color);
  color: var(--secondary-color);
  width: 100%;
  height: 0;
  transition: height 0.3s;
}

#player .inner {
  padding: 0;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

body.playerloaded #player {
  height: 9rem;
}

#player .ctrls {
  display: flex;
  order: 2;
  padding: 0.5rem 0 0.5rem 1rem;
}

#player .ctrls #playpause {
  order: 2;
}

#player .ctrls #rewind {
  order: 1;
}

#player .ctrls #forward {
  order: 3;
}

#player button {
  margin-right: 0.5rem;
}

.speed {
  order: 3;
  padding: 0 0.5rem 0 0;
}

#player-infos {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem 0;
  order: 1;
  line-height: 1.5;
}

#player-infos span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
  hyphens: auto;
}

#player-infos .trackinfos {
  width: 100%;
}

#player-infos > div.wrapper {
  max-width: 80%;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 1.5rem;
}

#player-infos.scrolling > div.wrapper::before {
  content: "";
  display: block;
  background: linear-gradient(90deg, blue 0%, rgba(0, 0, 255, 0) 100%);
  width: 1rem;
  height: 1.5rem;
  z-index: 1;
  position: absolute;
}

#player-infos.scrolling > div.wrapper::after {
  content: "";
  display: block;
  background: linear-gradient(270deg, blue 0%, rgba(0, 0, 255, 0) 100%);
  width: 1rem;
  height: 1.5rem;
  z-index: 1;
  position: absolute;
  right: 0;
}

#player-infos.scrolling div.trackinfos {
  position: absolute;
}

#player-infos .trackinfos .copy {
  display: none;
}

#player-infos.scrolling .trackinfos .copy {
  position: absolute;
  display: inline;
}

#player-infos.scrolling .trackinfos .copy .artist {
  font-weight: bold;
}

.dialog .podcasts {
  padding: 0 1rem;
  overflow-y: scroll;
}

.podcasts ul {
  padding: 1rem 0 0 0;
}

.podcasts li {
  position: relative;
  display: flex;
  align-items: flex-start;
  align-content: flex-start;
  padding-bottom: 1.5rem;
}

.podcasts input {
  margin-right: 1rem;
  margin-top: 0.625rem;
  max-width: 1.25rem;
  height: 1.25rem;
  width: 100%;
}

.podcasts label {
  font-weight: bold;
}

.podcasts small {
  font-size: 0.875rem;
  display: block;
}

progress {
  width: 100%;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: var(--primary-color);
  height: 1.5rem;
}

.progress {
  position: relative;
  width: 100%;
}

.progress::before,
.progress::after {
  position: absolute;
  top: 0;
  height: 1.5rem;
  display: flex;
  align-items: center;
}

.progress::before {
  left: 1rem;
  content: attr(data-time-current);
}

.progress::after {
  right: 1rem;
  content: attr(data-time-left);
}

progress::-webkit-progress-bar {
  background: var(--primary-color);
}

progress::-webkit-progress-value {
  background: var(--tertiary-color);
}

progress::-moz-progress-bar {
  background: var(--tertiary-color);
}

@media screen and (-ms-high-contrast: active) {
  progress::-webkit-progress-value {
    background: var(--secondary-color);
  }

  progress::-moz-progress-bar {
    background: var(--secondary-color);
  }
}
#player-infos .artist {
  font-weight: bold;
}

footer #player-ctrls audio {
  width: 100%;
  margin-bottom: 1rem;
}

footer #player-ctrls .ctrls {
  width: 100%;
}

#loading {
  animation-duration: 3s;
  animation-name: pulse;
  animation-iteration-count: infinite;
  position: absolute;
  z-index: 999;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--secondary-color);
}

@media (max-width: 48rem) {
  header {
    order: 1;
  }

  main {
    flex-direction: column;
    order: 1;
  }

  #player {
    order: 3;
  }

  #player label {
    display: none;
  }

  main ul {
    width: 100%;
  }

  #episodes {
    position: absolute;
    height: 100%;
    background: var(--secondary-color);
  }

  body.playerloaded #episodes {
    height: calc(100% - 13.2rem);
  }

  .dialog > div {
    width: 100%;
  }

  .show-mobile {
    display: block;
  }

  #menu {
    background: var(--primary-color);
    position: fixed;
    top: 0;
    left: -100%;
    transform: translate3d(-100%, 0, 0);
    bottom: 0;
    padding: 2rem;
    width: 100%;
    height: 100%;
    z-index: 999;
    transition: transform 0.3s;
  }

  #menu button {
    width: 100%;
    margin-bottom: 1rem;
  }

  #menu.show {
    display: block;
    left: 0;
    transform: translate3d(0, 0, 0);
    overflow-y: scroll;
  }

  nav ol > li {
    border: none !important;
  }

  nav ol ol > li:first-child {
    padding-top: 0.5rem;
  }

  nav ol > li > ol {
    position: static;
    padding-bottom: 0;
    margin-bottom: 1rem;
    border: 0.125rem solid var(--secondary-color);
    border-radius: 0.1875rem;
  }

  nav ol li:hover ol {
    display: none;
  }

  nav ol > li > ol > li {
    padding: 0 1rem;
  }
}
@media (max-width: 23.75rem) {
  #player .ctrls {
    width: 100%;
    padding: 0.5rem;
    justify-content: space-between;
  }

  #player .ctrls #forward {
    margin-right: 0;
  }

  #player .ctrls #playpause {
    flex-grow: 1;
  }

  .speed {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  main,
#player,
#menu,
.dialog {
    transition: none;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #000040;
    --secondary-color: #f2f3f4;
    --tertiary-color: #FF3366;
  }

  ul#podcasts,
ul#episodes,
.dialog section,
main {
    color: var(--secondary-color);
    background: var(--primary-color);
    scrollbar-color: dark;
  }

  .dialog section button,
.dialog section label.btn {
    border-color: var(--secondary-color);
  }

  a,
a:visited {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
  }
}