/* css/photos.css — P3-06. Photo pin markers, count badge, lightbox, strip.
   One-css-file-per-owning-step convention. Every colour comes from the
   styles.css tokens (dark theme) — no new palette values here. Injected by
   js/photos.js (guarded link) until the integrator adds a static <link>. */

/* --- thumbnail marker -------------------------------------------------- */
/* The divIcon root. 38px box; the img fills it. Leaflet positions it. */
.atlas-photo-pin {
  background: none;
  border: none;
}

.atlas-photo-pin img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--bg-raised);
  outline: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  display: block;
  cursor: pointer;
}

.atlas-photo-pin:hover img,
.atlas-photo-pin:focus img {
  outline-color: var(--accent);
}

/* Count badge on a thinned (clustered) representative pin. */
.atlas-photo-count {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 0.55rem;
  background: var(--accent);
  color: var(--bg);
  font: 700 0.65rem/1.1rem var(--font);
  text-align: center;
  pointer-events: none;
}

/* --- lightbox ---------------------------------------------------------- */
.atlas-photo-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 20, 23, 0.88);   /* --bg at 88% */
  z-index: 1100;                        /* above --z-chrome (1000) */
  padding: var(--pad);
}

.atlas-photo-lightbox-on {
  display: flex;
}

.atlas-photo-lightbox-figure {
  margin: 0;
  max-width: min(92vw, 60rem);
  text-align: center;
}

.atlas-photo-lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-raised);
}

.atlas-photo-lightbox-caption {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--pad);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.atlas-photo-lightbox-album {
  color: var(--accent-2);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.2rem 0.6rem;
}

.atlas-photo-lightbox-album:hover {
  border-color: var(--accent-2);
}

.atlas-photo-lightbox-close {
  position: absolute;
  top: calc(var(--pad) + env(safe-area-inset-top, 0px));
  right: var(--pad);
  width: 2.75rem;                       /* 44px tap target */
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-raised);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.atlas-photo-lightbox-close:hover {
  border-color: var(--accent);
}

/* --- panel thumbnail strip (renderGallery) ----------------------------- */
.atlas-photo-strip {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0;
}

.atlas-photo-strip-thumb {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  cursor: pointer;
  flex: 0 0 auto;
}

.atlas-photo-strip-thumb:hover {
  border-color: var(--accent);
}
