body { background: #f5f5f5; }

.thumb-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.person-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.hover-card {
  transition: transform 0.15s, box-shadow 0.15s;
}
.hover-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* Thumbnail wrapper — hosts the photo link + the flag overlay icon */
.thumb-wrapper {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 4px;
}
.thumb-wrapper .thumb-img {
  border-radius: 0; /* wrapper provides the radius */
}
.thumb-flag-btn {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  background: rgba(220, 53, 69, 0.80);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
}
/* show on hover (desktop) */
.thumb-wrapper:hover .thumb-flag-btn {
  opacity: 1;
}
/* always visible on touch devices */
@media (hover: none) {
  .thumb-flag-btn { opacity: 0.75; }
}

/* Multi-select checkbox on each thumbnail */
.thumb-checkbox {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #dc3545;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.15s;
}
.thumb-wrapper:hover .thumb-checkbox,
.thumb-checkbox:checked { opacity: 1; }
@media (hover: none) { .thumb-checkbox { opacity: 1; } }

/* Highlight selected thumbnails */
.thumb-wrapper.thumb-selected { outline: 3px solid #dc3545; border-radius: 4px; }

/* Badge shown on thumbnails that already have an open flag */
.thumb-flagged-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 22px;
  height: 22px;
  background: rgba(220, 53, 69, 0.90);
  color: #fff;
  border-radius: 50%;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
}

/* Full photo view — constrained to viewport height by default */
.photo-frame {
  position: relative;
  text-align: center;
  background: #111;
  border-radius: 0.375rem;
  overflow: hidden;
}
.photo-main {
  max-height: calc(100vh - 120px);
  max-width: 100%;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: max-height 0.25s ease;
}
.photo-main.zoomed {
  max-height: none;
  width: 100%;
}
.zoom-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
}
.zoom-btn:hover { background: rgba(0, 0, 0, 0.80); }
