/* Native replacements and narrowly scoped static-site compatibility styles. */

#audio-player {
  display: block;
  width: 652px;
  height: 32px;
}

#audioplayerwrapper #audio-player {
  position: relative;
  top: 39px;
  border-radius: 0;
}

#audioplayerwrapper #audiotitle {
  position: relative;
  top: 10px;
}

#audioplayerwrapper #audio-player::-webkit-media-controls-enclosure {
  border-radius: 0;
}

.audio-player-status {
  box-sizing: border-box;
  width: 652px;
  margin: 4px 0 0;
  padding: 3px 8px;
  background: #2a2020;
  color: #f0ebdc;
  font-size: 12px;
  text-align: left;
}

#playerholder.has-audio-error {
  height: auto;
}

#audioplayerwrapper .audio-player-status {
  margin-top: 42px;
}

.audio-player-status[hidden] {
  display: none;
}

.audio-player-status a {
  color: #b9d344;
  font-weight: bold;
}

#imagesfeature {
  overflow: hidden;
}

#imagesfeature img {
  display: block;
  opacity: 1;
  transition: opacity 500ms ease-in-out;
}

#imagesfeature img.is-fading {
  opacity: 0;
}

#timeline {
  position: relative;
  box-sizing: border-box;
  width: 916px;
  height: 350px;
  border: 1px solid #5a5a5a;
  border-radius: 12px;
  padding: 8px 8px 0;
  overflow: hidden;
  background: #252525;
  color: #f0ebdc;
  font-family: Arial, Helvetica, sans-serif;
  box-shadow: inset 0 0 0 7px #303030;
}

.native-timeline__fallback {
  box-sizing: border-box;
  height: 332px;
  margin: 0;
  padding: 20px 30px 20px 48px;
  overflow: auto;
}

.native-timeline__fallback li {
  margin-bottom: 10px;
}

.native-timeline__fallback a {
  display: block;
  color: #b9d344;
  text-decoration: none;
}

.native-timeline__fallback strong {
  color: #f0ebdc;
}

.native-timeline {
  position: relative;
  width: 898px;
  height: 341px;
}

.native-timeline__masthead {
  width: 916px;
  height: 45px;
  margin-left: -9px;
  background: #090909 url("/assets/timeline/interface/timeline-title.jpg") center top no-repeat;
}

.native-timeline__viewport {
  position: relative;
  width: 896px;
  height: 246px;
  margin: 0 auto;
  overflow: hidden;
  background: #293738;
  cursor: grab;
  touch-action: none;
}

.native-timeline__viewport.is-dragging {
  cursor: grabbing;
}

.native-timeline__track {
  display: flex;
  height: 246px;
  transform: translate3d(0, 0, 0);
  transition: transform 650ms cubic-bezier(.19, 1, .22, 1);
  will-change: transform;
}

.native-timeline.is-moving .native-timeline__track {
  transition: none;
}

.native-timeline__period {
  position: relative;
  flex: 0 0 896px;
  width: 896px;
  height: 246px;
  overflow: hidden;
  background-position: center top;
  background-repeat: no-repeat;
}

.native-timeline__period-title {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 15px;
  box-sizing: border-box;
  width: 160px;
  height: 39px;
  margin: 0;
  border-top: 1px solid rgba(238, 238, 230, .65);
  border-bottom: 1px solid rgba(238, 238, 230, .65);
  color: rgba(238, 238, 230, .7);
  font: normal 18px/39px Georgia, "Times New Roman", serif;
  text-align: center;
  text-shadow: 0 1px 1px #253031;
}

.native-timeline__period-title::before,
.native-timeline__period-title::after {
  position: absolute;
  left: 68px;
  width: 24px;
  height: 9px;
  background: url("/assets/timeline/interface/divider.png") center no-repeat;
  content: "";
}

.native-timeline__period-title::before { top: -5px; }
.native-timeline__period-title::after { bottom: -5px; }

.native-timeline__axis {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 23px;
  border-bottom: 1px solid rgba(245, 245, 238, .8);
  color: rgba(245, 245, 238, .55);
  pointer-events: none;
}

.native-timeline__tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 7px;
  background: rgba(245, 245, 238, .55);
}

.native-timeline__year {
  position: absolute;
  bottom: 3px;
  font: 12px/1 Georgia, "Times New Roman", serif;
  transform: translateX(3px);
}

.native-timeline__marker {
  position: absolute;
  z-index: 3;
  width: 0;
  height: 0;
}

.native-timeline__marker:hover,
.native-timeline__marker:focus-within { z-index: 30; }

