/* ============================================
   BLOOM — Page-Specific Styles
   ============================================ */

/* ---- Habit Item ---- */
.habit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  cursor: pointer;
  transition: all var(--t-mid) var(--ease-spring);
  border: 1.5px solid rgba(44,36,56,0.06);
  background: rgba(255,255,255,0.75);
}
.habit-item:hover {
  transform: translateX(4px);
  border-color: var(--bloom-rose);
  background: rgba(253,232,238,0.5);
}
.habit-item.habit-done {
  opacity: 0.65;
  border-color: var(--bloom-sage);
  background: rgba(184,212,192,0.15);
}
.habit-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.habit-emoji { font-size: 1.5rem; }
.habit-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(44,36,56,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  transition: all var(--t-mid) var(--ease-spring);
}
.habit-check.checked {
  background: var(--bloom-sage);
  border-color: var(--bloom-sage);
}

/* ---- Settings Row ---- */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  border-bottom: 1px solid rgba(44,36,56,0.04);
  transition: background var(--t-fast);
}
.settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: rgba(242,168,184,0.08); }

/* ---- Onboarding Steps ---- */
.onboarding-step { animation: pageIn 0.3s var(--ease-out); }

/* ---- Garden Cell tooltip ---- */
.garden-cell {
  position: relative;
}
.garden-cell:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bloom-dark);
  color: white;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

/* ---- Emotion row scroll indicator ---- */
.emotion-row::after {
  content: '';
  flex-shrink: 0;
  width: var(--space-6);
}

/* ---- Premium badge ---- */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, #FFE082, #FF8A65);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ---- Pulse animation for CTA ---- */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242,168,184,0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(242,168,184,0); }
}
.btn-rose { animation: pulse-glow 2.5s ease-in-out infinite; }
.btn-rose:hover { animation: none; }

/* ---- Section divider ---- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(44,36,56,0.08), transparent);
  margin: var(--space-2) 0;
}

/* ---- Floating action shimmer ---- */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.shimmer {
  background: linear-gradient(90deg,
    var(--bloom-blush) 25%,
    rgba(255,255,255,0.8) 50%,
    var(--bloom-blush) 75%
  );
  background-size: 200% auto;
  animation: shimmer 2s linear infinite;
}

/* ---- Scroll fade edges ---- */
.fade-scroll {
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* ---- Progress bar ---- */
.progress-bar {
  height: 6px;
  border-radius: var(--r-full);
  background: rgba(44,36,56,0.07);
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  border-radius: var(--r-full);
  background: var(--grad-rose);
  transition: width 0.8s var(--ease-out);
}

/* ---- Notification dot ---- */
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bloom-rose);
  border: 2px solid var(--bloom-cream);
  position: absolute;
  top: 2px;
  right: 2px;
}

/* ---- Swipe hint ---- */
.swipe-hint {
  text-align: center;
  padding: var(--space-3);
  color: var(--bloom-light);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
}
.empty-state__emoji { font-size: 3rem; margin-bottom: var(--space-4); }
.empty-state__title { font-family: var(--font-display); font-size: var(--text-xl); margin-bottom: var(--space-2); }
.empty-state__body { color: var(--bloom-mid); font-size: var(--text-sm); }

/* ---- Habit category labels ---- */
.habit-cat {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
}
.habit-cat-movement  { background: var(--bloom-sage); }
.habit-cat-nourish   { background: var(--bloom-rose); }
.habit-cat-hydration { background: #7DD3E8; }
.habit-cat-mindful   { background: var(--bloom-lavender); }
.habit-cat-sleep     { background: #8B8BCC; }

/* ---- Daily loop time blocks ---- */
.time-block {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-4) 0;
  border-bottom: 1px solid rgba(44,36,56,0.05);
}
.time-block:last-child { border-bottom: none; }
.time-label {
  width: 56px;
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--bloom-mid);
  padding-top: 2px;
}
.time-content { flex: 1; }
.time-content strong { display: block; font-size: var(--text-sm); margin-bottom: 2px; }
.time-content p { font-size: var(--text-xs); color: var(--bloom-mid); line-height: 1.5; }

/* ---- Onboarding hero blob animation ---- */
.onboarding-blob-1 {
  animation-delay: 0s;
}
.onboarding-blob-2 {
  animation-delay: -4s;
}

/* ---- Loading skeleton ---- */
.skeleton {
  background: linear-gradient(90deg,
    rgba(44,36,56,0.06) 25%,
    rgba(44,36,56,0.10) 50%,
    rgba(44,36,56,0.06) 75%
  );
  background-size: 200% auto;
  animation: shimmer 1.5s linear infinite;
  border-radius: var(--r-md);
}

/* ---- Bottom safe area ---- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom));
    height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  }
  .page {
    padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + var(--space-6));
  }
}

/* ---- Landscape override ---- */
@media (orientation: landscape) and (max-height: 500px) {
  .display-xl { font-size: var(--text-2xl); }
  .display-lg { font-size: var(--text-xl); }
  .onboarding-step { padding-top: var(--space-6); }
}
