/* styles-additions.css (workstream M): Live Photo and stack presentation.
   New file on purpose: existing styles.css keeps its ?v= string untouched.
   Wire with: <link rel="stylesheet" href="./styles-additions.css?v=10">
   right after the styles.css link in index.html (see EDIT-PAIRS.md). */

/* LIVE badge on grid cells: small red pill, top-left, iOS-style. */
.photo-cell { position: relative; }
.live-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: none;
}
.live-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff3b30;
}

/* Stack count badge: bottom-right pill with the member count. */
.stack-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  pointer-events: none;
}

/* Members of an inline-expanded stack get a subtle outline. */
.photo-cell.stack-member {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: -2px;
}

/* Lightbox: the motion part plays in a video layer over the still. */
.lb-slide { position: relative; }
.lb-live {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  z-index: 3;
}
.lb-live-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 4;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.04em;
  pointer-events: none;
}

/* Stack manager bottom sheet. */
.stack-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.stack-sheet-panel {
  width: 100%;
  max-width: 720px;
  background: var(--card, #141414);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.stack-sheet-head,
.stack-sheet-foot {
  padding: 14px 16px;
}
.stack-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stack-sheet-head h3 {
  margin: 0;
  font-size: 17px;
}
.stack-members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding: 4px 16px 10px;
  max-height: 56vh;
  overflow-y: auto;
}
.stack-member {
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
}
.stack-member.is-cover {
  border-color: #ffd60a;
}
.stack-member-cell {
  width: 100%;
  aspect-ratio: 1;
}
.stack-member-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 2px 2px;
}
.stack-sheet-foot {
  padding-bottom: 14px;
}