.native-timeline__marker-button {
  position: absolute;
  left: -10px;
  bottom: -7px;
  box-sizing: border-box;
  width: 20px;
  height: 14px;
  border: 0;
  border-radius: 1px;
  padding: 0;
  background: #f6f6f1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}

.native-timeline__marker-button::before {
  position: absolute;
  top: -3px;
  left: 4px;
  width: 7px;
  height: 4px;
  border-radius: 1px 1px 0 0;
  background: #f6f6f1;
  content: "";
}

.native-timeline__marker-button::after {
  position: absolute;
  top: 4px;
  left: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #566161;
  content: "";
}

.native-timeline__marker-button:focus-visible {
  outline: 2px solid #d4e55b;
  outline-offset: 3px;
}

.native-timeline__preview {
  position: absolute;
  bottom: 11px;
  left: -79px;
  display: block;
  width: 460px;
  height: 113px;
  opacity: 0;
  pointer-events: none;
  transform: scale(.12);
  transform-origin: 79px 100%;
  transition: opacity 180ms ease-out, transform 330ms cubic-bezier(.19, 1, .22, 1);
  visibility: hidden;
}

.native-timeline__marker:hover .native-timeline__preview,
.native-timeline__marker:focus-within .native-timeline__preview {
  opacity: 1;
  transform: scale(1);
  visibility: visible;
}

.native-timeline__preview img {
  display: block;
  width: 158px;
  height: 113px;
  opacity: .82;
  object-fit: cover;
  box-shadow: 0 0 9px rgba(236, 242, 235, .55);
}

.native-timeline__caption {
  position: absolute;
  top: 4px;
  left: 174px;
  width: 270px;
  color: rgba(255, 255, 255, .88);
  font: 13px/1.35 Arial, Helvetica, sans-serif;
  text-align: left;
  text-shadow: 0 1px 2px #1a2020;
}

.native-timeline__navigator {
  position: relative;
  width: 860px;
  height: 26px;
  margin: 7px auto 0;
  border: 1px solid #85785d;
  border-radius: 6px;
  overflow: visible;
  background: #202020;
  touch-action: none;
}

.native-timeline__palette {
  position: absolute;
  inset: 1px;
  border-radius: 4px;
  background: url("/assets/timeline/interface/period-colours.jpg") center / 100% 24px no-repeat;
}

.native-timeline__handle {
  position: absolute;
  z-index: 2;
  top: -2px;
  left: 0;
  box-sizing: border-box;
  width: calc(100% / 7);
  height: 28px;
  border: 2px solid rgba(226, 234, 232, .82);
  background: rgba(69, 88, 87, .14);
  cursor: ew-resize;
  touch-action: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, .7);
}

.native-timeline__handle:focus-visible {
  outline: 2px solid #d4e55b;
  outline-offset: 2px;
}

.native-timeline__status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.timeline-lightbox {
  box-sizing: border-box;
  max-width: min(860px, 92vw);
  max-height: 90vh;
  margin: auto;
  border: 8px solid #2b2b2b;
  border-radius: 4px;
  padding: 0;
  overflow: visible;
  background: #171717;
  color: #f0ebdc;
  box-shadow: 0 4px 30px rgba(0, 0, 0, .75);
}

.timeline-lightbox::backdrop { background: rgba(0, 0, 0, .82); }

.timeline-lightbox__close {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  border: 1px solid #777;
  padding: 4px 9px;
  background: rgba(43, 43, 43, .92);
  color: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .65);
  cursor: pointer;
}

.timeline-lightbox figure { margin: 0; }

.timeline-lightbox img {
  display: block;
  max-width: calc(92vw - 16px);
  max-height: calc(82vh - 60px);
  margin: 0 auto;
  object-fit: contain;
}

.timeline-lightbox figcaption {
  box-sizing: border-box;
  min-height: 34px;
  padding: 8px 10px;
  background: #171717;
  font: 13px/1.35 Arial, Helvetica, sans-serif;
}

.timeline-lightbox figcaption strong { color: #b9d344; }

@media (prefers-reduced-motion: reduce) {
  .native-timeline__track,
  .native-timeline__preview { transition: none; }
}

.heritage-video-dialog {
  box-sizing: border-box;
  width: 450px;
  height: 492px;
  margin: auto;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #2a2020;
  color: #f0ebdc;
}

.heritage-video-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.heritage-video-dialog__close {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 8px;
  border: 1px solid #f0ebdc;
  background: #2a2020;
  color: #f0ebdc;
  cursor: pointer;
}

.heritage-video-dialog video {
  display: block;
  width: 450px;
  height: 338px;
  background: #000;
}

.heritage-video-dialog__playlist {
  box-sizing: border-box;
  height: 154px;
  margin: 0;
  padding: 8px 12px;
  list-style: none;
  overflow: auto;
}

.heritage-video-dialog__playlist button {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #574d4d;
  padding: 5px 4px;
  background: transparent;
  color: #f0ebdc;
  cursor: pointer;
  text-align: left;
  font: 12px Arial, Helvetica, sans-serif;
}

.heritage-video-dialog__playlist button[aria-current="true"] {
  color: #b9d344;
  font-weight: bold;
}

.static-search #search-results {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.static-search #search-results li {
  margin: 0 0 18px;
}

.static-search #search-results h3,
.static-search #search-results p {
  margin: 0 0 4px;
}
