/* Only audited photographs receive this control; logos, maps and panels keep their links. */
a.rustler-photo-link { display: block; position: relative; color: inherit; cursor: zoom-in; }
a.rustler-photo-link:focus-visible { outline: 3px solid #b78645; outline-offset: 4px; }
dialog.rustler-photo-viewer {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
           max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  overflow: hidden;
  background: #0b1018;
  color: #fff;
}
dialog.rustler-photo-viewer[open] {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
dialog.rustler-photo-viewer::backdrop { background: #0b1018; }
.rustler-photo-viewer-toolbar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; flex: none; }
.rustler-photo-viewer-toolbar a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: #fff; font: 600 14px/1.2 system-ui, sans-serif; }
.rustler-photo-viewer-toolbar a[hidden] { display: none; }
.rustler-photo-viewer-toolbar a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.rustler-photo-viewer-close {
  min-width: 88px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #a7b1bc;
  border-radius: 5px;
  background: #192330;
  color: #fff;
  font: 600 16px/1.25 system-ui, sans-serif;
  cursor: pointer;
}
.rustler-photo-viewer-close:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.rustler-photo-viewer > figure {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  margin: 0;
  gap: 10px;
}
.rustler-photo-viewer-stage { flex: 1; min-height: 0; min-width: 0; }
.rustler-photo-viewer-stage img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
}
.rustler-photo-viewer figcaption {
  flex: none;
  max-height: 25vh;
  overflow: auto;
  margin: 0;
  color: #fff;
  text-align: center;
  font: 15px/1.4 system-ui, sans-serif;
}
.rustler-photo-viewer figcaption a { color: #fff; }
.rustler-photo-viewer figcaption > strong, .rustler-photo-viewer figcaption > span { display: block; }
.rustler-photo-viewer figcaption .photo-credit {
  display: block;
  position: static;
  margin: 2px 0 0;
  padding: 0;
  max-width: none;
  background: transparent;
  color: #d4dce5;
  font: inherit;
}
@media (max-height: 480px) {
  dialog.rustler-photo-viewer[open] { gap: 4px; }
  .rustler-photo-viewer > figure { gap: 4px; }
  .rustler-photo-viewer figcaption { font-size: 12px; line-height: 1.2; }
}
@media print {
  dialog.rustler-photo-viewer, a.rustler-photo-link::after { display: none !important; }
}

/* Keep the requested Around Russell photo available on phones and tablets. */
@media (max-width: 1199px) {
  body.frontpage-opening main.frontpage #council-news .around-russell-tablet {
    display: block;
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
  }
  body.frontpage-opening main.frontpage #council-news .around-russell-tablet img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  body.frontpage-opening main.frontpage #council-news .around-russell-tablet figcaption {
    margin-top: 8px;
    font-size: .95rem;
    line-height: 1.35;
  }
  body.frontpage-opening main.frontpage #council-news .around-russell-tablet .photo-credit {
    display: block;
    margin-top: 4px;
  }
}
