:host {
  background-color: var(--hover-bg);
  color: var(--main-invert);
  contain: strict;
  content-visibility: auto;
  contain-intrinsic-size: 100vw 90vh;
  height: 90vh;
  transition: transform 300ms ease;
  will-change: transform;
  transform: translateY(100%);
  box-sizing: border-box;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 10pt;
  z-index: 10;
  padding: 0 calc(var(--gr-rem) / 4);
}

:host(.has-content) {
  transform: translateY(calc(100% - 75px));
}

:host(.open) {
  transform: none;
}

::slotted(span[slot="title"]),
::slotted(span[slot="series"]) {
  display: block;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: 1em;
}

#media-info {
  flex: 1;
}

::slotted(span[slot="series"]) {
  font-size: 0.9em;
  color: var(--sub-title-colour);
}

:host(.open) ::slotted(span[slot="title"]),
:host(.open) ::slotted(span[slot="series"]) {
  font-size: var(--gr-grem);
  max-width: none;
  text-align: center;
}


header {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
  padding: calc(var(--gr-rem) / 2);
}

:host(.open) header {
  flex-flow: column nowrap;
  margin-top: var(--gr-rem);
}

.col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-right: 0.8rem;
  overflow: hidden;
}

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

.col:nth-child(2) {
  flex: 1;
  justify-content: space-around;
}

.status-line {
  color: var(--sub-title-colour);
  font-size: 0.9em;
}

:host(.open) .status-line {
  text-align: center;
  margin-bottom: var(--gr-rem);
}

#time-information time,
#time-information span {
  opacity: 0;
  transition: opacity 500ms ease;
}

#time-information time:not(:empty),
#time-information time:not(:empty) + span {
  opacity: 1;
}

figure {
  margin: 0;
  -moz-user-select: none;
  user-select: none;
}

figure ::slotted(img) {
  pointer-events: none;
  width: 75vw;
  height: 75vw;
  max-width: 48px;
  max-height: 48px;
  display: block;
  contain: strict;
  border-radius: 6px;
  overflow: hidden;
}

:host(.open) figure ::slotted(img) {
  max-width: 256px;
  max-height: 256px;
  margin-bottom: var(--gr-rem);
}

main {
  padding: 2rem 4rem;
}

progress-bar {
  color: var(--app-colour);
  background-color: rgba(255, 255, 255, 0.5);
  display: block;
  position: absolute;
  height: 10px;
  width: 100%;
  overflow: hidden;
  z-index: 10;
  content-visibility: hidden;
  pointer-events: none;
  opacity: 0;
}

:host(.open) progress-bar {
  position: static;
  content-visibility: auto;
  pointer-events: auto;
  opacity: 1;
  border-radius: 6px;
  transform: none;
  margin-bottom: var(--gr-rem);
}

google-cast-launcher {
  width: 24px;
  height: 24px;
  cursor: pointer;
  margin-left: 0.5rem;
  --disconnected-color: var(--sub-title-colour);
  --connected-color: var(--app-colour);
}

google-cast-launcher .cast_caf_state_d {
  fill: currentColor !important;
}

playback-toggle-button {
  height: 32px;
  cursor: pointer;
  color: var(--sub-title-colour);
}

#progress-information {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.hidden {
  display: none;
}

.box {
  width: 100%;
  height: 100%;
  contain: strict;
  display: contents;
}
