/* edition-life-ios.css
 * Life Edition — Instagram-clone iOS aesthetic.
 * Loaded only when document.documentElement has class 'jny-edition-life'.
 * Overrides shared feed CSS to match iOS-native IG look:
 *   - SF system font stack
 *   - True iOS post card spacing/typography
 *   - IG-style top bar (Life logo left, message/share icons right)
 *   - IG story ring tray
 *   - iOS bottom tab bar with safe-area inset
 *   - Status-bar safe-area top inset
 *
 * Intentionally scoped to .jny-edition-life — does not affect jny/jf/jnf renders.
 */

/* ============================================================
   Edition root — viewport, scroll, safe-area
   ============================================================ */
.jny-edition-life,
.jny-edition-life body {
  margin: 0;
  padding: 0;
  background: #000;          /* IG dark behind the white feed background */
  color: #000;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
               "Helvetica Neue", "Helvetica", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: contain;
}

/* IG body is white inside an outer black container — gives the bezel/seam look */
.jny-edition-life #app,
.jny-edition-life main,
.jny-edition-life .jny-shell {
  background: #fff;
  min-height: 100vh;
  min-height: 100svh;        /* small viewport height — respects iOS dynamic toolbar */
  max-width: 480px;          /* iPhone width sweet spot */
  margin: 0 auto;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));  /* room for bottom tab bar */
  position: relative;
}

/* Hide the existing JNY1 chrome (flip-bar, comm-bar, etc) for life Edition */
.jny-edition-life .flip-bar,
.jny-edition-life .jny-shell-comm,
.jny-edition-life .l1-pill,
.jny-edition-life .ratchet-toolbar {
  display: none !important;
}

/* ============================================================
   Top bar — Life logo + actions
   ============================================================ */
.jny-edition-life::before {
  content: "";
  display: block;
  height: env(safe-area-inset-top, 0);
  background: #fff;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}

.jny-edition-life .l1-bar,
.jny-edition-life .top-bar {
  position: sticky;
  top: env(safe-area-inset-top, 0);
  background: #fff;
  border-bottom: 0.33px solid #dbdbdb;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 50;
}

.jny-edition-life .l1-bar-title {
  font-family: "Billabong", "SF Pro Display", -apple-system, sans-serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.5px;
  font-style: italic;          /* IG logo is cursive — closest with system fonts */
}

.jny-edition-life .l1-bar-actions {
  display: flex;
  gap: 16px;
}

.jny-edition-life .l1-bar-icon {
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 22px;
  color: #000;
}

/* ============================================================
   Stories tray (IG signature ring around avatar)
   ============================================================ */
.jny-edition-life .feed-stories {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #fff;
  border-bottom: 0.33px solid #dbdbdb;
}
.jny-edition-life .feed-stories::-webkit-scrollbar { display: none; }

.jny-edition-life .feed-story {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
  cursor: pointer;
}

.jny-edition-life .feed-story-ring {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  padding: 2.5px;
  position: relative;
}
.jny-edition-life .feed-story-ring--seen {
  background: #d4d4d4;
}

.jny-edition-life .feed-story-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border: 2px solid #fff;
  background-size: cover;
  background-position: center;
}

.jny-edition-life .feed-story-name {
  font-size: 12px;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  color: #262626;
}

/* ============================================================
   Compose trigger — Life Edition styles like IG "What's on your mind"
   ============================================================ */
.jny-edition-life .feed-compose-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: none;
  border-bottom: 0.33px solid #efefef;
  cursor: pointer;
  width: 100%;
  border-radius: 0;
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  color: #737373;
}

.jny-edition-life .feed-compose-trigger-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743);
}

/* ============================================================
   Post card — IG faithful
   ============================================================ */
.jny-edition-life .feed-post {
  background: #fff;
  border: 0;
  border-bottom: 0.33px solid #efefef;
  padding: 0;
  border-radius: 0;
  margin: 0;
}

.jny-edition-life .feed-post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
}

.jny-edition-life .feed-post-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433, #dc2743);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 0 2px rgba(0,0,0,0.4);
  flex-shrink: 0;
}

.jny-edition-life .feed-post-author {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #262626;
}

