/* Littlest Dreamer — header baby switcher pill + sheet
   Mounted into the sticky-nav alongside the account button. The pill
   inherits the cream/sage-on-dark look from .lr-account-btn so they sit
   next to each other without visual disagreement. */

.lr-baby-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 50px;
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  height: 34px;
  box-sizing: border-box;
  padding: 0 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  max-width: 180px;
}
.lr-baby-pill:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.45);
}
.lr-baby-pill svg { flex-shrink: 0; }
.lr-baby-pill-name {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.lr-baby-pill.is-unnamed {
  background: rgba(255, 200, 90, 0.18);
  border-color: rgba(255, 200, 90, 0.55);
}
.lr-baby-pill.is-unnamed:hover {
  background: rgba(255, 200, 90, 0.32);
  border-color: rgba(255, 200, 90, 0.85);
}
@media (max-width: 520px) {
  .lr-baby-pill { padding: 0 10px; max-width: 130px; }
  .lr-baby-pill-name { max-width: 70px; }
}

/* On web the pill sits alongside the .sticky-nav-btn tabs in the same
   flex row. Match their height (40px) and padding so all four pills
   read as a single coherent control group. */
body:not(.is-native) .lr-baby-pill {
  height: 40px;
  padding: 0 14px;
  font-size: 13px;
}

/* Bottom sheet — list of babies with active marker. Self-contained DOM
   appended to <body> by the switcher module on first open. */
.lr-baby-sheet {
  position: fixed;
  inset: 0;
  /* Must clear the bottom nav (z-9999) — otherwise the last rows of the
     baby list sit behind the nav and can't be tapped. */
  z-index: 10000;
  pointer-events: none;
  visibility: hidden;
}
.lr-baby-sheet.is-open {
  pointer-events: auto;
  visibility: visible;
}
.lr-baby-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 18, 0.42);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.lr-baby-sheet.is-open .lr-baby-sheet-backdrop { opacity: 1; }
.lr-baby-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--cream, #faf6ef);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -16px 48px rgba(0,0,0,0.22);
  /* Bottom padding must clear the fixed bottom nav so the tail of the
     baby list stays tappable. Max-height shrinks to fit above the nav. */
  padding: 8px 18px var(--lr-nav-clear, 28px);
  max-height: calc(70vh - var(--lr-nav-h, 0px));
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lr-baby-sheet.is-open .lr-baby-sheet-panel { transform: translateY(0); }
@media (min-width: 640px) {
  .lr-baby-sheet-panel {
    left: 50%;
    right: auto;
    bottom: 50%;
    transform: translate(-50%, calc(50% + 40px));
    width: 420px;
    max-width: 92vw;
    border-radius: 18px;
    padding: 18px 22px 24px;
    max-height: min(70vh, 560px);
  }
  .lr-baby-sheet.is-open .lr-baby-sheet-panel {
    transform: translate(-50%, 50%);
  }
}
.lr-baby-sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 4px;
  background: rgba(0,0,0,0.18);
  margin: 6px auto 12px;
}
@media (min-width: 640px) { .lr-baby-sheet-handle { display: none; } }
.lr-baby-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.lr-baby-sheet-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  margin: 0;
  color: var(--charcoal, #1a1a18);
}
.lr-baby-sheet-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--muted, #75726d);
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lr-baby-sheet-close:hover { background: rgba(0,0,0,0.05); }

.lr-baby-sheet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.lr-baby-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1.5px solid var(--border, #e0deef);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: 'DM Sans', sans-serif;
  text-align: left;
  cursor: pointer;
  min-height: 56px;
  color: var(--charcoal, #1a1a18);
  transition: background 0.15s, border-color 0.15s;
}
.lr-baby-row:hover { background: #fbf9f6; border-color: #cfc6ba; }
.lr-baby-row.is-active {
  border-color: var(--sage, #8b8fcf);
  background: #f4f9f4;
}
.lr-baby-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}
.lr-baby-row-name {
  font-size: 15px;
  font-weight: 600;
}
.lr-baby-row-unnamed {
  color: var(--muted, #75726d);
  font-style: italic;
  font-weight: 500;
}
.lr-baby-row-sub {
  font-size: 12px;
  color: var(--muted, #75726d);
}
.lr-baby-row-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 50px;
  background: #e6f0e7;
  color: var(--sage-dark, #4a4a8c);
}

body.lr-baby-sheet-open { overflow: hidden; }

/* Inline "Name your baby" card — rendered into #lr-baby-name-card-wrap
   on each main page when a household has a single, unnamed baby. The
   pill was banished from the sticky-nav because the nav is a 3-column
   grid on native iOS and a 4th child auto-placed into column 1 broke
   the layout. The card mirrors `.night-card` so they read as a single
   visual language. */
.lr-baby-name-card {
  background: var(--surface, #ffffff);
  border-radius: 20px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04));
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: border-color 0.15s, transform 0.15s;
}
.lr-baby-name-card:hover { border-color: var(--sage-light, #c8caee); }
.lr-baby-name-card:active { transform: scale(0.99); }
.lr-baby-name-card-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sage-bg, #eef0fb);
  color: var(--sage-dark, #4a4a8c);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lr-baby-name-card-body { flex: 1; min-width: 0; }
.lr-baby-name-card-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #75726d);
  margin-bottom: 4px;
}
.lr-baby-name-card-cta {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--charcoal, #1a1a18);
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.lr-baby-name-card-meta {
  font-size: 12px;
  color: var(--muted, #75726d);
  margin-top: 4px;
}
.lr-baby-name-card-arrow {
  flex: 0 0 16px;
  color: var(--sage, #8b8fcf);
  opacity: 0.85;
  transition: opacity 0.15s, color 0.15s;
}
.lr-baby-name-card:hover .lr-baby-name-card-arrow {
  color: var(--sage-dark, #4a4a8c);
  opacity: 1;
}
