/* Holy Puzzle: shared by the jigsaw and tile pages (fragments.html :: puzzleEmpty, previewOverlay, winModal) */

/* Preview: the whole picture shown over the play area for a few seconds */
#previewOverlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(0, 0, 0, .55);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
#previewOverlay.show {
  opacity: 1;
  visibility: visible;
}
/* placed exactly over the puzzle board by placePreview() */
.preview-frame {
  position: absolute;
  line-height: 0;
}
.preview-frame img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.preview-count {
  position: absolute;
  top: .5rem;
  right: .5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* the photo's title under the page heading keeps its line even before there is one */
#imageTitle { min-height: 1.5em; }

/* Toolbar (grid size, Guide/Numbers, Preview, Shuffle): left-aligned, labelled at every size. Small phones get
   slightly tighter buttons, so all four still fit on one row at 360px wide (it wraps rather than overflows). */
@media (max-width: 399.98px) {
  .puzzle-toolbar { gap: .25rem !important; }
  .puzzle-toolbar .btn {
    padding-left: .375rem;
    padding-right: .375rem;
    font-size: .8rem;
  }
  .puzzle-toolbar .btn .ms-1 { margin-left: .2rem !important; }
}
