/* prevent background page from scrolling when a lightroom is open */
html.no-scroll,
body.no-scroll {
  overflow: hidden;
  height: 100%;
}

body {
  background: #fff;
  color: #2d3748;
  font-family: 'Open Sans', sans-serif;
}

body.dark {
  background: #1a1a1a;
  color: #f7fafc;
}

header,
nav {
  background: #fff;
  z-index: 900;
  /* higher than cards */
}

.dark header,
.dark nav {
  background: #1a1a1a;
}

#menu {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: 100%;
}

@media only screen and (min-width: 768px) {
  #menu {
    display: block;
    position: unset;
    height: unset;
  }
}

#menu:target {
  display: block;
}

/* position the close button */
#lr-close-area {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 1002;
  pointer-events: none;
}

#lr-close-area button {
  pointer-events: auto;
}

@media (pointer: coarse) {

  /* allow native pinch/scroll */
  .lightroom img {
    touch-action: auto;
  }

  /* ensure zoom UI hidden on touch */
  #lr-ui .zoom-controls {
    display: none;
  }

}


/* UI container */
#lr-ui {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* buttons re-enable their own pointer-events */
  pointer-events: none;
  /* above .lightroom */
  z-index: 1001;
}

/* If you prefer CSS (instead of inline styles) on buttons, uncomment:
#lr-ui button {
  pointer-events: auto;
  font-size: 14px;
  padding: 8px 10px;
  margin: 8px;
  background: rgba(0,0,0,.5);
  color: #fff;
  border: none;
  border-radius: 6px;
}
*/

/* Prevent accidental selection during navigation/zoom */
#lr-ui,
.lightroom img {
  user-select: none;
}

@media only screen and (max-width: 767px) {

  .lightroom img,
  .lightroom div {
    width: 90%;
  }
}


@supports (position: fixed) {
  @media only screen and (max-width: 767px) {
    #menu {
      position: fixed;
    }
  }

  .lightroom {
    position: fixed;
  }
}

.image-card {
  max-width: 24rem;
  margin: .5rem;
  /* always have padding at the end; paragraphs will put padding above if needed */
  padding: 0rem 0rem 1rem;
  overflow: hidden;
  border: 1px solid #cbd5e0;
  /* gray-400 */
  border-bottom-left-radius: .375rem;
  border-bottom-right-radius: .375rem;
  transition: box-shadow .15s ease;
}

@media (min-width: 768px) {
  .image-card {
    max-width: 28rem;
  }
}

.image-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, .25);
}

/* .image-card:hover a,
.image-card:hover .card__title {
  text-decoration: underline;
} */

.image-card img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 768px) {
  .image-card img {
    object-fit: cover;
    width: 450px;
    height: 350px;
    cursor: zoom-in;
  }
}

.image-card p {
  display: block;
  padding: 1rem 1.5rem 0rem;
  text-align: center;
  margin: 0;
  font-weight: normal;
  font-size: 1rem;
  line-height: 1.2;
}

/* less padding between paragraphs */
.image-card p+p {
  padding: 0.3rem 1.5rem 0rem;
}

.image-card p.title {
  font-weight: bold;
  font-size: 1.2rem;
}

.image-card p.instr {
  font-size: 0.8rem;
  font-style: italic;
}


.image-card a.media-link {
  position: relative;
  display: block;
}

.image-card a.media-link[data-kind="pdf"]::after,
.image-card a.media-link[data-kind="video"]::after {
  position: absolute;
  right: .5rem;
  bottom: .5rem;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  padding: .2rem .4rem;
  border-radius: .25rem;
  font-size: .75rem;
  line-height: 1;
  pointer-events: none;
  content: attr(data-kind);
}

.image-card a.media-link[data-kind="video"]::after {
  content: "▶";
}

.image-card a.media-link[data-kind="pdf"]::after {
  content: "PDF";
}

/* .image-card.lightroom,
.image-card.lightroom img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  background: #fff;
  color: #2d3748;
} */

.image-card img {
  cursor: zoom-in;
}

.image-card.lightroom {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: none;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow: auto;
  /* always use white text since the background is dark */
  color: #fff;
  /* smooth iOS scrolling */
  -webkit-overflow-scrolling: touch;
  /* no scroll chaining to page */
  overscroll-behavior: contain;
}

/* multi-photo sets align at the top, not centered vertically */
.image-card.lightroom.multi {
  justify-content: flex-start;
}

.image-card.lightroom img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  cursor: zoom-out;
  /* smoother zoom */
  will-change: transform;
}

/* Use "multi"-class ul components within image-cards to display multiple 
versions of a work, but only in the lightbox, and withoug bullets*/
/* .image-card.multi ul.multi {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: none;
  flex-direction: column;
  gap: 1rem;
} */
/* .image-card.multi .popup img {
  padding: 0.5rem 0rem;
} */

/* Stack multi images vertically and center them in lightroom */
.image-card.lightroom .popup {
  display: flex;
  /* vertical stack */
  flex-direction: column;
  /* center narrow images/paragraphs */
  align-items: center;
  /* space between items */
  gap: 1rem;
  width: 100%;
}

/* Ensure each image centers when it doesn't fill the width */
.image-card.lightroom .popup img {
  display: block;
  /* consistent with lightroom image sizing */
  max-width: 90vw;
  height: auto;
  /* horizontal centering */
  margin: 0 auto;
  /* just in case any legacy float sneaks in */
  float: none;
}

/* don't display cover elements in lightroom mode */
.image-card.lightroom .cover {
  display: none;
}

/* don't display popup elements in non-lightroom mode */
.image-card:not(.lightroom) .popup {
  display: none;
}

.theme-btn:focus {
  outline: none;
  box-shadow: none;
}

.theme-btn:focus-visible {
  /* visible focus for keyboard users */
  outline: 2px solid #aaa;
  outline-offset: 2px;
}