/* Memory Bank – activity cards with distinct templates per type */

.memory-bank-page .memory-bank-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
}

.memory-bank-child-select label,
.memory-bank-add label {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.memory-bank-child-select select,
.memory-bank-add select {
  min-width: 12rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.memory-bank-add {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.memory-bank-add select {
  min-width: 14rem;
}

.memory-bank-timeline-title {
  margin: 1.5rem 0 1rem;
  font-size: 1.25rem;
}

.memory-bank-timeline {
  display: grid;
  gap: 1.25rem;
  max-width: 52rem;
}

/* Base memory card */
.memory-card {
  position: relative;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
  border-left: 4px solid var(--mb-accent, var(--color-primary));
  overflow: hidden;
}

.memory-card__date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.memory-card__ribbon {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem;
  border-radius: 0 0 0 var(--radius);
  background: var(--mb-accent-soft, var(--color-surface-alt));
  color: color-mix(in oklab, var(--mb-accent, var(--color-text-muted)) 55%, #111 45%);
}

.memory-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.memory-card__desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text);
}

.memory-card__hero {
  text-align: center;
  padding: 0.75rem 0;
}

.memory-card__icon {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  background: var(--mb-accent-soft, #eef2f7);
  color: var(--mb-accent, var(--color-primary));
}

.memory-card__highlight,
.memory-card__word {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0.25rem 0;
}

.memory-card__word {
  font-style: italic;
}

.memory-card__meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
}

.memory-card__grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.25rem;
  margin: 0.75rem 0;
  font-size: 0.95rem;
}

.memory-card__grid dt {
  margin: 0;
  color: var(--color-text-muted);
  font-weight: 500;
}

.memory-card__grid dd {
  margin: 0;
}

.memory-card__media {
  margin: 0.75rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface-alt);
}

.memory-card__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
}

.memory-card__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.memory-card__placeholder .memory-card__icon {
  margin-bottom: 0.5rem;
}

