/* Holy Puzzle: the image picker on Upload and My puzzles (fragments.html :: picker) */

.drop-zone {
  border: 2px dashed var(--bs-border-color);
  border-radius: var(--bs-border-radius-xl);
  padding: 2.5rem 1rem;
  text-align: center;
  background: var(--bs-tertiary-bg);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.drop-zone:hover,
.drop-zone:focus-visible {
  border-color: var(--bs-primary);
  outline: none;
}
.drop-zone.dragover {
  border-color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), .08);
}
.drop-zone .zone-icon {
  font-size: 3rem;
  line-height: 1;
  color: var(--bs-primary);
}
.drop-zone.dragover .zone-icon { animation: bob .6s ease infinite alternate; }

@keyframes bob {
  to { transform: translateY(-6px); }
}

/* compact variant (My puzzles) */
.drop-zone.drop-zone-sm { padding: 2rem 1rem; }
.drop-zone.drop-zone-sm .zone-icon { font-size: 2.5rem; }

.picker-preview {
  position: relative;
  background: #2b2f36;
  display: flex;
  align-items: center;
  justify-content: center;
}

#previewImg {
  display: block;
  max-width: 100%;
  max-height: 55vh;
  object-fit: contain;
}
/* phones: keep the buttons below on screen, even for tall (rotated) images */
@media (max-width: 575.98px) {
  #previewImg { max-height: 42vh; }
}

/* rotate buttons, floating over the top-right of the preview */
.rotate-bar {
  position: absolute;
  top: .5rem;
  right: .5rem;
  display: flex;
  gap: .375rem;
}
.btn-rotate {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.btn-rotate:hover,
.btn-rotate:focus-visible,
.btn-rotate:active {
  color: #fff;
  background: rgba(0, 0, 0, .7);
  border-color: rgba(255, 255, 255, .6);
}
