﻿/* wwwroot/css/photos.css
   Shared thumbnail + lightbox styling for modules that use .vehicle-photo-link
   Safe: this file is only loaded on non-auth pages via _Layout.cshtml.
*/

/* --- Thumbnail grid behavior --- */
.record-photos,
.vehicle-photos,
.homeinv-photos,
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

.record-photos a.vehicle-photo-link,
.vehicle-photos a.vehicle-photo-link,
.homeinv-photos a.vehicle-photo-link,
.photo-grid a.vehicle-photo-link {
  display: inline-block;
  text-decoration: none;
}

/* Constrain thumbnails (fixes “HUGE thumbnails”) */
.record-photos a.vehicle-photo-link img,
.vehicle-photos a.vehicle-photo-link img,
.homeinv-photos a.vehicle-photo-link img,
.photo-grid a.vehicle-photo-link img,
a.vehicle-photo-link img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.15);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transition: transform 120ms ease-in-out;
  max-width: 100%;
}

.record-photos a.vehicle-photo-link img:hover,
.vehicle-photos a.vehicle-photo-link img:hover,
.homeinv-photos a.vehicle-photo-link img:hover,
.photo-grid a.vehicle-photo-link img:hover,
a.vehicle-photo-link img:hover {
  transform: scale(1.02);
}

/* --- Lightbox overlay --- */
.hp-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2000;
}

.hp-lightbox.is-open {
  display: block;
}

.hp-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
}

.hp-lightbox__content {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hp-lightbox__img {
  max-width: min(1200px, 92vw);
  max-height: 86vh;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
  background: #111;
}

/* Buttons */
.hp-lightbox__btn {
  position: absolute;
  top: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255,255,255,0.10);
  color: #fff;
  font-size: 22px;
  line-height: 44px;
  text-align: center;
  user-select: none;
}

.hp-lightbox__btn:hover {
  background: rgba(255,255,255,0.18);
}

.hp-lightbox__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Close (top-right) */
.hp-lightbox__close {
  right: 16px;
}

/* Prev/Next (center vertically) */
.hp-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  font-size: 26px;
  line-height: 54px;
}

.hp-lightbox__prev { left: 16px; }
.hp-lightbox__next { right: 16px; }

/* Counter */
.hp-lightbox__counter {
  position: absolute;
  left: 16px;
  top: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  color: #fff;
  font-size: 13px;
  user-select: none;
}