.jny-edition-life .feed-post-author-meta {
  font-size: 11px;
  font-weight: 400;
  color: #8e8e8e;
  margin-top: 1px;
  display: block;
}

.jny-edition-life .feed-post-meta-toggle {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  color: #262626;
  letter-spacing: 1.5px;
}

/* Authoring badges — keep readable but small */
.jny-edition-life .feed-post-badges {
  font-size: 10px;
}
.jny-edition-life .feed-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

/* Media — true 1:1 IG ratio */
.jny-edition-life .feed-post-media-wrap {
  position: relative;
  width: 100%;
  background: #fafafa;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.jny-edition-life .feed-post-media-track::-webkit-scrollbar { display: none; }
.jny-edition-life .feed-post-media-track { scrollbar-width: none; }

.jny-edition-life .feed-post-media-item img,
.jny-edition-life .feed-post-media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jny-edition-life .feed-post-media-dots {
  position: absolute;
  bottom: 10px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
}
.jny-edition-life .feed-post-media-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  box-shadow: 0 0 1px rgba(0,0,0,0.4);
}
.jny-edition-life .feed-post-media-dot--active {
  background: #0095f6;     /* IG blue active dot */
}

/* Action row — heart, comment, share, bookmark */
.jny-edition-life .feed-post-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 12px 4px;
}

.jny-edition-life .feed-action {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  padding: 6px 4px;
  line-height: 1;
  color: #262626;
}
.jny-edition-life .feed-action--liked {
  color: #ed4956;
}
.jny-edition-life .feed-action-bookmark {
  margin-left: auto;
}

.jny-edition-life .feed-post-counts {
  padding: 0 14px 6px;
  font-size: 14px;
  font-weight: 600;
  color: #262626;
}

