.ack {
  position: fixed;
  height: 100%;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 6;
  opacity: 1;
  transition: height 1000ms;
  cursor: pointer;
  /* Dark until the video loads, so the white text is readable without it */
  background: #000;
  color: #fff;
  overflow: hidden;
}

.ack.inactive {
  height: 0;
  pointer-events: none;
}

/* Leave the sidebar strip visible and usable */
.ack.ack--beside_sidebar {
  left: 7rem;
}

@media (max-width: 768px) {
  .ack.ack--beside_sidebar {
    left: 2.667rem;
  }
}

.ack button {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.ack button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.ack.ack--quiet_focus button:focus-visible {
  outline: none;
}

.ack .ack_description {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}


.ack .ack_inner {
  position: absolute;
  bottom: 0;
  height: 100%;
  box-sizing: border-box; 
  width: 100%;
  left: 0;
  text-align: left;
  pointer-events: none;
}

.ack .close_button {
  cursor: pointer;
  margin-left: auto;
}

.ack .close_button:hover {
  opacity: 0.8;
}

.ack .close_button:after {
    display: inline-block;
    width: 0.58em;
    height: 0.58em;
    content: " ";
    margin-left: 0.2rem;
    background: url(./images/navigate_right.svg) 50%/contain no-repeat;
}

.ack .lines {
  position: absolute;
  top: 0;
  left: 0;
  padding: 2rem;
}

.ack .line {
  opacity: 0;
  transition: opacity 1000ms;
}

.ack .lines.active .line {
  opacity: 1;
}

.ack .ack_language {
}


.ack .mobile {
  display: none;
}

@media (min-width: 450px) and (max-width: 768px) {
  .ack .mobile {
    font-size: 24px;
  }
}

.ack .tablet {
  display: none;
}

@media (max-width: 1023px) {
  .ack .tablet {
    display: block;
  }
  .ack .desktop {
    display: none;
  }
}

@media (max-width: 768px) {
  .ack .mobile {
    display: block;
  }
  .ack .tablet {
    display: none;
  }
}

.ack .ack_video {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1000ms;
}

.ack .ack_video.loaded {
  opacity: 1;
}

/*
 * audio and video buttons
 */
/* Audio, video and Continue buttons sit on one text baseline */
.ack .ack_controls {
  position: absolute;
  left: 2rem;
  right: 2rem;
  /* Puts the text baseline level with the top line of the hamburger */
  bottom: calc(2rem + 7.4px);
  /* No z-index: it would isolate the audio gif's blend from the video */
  display: flex;
  align-items: flex-end;
  align-items: last baseline;
  gap: 2rem;
}

.ack .ack_media_controls {
  display: flex;
  align-items: flex-end;
  align-items: last baseline;
  gap: 4rem;
}

/* Larger type above 2560px (fonts.css) */
@media (min-width: 2561px) {
  .ack .ack_controls {
    bottom: calc(2rem + 5px);
  }
}

/* The hamburger scales down at these widths (controller.css) */
@media (max-width: 1260px) {
  .ack .ack_controls {
    bottom: calc(2rem + 6.6px);
  }
}

/* No room for all three in a row: stack audio and video, and Continue lines
 * up with the bottom one */
@media (max-width: 768px) {
  .ack .ack_controls {
    bottom: calc(2rem + 3.7px);
  }
  .ack .ack_media_controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

.ack .audio_button {
  opacity: 0.655;
  mix-blend-mode: screen;
}

.ack .audio_button:hover {
  opacity: 0.8;
}

.ack .audio_button.active {
  opacity: 1;
}

.ack .audio_button_gif {
  display: block;
  opacity: 0.655;
  /* About three quarters of a line of the label's text between the tallest
   * bars and its capitals */
  margin-bottom: 0.55em;
}

.ack .audio_button_text {
  display: block;
}

.ack .video_button {
  opacity: 0.655;
}

.ack .video_button:hover {
  opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
  .ack,
  .ack .ack_video,
  .ack .line {
    transition: none !important;
  }
}

/* main gets focus when the acknowledgement closes; it isn't a control */
main[tabindex="-1"]:focus {
  outline: none;
}
