/* B7 keeps the R4 photography surface intact while replacing its review header
   with the selected site-wide navigation. */
html {
  scroll-padding-top: 88px;
}

body[data-b7-module="photography"] main {
  padding-top: 88px;
}

body[data-b7-module="photography"] .quiet-intro {
  min-height: 38svh;
}

body[data-b7-module="photography"] .b0-shell-wordmark {
  display: none;
}

@media (max-width: 820px) {
  html {
    scroll-padding-top: 68px;
  }

  body[data-b7-module="photography"] main {
    padding-top: 64px;
  }
}

/* The existing ten rolls have metadata only; no roll photographs are added. */
body[data-b7-module="photography"] .quiet-roll-note {
  max-width: 62ch;
  margin: 18px 0 0;
  color: var(--quiet-muted);
  font-size: 12px;
  line-height: 1.7;
}

/* Keep the exit in view even when a short window makes the lightbox scroll. */
html.quiet-photo-open {
  overflow: hidden;
}

body[data-b7-module="photography"] .quiet-lightbox {
  overscroll-behavior: contain;
}

/* Keep the whole frame between the exit bar and caption on short screens. */
body[data-b7-module="photography"] [data-photo-image] {
  height: min(72svh, 760px, max(0px, calc(100svh - 144px)));
}

body[data-b7-module="photography"] .quiet-lightbox > header {
  position: sticky;
  top: 0;
  z-index: 1;
  gap: 16px;
  background: var(--quiet-ink);
  border-bottom: 1px solid var(--quiet-line);
}

body[data-b7-module="photography"] .quiet-lightbox > header p {
  min-width: 0;
  align-items: center;
  gap: 12px;
}

body[data-b7-module="photography"] [data-photo-position] {
  flex: 0 0 auto;
}

body[data-b7-module="photography"] [data-photo-title] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-b7-module="photography"] [data-photo-close] {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 44px;
  height: 44px;
  margin-block: 7px;
  padding: 0 12px;
  border: 1px solid #555854;
  background: transparent;
  color: var(--quiet-paper);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

body[data-b7-module="photography"] [data-photo-close] [aria-hidden] {
  font-size: 20px;
  line-height: 1;
}

body[data-b7-module="photography"] [data-photo-close]:hover,
body[data-b7-module="photography"] [data-photo-close]:focus-visible {
  border-color: var(--quiet-paper);
  background: #1a1c1a;
}

/* F105: the gallery itself needs a return path, in addition to the lightbox exit. */
body[data-b7-module="photography"] .quiet-return {
  position: sticky;
  top: 80px;
  z-index: 20;
  width: var(--quiet-width);
  margin-inline: auto;
  padding-block: 4px;
  background: var(--quiet-ink);
}

body[data-b7-module="photography"] .quiet-return a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--quiet-paper);
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
}

body[data-b7-module="photography"] .quiet-return a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

@media (max-width: 820px) {
  body[data-b7-module="photography"] .quiet-return { top: 68px; }
}