.memory-card__note-body {
  white-space: pre-wrap;
  margin: 0;
  padding: 0.75rem;
  background: var(--color-surface-alt);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.memory-card__video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.memory-card__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Template-specific designs ---- */

/* Birth details – soft gold / cream */
.memory-card--birth-details {
  border-left-color: #c9a227;
  background: linear-gradient(135deg, #fffef8 0%, #fff9eb 100%);
}

.memory-card--birth-details .memory-card__ribbon {
  background: #e8d5a3;
  color: #6b5a2a;
}

.memory-card--birth-details .memory-card__icon--baby {
  background: #f0e6c8;
  color: #c9a227;
}

/* First photo – soft blue */
.memory-card--first-photo {
  border-left-color: #4a90d9;
  background: linear-gradient(135deg, #f8fbff 0%, #e8f2fc 100%);
}

.memory-card--first-photo .memory-card__ribbon {
  background: #c5dff9;
  color: #2d6ba8;
}

.memory-card--first-photo .memory-card__placeholder,
.memory-card--first-photo .memory-card__icon--camera {
  background: #d4e8f7;
  color: #4a90d9;
}

/* First person who picked up – rose */
.memory-card--first-person-pickup {
  border-left-color: #d4566a;
  background: linear-gradient(135deg, #fff8f9 0%, #ffecf0 100%);
}

.memory-card--first-person-pickup .memory-card__ribbon {
  background: #f5c5cc;
  color: #9e3d4a;
}

.memory-card--first-person-pickup .memory-card__icon--heart {
  background: #fad4da;
  color: #d4566a;
}

/* First tooth – mint */
.memory-card--first-tooth {
  border-left-color: #3db39e;
  background: linear-gradient(135deg, #f4fbf9 0%, #e6f5f1 100%);
}

.memory-card--first-tooth .memory-card__ribbon {
  background: #b8e0d8;
  color: #2a8574;
}

.memory-card--first-tooth .memory-card__icon--tooth {
  background: #cceee7;
  color: #3db39e;
}

/* Foot prints – warm brown */
.memory-card--footprints {
  border-left-color: #a67c52;
  background: linear-gradient(135deg, #fdfaf7 0%, #f5ede5 100%);
}

.memory-card--footprints .memory-card__ribbon {
  background: #e8d4c4;
  color: #6b5344;
}

.memory-card--footprints .memory-card__placeholder,
.memory-card--footprints .memory-card__icon--footprints {
  background: #ede0d4;
  color: #a67c52;
}

/* Hand prints – terracotta */
.memory-card--handprints {
  border-left-color: #c4755a;
  background: linear-gradient(135deg, #fef9f7 0%, #f9ebe6 100%);
}

.memory-card--handprints .memory-card__ribbon {
  background: #f0d4c8;
  color: #8b5342;
}

.memory-card--handprints .memory-card__placeholder,
.memory-card--handprints .memory-card__icon--handprints {
  background: #f5e0d8;
  color: #c4755a;
}

/* First smile – sunny yellow */
.memory-card--first-smile {
  border-left-color: #e6b84a;
  background: linear-gradient(135deg, #fffef6 0%, #fff8e0 100%);
}

.memory-card--first-smile .memory-card__ribbon {
  background: #f5e4a8;
  color: #8a7019;
}

.memory-card--first-smile .memory-card__icon--smile {
  background: #f9edc4;
  color: #e6b84a;
}

/* First steps – green */
.memory-card--first-steps {
  border-left-color: #5a9e5c;
  background: linear-gradient(135deg, #f6fbf6 0%, #e8f3e9 100%);
}

.memory-card--first-steps .memory-card__ribbon {
  background: #c5e0c6;
  color: #3d6b3e;
}

.memory-card--first-steps .memory-card__icon--steps {
  background: #d4ecd5;
  color: #5a9e5c;
}

/* First word – purple */
.memory-card--first-word {
  border-left-color: #7b68b0;
  background: linear-gradient(135deg, #f8f6fc 0%, #ede8f5 100%);
}

.memory-card--first-word .memory-card__ribbon {
  background: #d4cce8;
  color: #4d4068;
}

.memory-card--first-word .memory-card__icon--word,
.memory-card--first-word .memory-card__word {
  color: #7b68b0;
}

.memory-card--first-word .memory-card__icon--word {
  background: #e5e0f0;
}

/* First solid food – orange */
.memory-card--first-solid-food {
  border-left-color: #e07c3c;
  background: linear-gradient(135deg, #fffaf6 0%, #ffefe3 100%);
}

.memory-card--first-solid-food .memory-card__ribbon {
  background: #f5d4bc;
  color: #9e5228;
}

.memory-card--first-solid-food .memory-card__icon--food {
  background: #f9e4d4;
  color: #e07c3c;
}

/* First haircut – slate */
.memory-card--first-haircut {
  border-left-color: #6b7b8c;
  background: linear-gradient(135deg, #f7f8f9 0%, #eef0f3 100%);
}

.memory-card--first-haircut .memory-card__ribbon {
  background: #d1d6dc;
  color: #4a5568;
}

.memory-card--first-haircut .memory-card__placeholder,
.memory-card--first-haircut .memory-card__icon--scissors {
  background: #e2e5ea;
  color: #6b7b8c;
}

/* First day school – navy */
.memory-card--first-day-school {
  border-left-color: #3d5a80;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf2 100%);
}

.memory-card--first-day-school .memory-card__ribbon {
  background: #c5cfdc;
  color: #2d4060;
}

.memory-card--first-day-school .memory-card__icon--school {
  background: #d4dce8;
  color: #3d5a80;
}

/* Ultrasound – soft teal */
.memory-card--ultrasound {
  border-left-color: #2d9d8a;
  background: linear-gradient(135deg, #f2faf8 0%, #e0f2ee 100%);
}

.memory-card--ultrasound .memory-card__ribbon {
  background: #a8ddd5;
  color: #1d6b5e;
}

.memory-card--ultrasound .memory-card__placeholder,
.memory-card--ultrasound .memory-card__icon--scan {
  background: #cceee8;
  color: #2d9d8a;
}

/* Bump photo – blush pink */
.memory-card--bump-photo {
  border-left-color: #d4849a;
  background: linear-gradient(135deg, #fef8f9 0%, #fceef2 100%);
}

.memory-card--bump-photo .memory-card__ribbon {
  background: #f5d4dc;
  color: #9e5a6b;
}

.memory-card--bump-photo .memory-card__placeholder,
.memory-card--bump-photo .memory-card__icon--bump {
  background: #f9e4ea;
  color: #d4849a;
}

/* Gender reveal – magenta */
.memory-card--gender-reveal {
  border-left-color: #b84d7a;
  background: linear-gradient(135deg, #fdf6f9 0%, #f9e8f0 100%);
}

.memory-card--gender-reveal .memory-card__ribbon {
  background: #f0c4d4;
  color: #7a3452;
}

.memory-card--gender-reveal .memory-card__icon--gift {
  background: #f5d4e4;
  color: #b84d7a;
}

/* Baby shower – coral */
.memory-card--baby-shower {
  border-left-color: #e07a6a;
  background: linear-gradient(135deg, #fff8f7 0%, #ffebe8 100%);
}

.memory-card--baby-shower .memory-card__ribbon {
  background: #f5ccc6;
  color: #9e5246;
}

.memory-card--baby-shower .memory-card__icon--party {
  background: #f9ddd8;
  color: #e07a6a;
}

/* Vaccination photo – medical blue */
.memory-card--vaccination-photo {
  border-left-color: #3d7ab5;
  background: linear-gradient(135deg, #f4f9fd 0%, #e5f0f9 100%);
}

.memory-card--vaccination-photo .memory-card__ribbon {
  background: #b8d4ed;
  color: #2a5680;
}

.memory-card--vaccination-photo .memory-card__placeholder,
.memory-card--vaccination-photo .memory-card__icon--vaccine {
  background: #d4e5f5;
  color: #3d7ab5;
}

/* Growth measurement – sage */
.memory-card--growth-measurement {
  border-left-color: #6b8e6b;
  background: linear-gradient(135deg, #f6f9f6 0%, #eaf0ea 100%);
}

.memory-card--growth-measurement .memory-card__ribbon {
  background: #c5d4c5;
  color: #4a6b4a;
}

.memory-card--growth-measurement .memory-card__icon--ruler {
  background: #d4e0d4;
  color: #6b8e6b;
}

/* Photo (generic) – accent 3 */
.memory-card--photo {
  border-left-color: var(--color-accent-3);
}

.memory-card--photo .memory-card__placeholder,
.memory-card--photo .memory-card__icon--image {
  background: #e8eef5;
  color: var(--color-accent-3);
}

/* Video – secondary */
.memory-card--video {
  border-left-color: var(--color-secondary);
}

.memory-card--video .memory-card__placeholder,
.memory-card--video .memory-card__icon--video {
  background: #e8eaf0;
  color: var(--color-secondary);
}

/* Milestone – star / accent 2 */
.memory-card--milestone {
  border-left-color: var(--color-accent-2);
}

.memory-card--milestone .memory-card__ribbon {
  background: #e8e4f0;
  color: #5c5278;
}

.memory-card--milestone .memory-card__icon--star {
  background: #e8e4f5;
  color: var(--color-accent-2);
}

/* Note – default / accent 1 */
.memory-card--note {
  border-left-color: var(--color-accent-1);
}

.memory-card--note .memory-card__ribbon {
  background: #e0e8e8;
  color: #4a5c5c;
}

.memory-card--note .memory-card__icon--note {
  background: #dce4e4;
  color: var(--color-accent-1);
}

/* Default fallback */
.memory-card--default {
  border-left-color: var(--color-primary);
}

/* Icon placeholders (use emoji or icon font in production) */
.memory-card__icon--baby::before {
  content: "👶";
}

.memory-card__icon--camera::before {
  content: "📷";
}

.memory-card__icon--heart::before {
  content: "❤️";
}

.memory-card__icon--tooth::before {
  content: "🦷";
}

.memory-card__icon--footprints::before {
  content: "👣";
}

.memory-card__icon--handprints::before {
  content: "✋";
}

.memory-card__icon--smile::before {
  content: "😊";
}

.memory-card__icon--steps::before {
  content: "👣";
}

.memory-card__icon--word::before {
  content: "💬";
}

.memory-card__icon--food::before {
  content: "🥣";
}

.memory-card__icon--scissors::before {
  content: "✂️";
}

.memory-card__icon--school::before {
  content: "🎒";
}

.memory-card__icon--scan::before {
  content: "🔬";
}

.memory-card__icon--bump::before {
  content: "🤰";
}

.memory-card__icon--gift::before {
  content: "🎁";
}

.memory-card__icon--party::before {
  content: "🎉";
}

.memory-card__icon--vaccine::before {
  content: "💉";
}

.memory-card__icon--ruler::before {
  content: "📏";
}

.memory-card__icon--image::before {
  content: "🖼";
}

.memory-card__icon--video::before {
  content: "🎬";
}

.memory-card__icon--star::before {
  content: "⭐";
}

.memory-card__icon--note::before {
  content: "📝";
}