/* Series prev/next on artwork & print detail — flanks the frame, not on the photograph */

.art-nav-viewport {
  position: relative;
  width: 100%;
  max-width: 100%;
  --art-nav-gap: clamp(0.75rem, 2vw, 1.5rem);
}

.art-nav-stage {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.art-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  background: rgba(10, 10, 10, 0.42);
  color: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  text-decoration: none;
  transition:
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.4s ease,
    border-color 0.4s ease,
    background-color 0.4s ease;
  backdrop-filter: blur(5px);
  flex-shrink: 0;
  z-index: 12;
}

.art-nav:hover,
.art-nav:focus-visible {
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(22, 22, 22, 0.72);
  outline: none;
}

.art-nav.is-disabled {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* Wide screens: arrows sit outside the image frame */
.art-nav-viewport .art-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.art-nav-viewport .art-nav--prev {
  right: calc(100% + var(--art-nav-gap));
  left: auto;
}

.art-nav-viewport .art-nav--next {
  left: calc(100% + var(--art-nav-gap));
  right: auto;
}

/* Narrow viewports: pin to screen edges, low opacity until hover */
@media (max-width: 768px) {
  .art-nav-viewport .art-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.32;
  }

  .art-nav-viewport .art-nav--prev {
    left: max(0.5rem, env(safe-area-inset-left, 0px));
    right: auto;
  }

  .art-nav-viewport .art-nav--next {
    right: max(0.5rem, env(safe-area-inset-right, 0px));
    left: auto;
  }

  .art-nav-viewport .art-nav:hover,
  .art-nav-viewport .art-nav:focus-visible {
    opacity: 0.92;
  }
}

.art-nav-host {
  overflow: visible;
}

.gallery-page article,
.gallery-page #print-shell {
  overflow: visible;
}

/* Last image in series — return to gallery or loop to first */
.art-series-end {
  margin-top: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1rem, 2.5vw, 1.35rem) clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(8, 8, 8, 0.72);
  text-align: center;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.art-series-end__label {
  margin: 0 0 1rem;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.art-series-end__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}

@media (min-width: 480px) {
  .art-series-end__actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
}

.art-series-end__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.78);
  transition:
    color 0.35s ease,
    border-color 0.35s ease,
    background-color 0.35s ease;
}

.art-series-end__btn:hover,
.art-series-end__btn:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.art-series-end__btn--continue {
  border-color: rgba(255, 255, 255, 0.32);
  color: rgba(255, 255, 255, 0.92);
}

.art-series-end__btn--continue:hover,
.art-series-end__btn--continue:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.45);
}

/* Subtle enter when arriving via series navigation */
.art-nav-stage.is-entering {
  animation: artSeriesNavEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes artSeriesNavEnter {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .art-nav {
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  }

  .art-nav-stage.is-entering {
    animation: none;
  }
}
