/* 31-planet-data-garden.css
   Planet Data Garden — child-facing celebratory discovery cards.
   Gentle, warm, never test-like. Paired with planet-data-garden.js. */

/* ── Floating garden button ───────────────────────────────────────────── */
.data-garden-button {
  position: fixed;
  /* bottom-left belongs to Zephy + Little Explorer; this chip was
     overlapping both (design audit 2026-07-06) */
  bottom: 16px;
  right: 16px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  min-height: 48px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #2c9b6a, #58c79a);
  color: #fff;
  font:
    600 15px/1 system-ui,
    sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(20, 80, 50, 0.45);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.data-garden-button:hover,
.data-garden-button:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 24px rgba(20, 80, 50, 0.55);
  outline: 3px solid #ffe7a8;
}
.data-garden-button-bloom {
  font-size: 22px;
  line-height: 1;
}
.data-garden-button-count {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 2px 9px;
  font-weight: 700;
}

/* ── "A discovery bloomed" toast ──────────────────────────────────────── */
.data-garden-toast {
  position: fixed;
  bottom: 78px;
  left: 16px;
  z-index: 9100;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  padding: 12px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7e6, #ffe2c2);
  color: #5a3d12;
  font:
    600 15px/1.35 system-ui,
    sans-serif;
  box-shadow: 0 8px 22px rgba(120, 80, 20, 0.35);
  animation: data-garden-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.data-garden-toast.no-motion {
  animation: none;
}
.data-garden-toast.leaving {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.data-garden-toast-bloom {
  font-size: 30px;
  line-height: 1;
  animation: data-garden-sway 2.4s ease-in-out infinite;
}
.data-garden-toast.no-motion .data-garden-toast-bloom {
  animation: none;
}

@keyframes data-garden-pop {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.85);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes data-garden-sway {
  0%,
  100% {
    transform: rotate(-7deg);
  }
  50% {
    transform: rotate(7deg);
  }
}

/* ── Garden overlay ───────────────────────────────────────────────────── */
#data-garden-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: radial-gradient(
    circle at 50% 30%,
    rgba(20, 60, 45, 0.7),
    rgba(6, 14, 24, 0.86)
  );
  backdrop-filter: blur(3px);
}
.data-garden-panel {
  position: relative;
  width: min(720px, 96vw);
  max-height: 88vh;
  overflow: auto;
  padding: 22px 22px 26px;
  border-radius: 26px;
  background: linear-gradient(160deg, #143b2c 0%, #0f2a3a 100%);
  border: 2px solid rgba(120, 220, 170, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.data-garden-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.data-garden-title {
  font:
    800 24px/1.1 system-ui,
    sans-serif;
  color: #d8ffe9;
}
.data-garden-count {
  font:
    600 14px/1 system-ui,
    sans-serif;
  color: #9fe7c2;
  background: rgba(120, 220, 170, 0.16);
  border-radius: 999px;
  padding: 4px 12px;
}
.data-garden-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #eafff4;
  font-size: 18px;
  cursor: pointer;
}
.data-garden-close:hover,
.data-garden-close:focus-visible {
  background: rgba(255, 255, 255, 0.26);
  outline: 3px solid #ffe7a8;
}

.data-garden-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.data-garden-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px 16px;
  font:
    600 17px/1.5 system-ui,
    sans-serif;
  color: #c9efdb;
}

/* ── Individual discovery card ────────────────────────────────────────── */
.data-garden-card {
  position: relative;
  padding: 16px 14px 14px;
  border-radius: 18px;
  background: linear-gradient(165deg, #fffdf6, #eef9f2);
  color: #214034;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.data-garden-bloom {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 26px;
  opacity: 0.92;
}
.data-garden-card-emoji {
  font-size: 38px;
  line-height: 1;
  margin-bottom: 8px;
}
.data-garden-card-title {
  font:
    800 16px/1.2 system-ui,
    sans-serif;
  margin-bottom: 6px;
  color: #1b4a36;
}
.data-garden-card-note {
  font:
    500 14px/1.4 system-ui,
    sans-serif;
  color: #3c5a4d;
}

@media (prefers-reduced-motion: reduce) {
  .data-garden-button,
  .data-garden-toast {
    transition: none;
    animation: none;
  }
}
