/* Interactive app screenshots (phone frames + lightbox) */

.version-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 12px;
  opacity: 0.85;
}

.version-pill .pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.snapshot-zone {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.snapshot-zone-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.snapshot-zone-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.snapshot-zone-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.snapshot-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.snapshot-rail::-webkit-scrollbar {
  height: 6px;
}

.snapshot-rail::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.shot-card {
  flex: 0 0 auto;
  width: min(200px, 42vw);
  scroll-snap-align: start;
  background: transparent;
  border: none;
  padding: 0;
  cursor: zoom-in;
  text-align: start;
  font: inherit;
  color: inherit;
}

.shot-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: 18px;
}

.shot-phone {
  position: relative;
  border-radius: 22px;
  padding: 8px;
  background: linear-gradient(160deg, #2a2a2e, #121214);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 12px 28px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shot-card:hover .shot-phone {
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 18px 36px rgba(0, 0, 0, 0.22);
}

.shot-phone img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  object-position: top center;
  border-radius: 16px;
  background: #0d0d0d;
}

.shot-caption {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
  font-weight: 500;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 14, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  flex-direction: column;
  gap: 12px;
}

.lightbox.open {
  display: flex;
}

.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(420px, 92vw);
  width: 100%;
}

.lightbox-stage img {
  width: 100%;
  max-height: min(78vh, 860px);
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  background: #111;
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  text-align: center;
  max-width: 420px;
  line-height: 1.45;
}

.lightbox-meta {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.15s;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox-close {
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 22px;
  z-index: 2;
}

body[dir="rtl"] .lightbox-close {
  right: auto;
  left: 16px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  z-index: 2;
}

.lightbox-nav.prev { left: max(8px, calc(50% - 260px)); }
.lightbox-nav.next { right: max(8px, calc(50% - 260px)); }

body[dir="rtl"] .lightbox-nav.prev { left: auto; right: max(8px, calc(50% - 260px)); }
body[dir="rtl"] .lightbox-nav.next { right: auto; left: max(8px, calc(50% - 260px)); }

.lightbox-nav[hidden] { display: none; }

@media (max-width: 640px) {
  .shot-card { width: min(168px, 55vw); }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
  body[dir="rtl"] .lightbox-nav.prev { right: 8px; left: auto; }
  body[dir="rtl"] .lightbox-nav.next { left: 8px; right: auto; }
}

@media print {
  .lightbox { display: none !important; }
  .snapshot-rail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
  }
  .shot-card { width: auto; break-inside: avoid; }
  .shot-phone { box-shadow: none; }
}
