/* AGENT_TARGET: pet-growth-styles — egg overlay, stage badge, and growth toast for pet growth system */

/* Floating egg button in bottom-right corner */
.pet-egg-overlay {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 8000;
  background: linear-gradient(145deg, #fff8e8 0%, #ffedc8 100%);
  border: 3px solid #e8b050;
  border-radius: 50%;
  width: 72px;
  height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(220, 160, 40, 0.4);
  transition: transform 0.15s;
  padding: 0;
}
.pet-egg-overlay:hover {
  transform: scale(1.1);
}
.pet-egg-overlay[hidden] {
  display: none;
}

.pet-trick-panel-open .pet-egg-overlay {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.egg-icon {
  font-size: 2rem;
  line-height: 1;
}

.egg-badge {
  font-size: 0.6rem;
  font-weight: 700;
  color: #b06820;
  margin-top: 2px;
  line-height: 1;
  text-align: center;
}

/* Wobble animation triggered on tap */
@keyframes egg-wobble {
  0% {
    transform: rotate(0deg) scale(1);
  }
  15% {
    transform: rotate(-12deg) scale(1.08);
  }
  30% {
    transform: rotate(10deg) scale(1.06);
  }
  45% {
    transform: rotate(-8deg) scale(1.04);
  }
  60% {
    transform: rotate(6deg) scale(1.02);
  }
  75% {
    transform: rotate(-4deg) scale(1.01);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}

.pet-egg-overlay.egg-wobble {
  animation: egg-wobble 0.55s ease-in-out;
}

/* Growth stage toast notification */
.pet-growth-toast {
  position: fixed;
  bottom: 170px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #e060a0;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 28px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.35s,
    transform 0.35s;
  z-index: 12000;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}
.pet-growth-toast.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Stage badge styling on the pet picker button */
.pet-picker-btn {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.hud-action-grid .pet-picker-btn {
  max-width: none;
  white-space: normal;
}

.pet-option-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.pet-option-thumb {
  display: block;
  width: 58px;
  height: 58px;
}

.pet-option-label {
  color: #6d2b4f;
  font-weight: 800;
}

/* Toy motion atlas controls inside the pet picker */
.pet-motion-panel {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  padding: 12px;
  border: 2px solid #f3c4dc;
  border-radius: 16px;
  background: #fffdf8;
}

.pet-motion-panel[hidden] {
  display: none;
}

.pet-motion-preview-shell {
  width: 88px;
  height: 88px;
  margin: 0 auto;
}

.pet-motion-sprite,
.pet-motion-preview {
  display: block;
  width: 88px;
  height: 88px;
}

.pet-motion-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.pet-motion-name {
  color: #9b2e72;
  font-size: 0.98rem;
}

.pet-motion-hint {
  color: #8a5a72;
  font-size: 0.76rem;
  line-height: 1.25;
}

.pet-motion-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 178px;
  overflow-y: auto;
  padding-right: 2px;
}

.pet-motion-option {
  min-height: 44px;
  padding: 8px 10px;
  border: 2px solid #efb4cf;
  border-radius: 12px;
  background: #fff;
  color: #9b2e72;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.12s,
    border-color 0.12s,
    background 0.12s;
}

.pet-motion-option:hover {
  transform: translateY(-1px);
  border-color: #d85ba0;
}

.pet-motion-option.is-selected {
  border-color: #d85ba0;
  background: #ffe7f2;
}

.pet-follow-panel {
  margin-top: 12px;
  padding: 12px;
  border: 2px solid #ecd7ff;
  border-radius: 16px;
  background: #fff3fb;
}

.pet-follow-panel[hidden] {
  display: none;
}

.pet-follow-title {
  display: block;
  margin-bottom: 8px;
  color: #8f2f86;
  font-size: 0.86rem;
}

.pet-follow-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pet-follow-option {
  min-height: 42px;
  padding: 7px 9px;
  border: 2px solid #dcb6f8;
  border-radius: 12px;
  background: #fff;
  color: #7b35a6;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.pet-follow-option.is-selected {
  border-color: #a855f7;
  background: #f3e8ff;
}

.pet-follow-hint {
  display: block;
  margin-top: 8px;
  color: #765080;
  font-size: 0.76rem;
  line-height: 1.25;
}

@media (max-width: 420px) {
  .pet-motion-panel {
    grid-template-columns: 1fr;
  }

  .pet-motion-copy {
    text-align: center;
  }

  .pet-motion-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pet-follow-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 340px) {
  .pet-motion-controls,
  .pet-follow-controls {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pet-motion-option {
    transition: none;
  }
}
