/**
 * mesh.art — lightbox / fullscreen-slideshow styles
 */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.95);
  z-index: 10000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.lb-overlay.open { display: flex; }

.lb-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s ease, color 0.2s ease, opacity 0.4s ease;
  z-index: 10002;
  font-family: inherit;
}
.lb-close:hover {
  background: rgba(232, 184, 75, 0.95);
  color: #111;
}
.lb-overlay.idle .lb-close {
  opacity: 0;
  pointer-events: none;
}

.lb-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1rem;
}
.lb-img {
  display: block;
  transform-origin: center center;
  transition: transform 0.18s ease;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  background: #1a1a1a;
}
.lb-img.fit-contain { max-width: 95vw; max-height: 88vh; width: auto; height: auto; }
.lb-img.fit-width   { width: 100vw; max-width: 100vw; height: auto; max-height: none; }
.lb-img.fit-height  { height: 95vh; max-height: 95vh; width: auto; max-width: none; }
.lb-img.fit-cover   { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; object-fit: cover; }

.lb-toolbar {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #e0e0e0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  z-index: 10001;
  opacity: 1;
  transition: opacity 0.4s ease;
}
.lb-btn {
  width: 2.2rem;
  height: 2.2rem;
  background: transparent;
  border: 1px solid transparent;
  color: #d8d8d8;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.lb-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.lb-btn.active,
.lb-btn.lb-play[data-playing="1"] {
  background: rgba(232, 184, 75, 0.18);
  border-color: rgba(232, 184, 75, 0.5);
  color: #e8b84b;
}
.lb-divider {
  width: 1px;
  height: 1.4rem;
  background: rgba(255, 255, 255, 0.12);
}
.lb-counter {
  font-size: 0.74rem;
  color: #a0a0a0;
  padding: 0 0.5rem;
  min-width: 4rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.lb-btn.lb-delay {
  width: auto;
  min-width: 2.6rem;
  padding: 0 0.45rem;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.lb-caption {
  position: fixed;
  top: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(75vw, 700px);
  padding: 0.6rem 1.2rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
  color: #fff;
  text-align: center;
  z-index: 10001;
  pointer-events: auto;
  opacity: 1;
  transition: opacity 0.4s ease;
}

/* Cinema mode — hide chrome + cursor when mouse is idle. */
.lb-overlay.idle { cursor: none; }
.lb-overlay.idle .lb-toolbar,
.lb-overlay.idle .lb-caption {
  opacity: 0;
  pointer-events: none;
}

/* Corner ↗ link on gallery tiles that have a detail page. Image click still
   opens the lightbox; this button lets you jump to the profile page. */
.lb-tile-link {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  border-radius: 6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
  z-index: 5;
  cursor: pointer;
}
.mg-tile:hover .lb-tile-link,
.m-card:hover .lb-tile-link,
.lb-tile-link:focus-visible {
  opacity: 1;
}
.lb-tile-link:hover {
  background: rgba(232, 184, 75, 0.95);
  color: #111;
}
.lb-caption:empty { display: none; }
.lb-cap-title  { font-size: 0.95rem; font-weight: 600; line-height: 1.3; }
.lb-cap-meta   { font-size: 0.78rem; color: #c8c8c8; margin-top: 0.2rem; }
.lb-cap-credit { font-size: 0.62rem; font-style: italic; color: #909090; margin-top: 0.25rem; }
.lb-cap-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: #e8b84b;
  text-decoration: none;
  border-bottom: 1px dotted rgba(232, 184, 75, 0.4);
}
.lb-cap-link:hover { color: #fff; border-color: #fff; }

@media (max-width: 768px) {
  .lb-toolbar { gap: 0.18rem; padding: 0.3rem 0.5rem; bottom: 0.6rem; }
  .lb-btn { width: 1.9rem; height: 1.9rem; font-size: 0.92rem; }
  .lb-counter { min-width: 3rem; padding: 0 0.3rem; font-size: 0.7rem; }
  .lb-caption { top: 0.6rem; max-width: 92vw; padding: 0.45rem 0.8rem; }
}
