/* V.7 collection layout. Applied only by the trusted collection shell.
   Standalone viewers keep their original authorship and layout. */
#app .common-cinematic {
  display: flex;
  clear: both;
  align-items: center;
  margin: 8px 0;
}
#app .common-cinematic button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 11px;
}
#app .common-cinematic button[aria-pressed="true"] {
  background: #294e40;
  border-color: #294e40;
  color: #fff5df;
}
#app .reading-compact .common-cinematic {
  display: none;
}
html.collection-embedded .authorBanner,
html.collection-embedded #app > header,
html.collection-embedded #mediaControls {
  display: none !important;
}
html.collection-embedded #app,
html.collection-embedded #loading {
  top: 0 !important;
}
html.collection-embedded #app {
  --collection-pane-top: 60px;
}
html.collection-embedded #app #windowControls {
  top: 10px !important;
  left: 10px !important;
  width: 420px;
  max-width: calc(100% - 20px);
  z-index: 30;
}
html.collection-embedded #windowControls button,
html.collection-embedded #windowControls #panelToggle {
  min-height: 34px;
}
/* Do not override positions after the user has moved a window. */
html.collection-embedded #app #panel:not(.floating-panel),
html.collection-embedded #app #camera:not(.floating-panel),
html.collection-embedded #app #info:not(.floating-panel) {
  top: var(--collection-pane-top) !important;
}
html.collection-embedded #app #camera:not(.floating-panel) {
  max-height: calc(100% - var(--collection-pane-top) - 32px);
  overflow: auto;
}
html.collection-embedded #app #info:not(.floating-panel) {
  bottom: auto !important;
  max-height: calc(100% - var(--collection-pane-top) - 32px) !important;
}
html.collection-embedded #app #panel[hidden] ~ #plaza:not(.floating-panel),
html.collection-embedded #app #panel[hidden] ~ #timeline {
  left: 10px !important;
  right: auto !important;
  width: min(740px, calc(100% - 20px));
}
html.collection-embedded #app #panel[hidden] ~ #plaza.compact-panel:not(.floating-panel) {
  width: min(600px, calc(100% - 20px));
}
html.collection-embedded #app #plaza:not(.floating-panel),
html.collection-embedded #app #timeline {
  bottom: 28px !important;
  max-height: min(44%, 370px);
  overflow: auto;
}
html.collection-embedded #app #plaza.compact-panel {
  padding-top: 8px;
  padding-bottom: 8px;
}
html.collection-embedded #app #plaza.compact-panel .panelToolbar {
  padding-top: 2px;
  padding-bottom: 5px;
  margin-bottom: 5px;
}
html.collection-embedded #app #plaza.compact-panel .cinemaControls {
  margin: 5px 0;
}
html.collection-embedded #app #credits {
  left: 10px;
  bottom: 4px;
  max-width: calc(100% - 20px);
}
/* Retain historical-map temporal warnings; they are evidence, not branding. */
html.collection-embedded #app .modelScope {
  top: 10px !important;
  right: 10px;
  max-width: calc(100% - 460px);
}
html.collection-embedded #captureStatus {
  top: 60px !important;
  right: 10px;
}
html.collection-embedded .no-webgl {
  top: 65px !important;
  left: 10px !important;
  right: 10px !important;
  max-width: 570px;
}
/* Map dialogs use the iframe's available height without a second masthead. */
html.collection-embedded #mapDialog {
  margin: 10px auto !important;
  height: calc(100% - 20px) !important;
  max-height: calc(100% - 20px) !important;
  width: calc(100% - 20px);
}
html.collection-embedded #mapDialog[open] {
  display: flex;
  flex-direction: column;
}
html.collection-embedded #mapDialog > :not(.imageScroll) {
  flex: 0 0 auto;
}
html.collection-embedded #mapDialog .imageScroll {
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0;
}
/* Zaragoza's timeline has a different DOM. Compact only once its button exists. */
html.collection-embedded #timeline.collection-timeline-ready:not(.collection-timeline-expanded) #phaseText,
html.collection-embedded #timeline.collection-timeline-ready:not(.collection-timeline-expanded) .timelineNote {
  display: none;
}
html.collection-embedded #timeline .timelineHeader {
  gap: 10px;
}
html.collection-embedded #collectionTimelineCompact {
  flex: 0 0 auto;
  margin-left: auto;
  min-height: 32px;
  padding: 5px 9px;
  font-size: 11px;
}
html.collection-embedded #timeline.collection-timeline-ready:not(.collection-timeline-expanded) {
  padding: 9px 13px;
}
html.collection-embedded #timeline.collection-timeline-ready:not(.collection-timeline-expanded) .phaseDetail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
}
html.collection-embedded #timeline.collection-timeline-ready:not(.collection-timeline-expanded) .phaseDetail > div {
  max-width: none;
}
html.collection-embedded #timeline.collection-timeline-ready:not(.collection-timeline-expanded) .phaseDetail button {
  float: none;
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
}
@media (max-width: 900px) {
  html.collection-embedded #app .modelScope { display: none; }
  html.collection-embedded #app.map-warning-mode .modelScope,
  html.collection-embedded #app.epilogue-mode .modelScope {
    display: block;
    top: 60px !important;
    left: 10px;
    right: 10px;
    max-width: none;
    font-size: 10px;
    line-height: 1.35;
    z-index: 22;
  }
  html.collection-embedded #app.map-warning-mode,
  html.collection-embedded #app.epilogue-mode {
    --collection-pane-top: 122px;
  }
}
@media (max-width: 760px) {
  html.collection-embedded #app #panel:not(.floating-panel) {
    bottom: auto !important;
    max-height: calc(100% - var(--collection-pane-top) - 32px);
  }
  html.collection-embedded #app #plaza:not(.floating-panel),
  html.collection-embedded #app #timeline {
    left: 10px !important;
    right: auto !important;
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
    max-height: 46%;
  }
  html.collection-embedded #timeline .timelineHeader .eyebrow {
    font-size: 7px;
    letter-spacing: .5px;
  }
  html.collection-embedded #timeline .phaseDetail > div {
    min-width: 0;
  }
  html.collection-embedded #timeline .historyScrubber {
    gap: 7px;
  }
}
@media (max-height: 450px) {
  html.collection-embedded #app #plaza:not(.floating-panel),
  html.collection-embedded #app #timeline {
    max-height: calc(100% - 90px);
  }
}
