#image-modal:not(.hidden) {
  display: flex;
  align-items: center;
  justify-content: center;
}

#image-modal .gallery-modal-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 0.25rem;
}

#image-modal .gallery-modal-nav {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}

#image-modal .gallery-modal-nav:hover:not(:disabled) {
  background: rgba(15, 23, 42, 1);
  border-color: rgba(52, 211, 153, 0.6);
}

#image-modal .gallery-modal-nav:disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

#image-modal .gallery-modal-nav svg {
  width: 1.75rem;
  height: 1.75rem;
}

#image-modal .gallery-modal-panel {
  flex: 1;
  min-width: 0;
}

@media (min-width: 640px) {
  #image-modal .gallery-modal-row {
    gap: 1rem;
    padding: 0 0.5rem;
  }

  #image-modal .gallery-modal-nav {
    width: 3.25rem;
    height: 3.25rem;
  }
}
