/* typo */
@font-face {
  font-family: 'Overpass';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/static/overpass.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Overpass Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/overpass-mono.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html, button, input, select, textarea {
    font-family: 'Overpass Mono', monospace;
}

h1, h2, h3, h4 {
    font-family: 'Overpass', sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

/* layout */
body {
    background: #edf;
    margin: 0;
    padding: 0;
}

header, main, footer, figcaption {
    max-width: 130ch;
    margin: 0 auto;
    box-sizing: border-box;
}

main {
    display: flex;
    flex-direction: column;
    gap: 3em;
    min-height: calc(100vh - 10em); /* so footer is at the bottom */
}

article {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    row-gap: 1em;
}

article div { 			/* image container */
    flex-grow: 1;
    flex-basis: 35%;
    min-width: 350px;
    position: relative;
}
article div img {
    display: block;
    width: 100%;
}
article div span.runtime {
    background: rgb(0 0 0 / 0.6);
    color: white;
    position: absolute;
    padding: 3px;
    bottom: 0.5em;
    right: 0.5em;
}


article aside {			/* meta container */
    box-sizing: border-box;
    flex-basis: 60%;
    flex-grow: 1;
    margin-top: 0;
    padding: 0 1em;
    font-size: 90%;
}
article aside h2 {
    margin: 0;
}

ul.video-tags {                 /* tags */
    padding: 0;
    margin: 0;
}
ul.video-tags li {
    display: inline-block;
    font-size: 0.8em;
    background: rgb(0 0 0 / 0.4);
    color: white;
    padding: 3px 8px;
    margin-right: 1em;
    border-radius: 0.8em;
}


/* player */

figure {
    margin: 0;
}

media-controller {
    width: 100%;
    max-height: calc(100vh - 18em);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

cnschn-video {
    flex-shrink: 1;
    min-height: 0;
    width: 100%;
}

/* Hide elements that are not available */
media-cast-button[mediacastunavailable] {
  display: none;
}

figcaption {
    font-size: 90%;
    padding: 0 1em;
}

figcaption h1 {
    margin-bottom: 0;
}


/* header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header img {
    height: 3em;
    padding: 1em;
    animation: jelly 2s ease-in-out infinite;
}
@keyframes jelly {
  0%, 100% {
    transform: translateY(0.1em);
  }
  50% {
      transform: translateY(0);
  }
}

header a {
    font-family: 'Overpass', sans-serif;
    font-size: 1.8rem;
    padding: 0 0.4em;
}

/* responsive header sizes */
@media (min-width: 450px) {
    header a {
	font-size: 2.5rem;
    }
    header img {
	height: 5em;
    }
}

/* footer */
footer p {
    text-align: right;
    font-size: 0.7em;
}

footer a {
    color: inherit;
}