.jny-edition-life .feed-post-caption {
  padding: 0 14px 4px;
  font-size: 14px;
  line-height: 1.4;
  color: #262626;
}
.jny-edition-life .feed-post-caption-author {
  font-weight: 600;
  margin-right: 6px;
}
.jny-edition-life .feed-mention { color: #00376b; font-weight: 500; }
.jny-edition-life .feed-hashtag { color: #00376b; font-weight: 500; }

.jny-edition-life .feed-post-comments-link {
  padding: 0 14px 4px;
  font-size: 14px;
  color: #8e8e8e;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.jny-edition-life .feed-post-time {
  padding: 0 14px 14px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #8e8e8e;
}

.jny-edition-life .feed-post-meta-detail {
  padding: 8px 14px;
  font-size: 11px;
  color: #8e8e8e;
  border-top: 0.33px solid #efefef;
}

/* ============================================================
   Composer overlay — IG-style sheet
   ============================================================ */
.jny-edition-life .feed-composer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 9000;
  padding: 0;
}
.jny-edition-life .feed-composer-overlay[hidden] { display: none !important; }

.jny-edition-life .feed-composer-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 14px 14px 0 0;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.jny-edition-life .feed-composer-head {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 0.33px solid #dbdbdb;
}
.jny-edition-life .feed-composer-close { font-size: 20px; color: #262626; }
.jny-edition-life .feed-composer-title { flex: 1; text-align: center; font-weight: 600; font-size: 15px; color: #262626; }
.jny-edition-life .feed-composer-submit {
  color: #0095f6;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.jny-edition-life .feed-composer-kind-tabs {
  display: flex;
  border-bottom: 0.33px solid #dbdbdb;
}
.jny-edition-life .feed-composer-kind-tabs button {
  flex: 1;
  padding: 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8e8e8e;
  border-bottom: 1.5px solid transparent;
}
.jny-edition-life .feed-composer-kind-tabs button[aria-selected="true"] {
  color: #262626;
  border-bottom-color: #262626;
  font-weight: 600;
}

.jny-edition-life .feed-composer-text {
  padding: 14px;
  border: none;
  outline: none;
  font-size: 16px;     /* prevents iOS zoom on focus */
  font-family: inherit;
  width: calc(100% - 28px);
  resize: none;
}

.jny-edition-life .feed-composer-add-btn {
  margin: 8px 14px;
  padding: 12px;
  border-radius: 8px;
  border: 1.5px dashed #c7c7c7;
  background: #fafafa;
  color: #262626;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.jny-edition-life .feed-composer-media-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 12px;
}
.jny-edition-life .feed-composer-media-thumb {
  width: 72px; height: 72px;
  border-radius: 6px;
  background: #efefef;
  background-size: cover;
  background-position: center;
  position: relative;
}
.jny-edition-life .feed-composer-media-thumb-remove {
  position: absolute; top: -6px; right: -6px;
  background: #262626;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: 12px;
  line-height: 1;
}

.jny-edition-life .feed-composer-meta {
  padding: 4px 14px 16px;
  font-size: 11px;
  color: #8e8e8e;
}

/* ============================================================
   All-Feed (cross-circle aggregator) — list view, iOS Mail-style
   ============================================================ */
.jny-edition-life .all-feed-root {
  background: #fff;
}

.jny-edition-life .all-feed-head {
  position: sticky;
  top: 44px;
  background: #fff;
  border-bottom: 0.33px solid #dbdbdb;
  padding: 8px 14px;
}

.jny-edition-life .all-feed-title {
  font-size: 22px;
  font-weight: 700;
  color: #262626;
  margin: 4px 0 8px;
}

.jny-edition-life .all-feed-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  overflow-x: auto;
}
.jny-edition-life .all-feed-filters button {
  border: 1px solid #dbdbdb;
  background: #fafafa;
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 13px;
  color: #262626;
  font-family: inherit;
}
.jny-edition-life .all-feed-filters button[aria-selected="true"] {
  background: #262626;
  color: #fff;
  border-color: #262626;
}

.jny-edition-life .all-feed-card {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 0.33px solid #efefef;
  background: #fff;
  width: 100%;
  text-align: left;
  border-left: none;
  border-right: none;
  border-top: none;
  cursor: pointer;
  font-family: inherit;
}
.jny-edition-life .all-feed-card:active { background: #f7f7f7; }

.jny-edition-life .all-feed-thumb {
  width: 60px; height: 60px;
  border-radius: 6px;
  flex-shrink: 0;
}

.jny-edition-life .all-feed-row1 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
}
.jny-edition-life .all-feed-author { font-weight: 600; color: #262626; }
.jny-edition-life .all-feed-circle { color: #8e8e8e; font-size: 12px; }
.jny-edition-life .all-feed-time { margin-left: auto; color: #8e8e8e; font-size: 12px; }

.jny-edition-life .all-feed-preview {
  font-size: 14px;
  color: #262626;
  line-height: 1.35;
  margin-top: 2px;
}

.jny-edition-life .all-feed-counts {
  font-size: 12px;
  color: #8e8e8e;
  margin-top: 4px;
}

.jny-edition-life .all-feed-kind-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-right: 4px;
}
.jny-edition-life .all-feed-kind-badge--story { background: #ffe5e5; color: #c41818; }
.jny-edition-life .all-feed-kind-badge--reel { background: #e8f4fd; color: #0066b3; }

/* ============================================================
   iOS Bottom tab bar — IG-faithful 5 tabs
   ============================================================ */
.jny-edition-life .life-tab-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(50px + env(safe-area-inset-bottom, 0));
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: #fff;
  border-top: 0.33px solid #dbdbdb;
  display: flex;
  align-items: stretch;
  z-index: 100;
  max-width: 480px;
  margin: 0 auto;
}

.jny-edition-life .life-tab {
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: #262626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  padding: 0;
}
.jny-edition-life .life-tab--active {
  color: #000;
}
.jny-edition-life .life-tab--compose {
  font-size: 28px;
  font-weight: 200;
}

/* ============================================================
   Loading + empty states
   ============================================================ */
.jny-edition-life .feed-loading,
.jny-edition-life .feed-empty,
.jny-edition-life .all-feed-loading,
.jny-edition-life .all-feed-empty {
  text-align: center;
  padding: 64px 20px;
  color: #737373;
  font-size: 14px;
}

.jny-edition-life .feed-empty strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #262626;
  margin-bottom: 8px;
}

/* ============================================================
   Misc — disable webkit tap highlight, smooth scroll, prevent rubber-band on body
   ============================================================ */
.jny-edition-life * {
  -webkit-tap-highlight-color: transparent;
}
.jny-edition-life {
  scroll-behavior: smooth;
}
