/**
 * Leaftide UI Polish - Animation Enhancements
 * Focus on smooth, purposeful micro-interactions
 */

/* === FOUNDATION ANIMATIONS === */

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === BUTTON ENHANCEMENTS === */

.btn-hover-lift {
  transition: transform 0.2s var(--ease-default),
              box-shadow 0.2s var(--ease-default);
}

@media (hover: hover) {
  .btn-hover-lift:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
}

.btn-hover-lift:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

/* Enhanced button focus states */
.btn-focus-ring {
  transition: transform 0.2s var(--ease-out-expo),
              box-shadow 0.2s var(--ease-out-expo);
}

.btn-focus-ring:focus {
  outline: none;
  ring: 2px;
  ring-offset: 2px;
  transform: scale(1.02);
}

/* === CARD ANIMATIONS === */

.card-hover {
  transition: transform 0.3s var(--ease-default),
              box-shadow 0.3s var(--ease-default);
}

@media (hover: hover) {
  .card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  }
}

.dashboard-card {
  transition: transform 0.2s var(--ease-out-expo),
              box-shadow 0.2s var(--ease-out-expo);
  transform-origin: center;
}

@media (hover: hover) {
  .dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  }
}

/* === TAB TRANSITIONS === */

.tab-content {
  animation: fadeInSlide 0.3s var(--ease-default);
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-button {
  transition: color 0.2s ease,
              background-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tab-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.3s var(--ease-out-expo);
}

@media (hover: hover) {
  .tab-button:hover::before {
    left: 100%;
  }
}

/* === LOADING STATES === */

.loading-shimmer {
  background: linear-gradient(90deg, var(--color-surface) 25%, var(--color-surface-alt) 50%, var(--color-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* === NOTIFICATION ENHANCEMENTS === */

.notification-slide-in {
  animation: slideInFromRight 0.25s var(--ease-default);
}

.notification-slide-out {
  animation: slideOutToRight 0.18s var(--ease-default);
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutToRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* === PROGRESS INDICATORS === */

.progress-bar {
  transition: width 0.6s var(--ease-default);
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  animation: progressShine 2s infinite;
}

@keyframes progressShine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Plant lifecycle progress */
.lifecycle-progress {
  background: linear-gradient(90deg, #f0fdf4, #bbf7d0, #86efac, #4ade80, var(--color-canvas-valid));
  height: 6px;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  :root:not(.light) .lifecycle-progress {
    background: linear-gradient(90deg, #052e16, #064e3b, #065f46, #047857, var(--color-canvas-valid));
  }
}
.dark .lifecycle-progress {
  background: linear-gradient(90deg, #052e16, #064e3b, #065f46, #047857, var(--color-canvas-valid));
}

.lifecycle-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #059669, #10b981);
  border-radius: 3px;
  transition: width 0.8s var(--ease-default);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.lifecycle-stage-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: absolute;
  top: -1px;
  transform: translateX(-50%);
  transition: transform 0.3s ease,
              background-color 0.3s ease,
              box-shadow 0.3s ease;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lifecycle-stage-indicator.completed {
  background: #10b981;
  transform: translateX(-50%) scale(1.2);
}

.lifecycle-stage-indicator.current {
  background: #f59e0b;
  transform: translateX(-50%) scale(1.4);
  animation: pulse-glow 2s infinite;
}

.lifecycle-stage-indicator.upcoming {
  background: #e8ddd3;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(245, 158, 11, 0.2);
  }
}

/* === MODAL IMPROVEMENTS === */

.modal-backdrop {
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  animation: modalSlideIn 0.25s var(--ease-out-expo);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === LIST ANIMATIONS === */

.stagger-item {
  animation: staggerFadeIn 0.35s var(--ease-out-expo) both;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }

@keyframes staggerFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === ICON ANIMATIONS === */

.icon-bounce {
  transition: transform 0.2s var(--ease-out-expo);
}

@media (hover: hover) {
  .icon-bounce:hover {
    transform: scale(1.08);
  }
}

/* === NUMBER COUNTING === */

.count-up {
  animation: countPulse 0.3s ease;
}

@keyframes countPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* === SMOOTH HEIGHT TRANSITIONS === */

.accordion {
  transition: height 0.3s var(--ease-default);
  overflow: hidden;
}

.expand-collapse {
  transition: max-height 0.3s var(--ease-default);
  overflow: hidden;
}

/* === DASHBOARD SPECIFIC ANIMATIONS === */

.plant-card-item {
  transition: background-color 0.2s ease,
              transform 0.2s ease,
              box-shadow 0.2s ease;
  border-radius: 0.375rem;
}

@media (hover: hover) {
  .plant-card-item:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
}
@media (hover: hover) and (prefers-color-scheme: dark) {
  :root:not(.light) .plant-card-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
}
@media (hover: hover) {
  .dark .plant-card-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
}

.action-card-button {
  transition: transform 0.2s ease,
              box-shadow 0.2s ease;
}

@media (hover: hover) {
  .action-card-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
}

/* === FORM ENHANCEMENTS === */

.form-field {
  transition: box-shadow 0.2s var(--ease-out-expo);
}

.form-field:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-error {
  animation: shakeError 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* === UTILITY CLASSES === */

.animate-spin-slow {
  animation: spin 3s linear infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* === STANDARDIZED BUTTON CLASSES === */
/*
 * Button component styling now lives in garden/static/src/tailwind.css so that
 * Tailwind can compile the utility-based rules into the generated bundle.
 */

/* === PROGRESSIVE IMAGE LOADING === */

.image-placeholder {
  opacity: 0;
  transition: opacity 300ms var(--ease-out-expo);
}

.image-placeholder.is-loaded {
  opacity: 1;
}

/* === DASHBOARD HUB CHOREOGRAPHY === */

/* Morning briefing entrance — clip-path wipe reveals text left-to-right */
.hub-briefing-enter {
  animation: hubBriefingReveal 0.6s var(--ease-out-expo) both;
}

@keyframes hubBriefingReveal {
  from {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateY(4px);
  }
  40% {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0% 0 0);
    transform: translateY(0);
  }
}

/* Stat card stagger entrance */
.hub-card-enter {
  opacity: 0;
  animation: hubCardIn 0.4s var(--ease-out-expo) both;
  animation-delay: calc(var(--i, 0) * 50ms + 150ms);
}

/* Tool link stagger (starts after stat cards) */
.hub-tool-enter {
  opacity: 0;
  animation: hubCardIn 0.4s var(--ease-out-expo) both;
  animation-delay: calc(var(--i, 0) * 50ms + 450ms);
}

/* Weather chips cascade — blur-to-sharp materialize */
.hub-chip-enter {
  opacity: 0;
  animation: hubChipIn 0.3s var(--ease-out-expo) both;
  animation-delay: calc(var(--i, 0) * 50ms + 220ms);
}

@keyframes hubCardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes hubChipIn {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

/* Detail panel entrance */
.hub-panel-enter {
  animation: hubPanelIn 0.25s var(--ease-out-expo) both;
}

@keyframes hubPanelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sidebar active indicator (CSS-only via ::before on active nav link) */
.sidebar-nav-link {
  position: relative;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--color-success);
  transition: transform 0.25s var(--ease-out-expo);
}

.sidebar-nav-link.is-active::before {
  transform: translateY(-50%) scaleY(1);
}

/* Enhanced hub card hover */
.hub-card-interactive {
  transition: transform 0.2s var(--ease-out-expo),
              box-shadow 0.2s var(--ease-out-expo),
              background-color 0.15s ease;
}

@media (hover: hover) {
  .hub-card-interactive:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(120, 100, 60, 0.06),
                0 8px 24px rgba(120, 100, 60, 0.12);
  }

  .hub-card-interactive:hover .hub-card-icon {
    transform: scale(1.1);
    transition: transform 0.2s var(--ease-out-expo);
  }
}

/* Hub card icon base transition */
.hub-card-icon {
  transition: transform 0.3s var(--ease-out-expo);
}

.hub-card-interactive:focus-visible {
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px var(--color-surface-tint, #fcfbf8),
              0 0 0 4px var(--color-success);
  transition: transform 0.2s var(--ease-out-expo),
              box-shadow 0.15s var(--ease-out-expo);
}

.hub-card-interactive:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
  box-shadow: 0 2px 8px rgba(120, 100, 60, 0.06);
}

/* Alpine-rendered list stagger (for x-for templates where server-side --i isn't available) */
.hub-list-stagger > * {
  opacity: 0;
  animation: hubCardIn 0.35s var(--ease-out-expo) both;
}
.hub-list-stagger > *:nth-child(1) { animation-delay: 50ms; }
.hub-list-stagger > *:nth-child(2) { animation-delay: 100ms; }
.hub-list-stagger > *:nth-child(3) { animation-delay: 150ms; }
.hub-list-stagger > *:nth-child(4) { animation-delay: 200ms; }
.hub-list-stagger > *:nth-child(5) { animation-delay: 250ms; }
.hub-list-stagger > *:nth-child(6) { animation-delay: 300ms; }
.hub-list-stagger > *:nth-child(7) { animation-delay: 350ms; }
.hub-list-stagger > *:nth-child(8) { animation-delay: 400ms; }
.hub-list-stagger > *:nth-child(n+9) { animation-delay: 450ms; }

/* === HUB SHELL POLISH (impeccable sweep) === */

/* Mobile bottom nav tap feedback */
nav.fixed.bottom-0 a,
nav.fixed.bottom-0 button {
  transition: transform 0.15s var(--ease-out-expo), color 0.15s ease;
}

nav.fixed.bottom-0 a:active,
nav.fixed.bottom-0 button:active {
  transform: scale(0.9);
  transition: transform 0.1s var(--ease-out-expo);
}

/* Sidebar thin scrollbar */
.dashboard-hub-layout aside {
  scrollbar-width: thin;
  scrollbar-color: var(--color-surface-border) transparent;
}

.dashboard-hub-layout aside::-webkit-scrollbar {
  width: 4px;
}

.dashboard-hub-layout aside::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-hub-layout aside::-webkit-scrollbar-thumb {
  background: var(--color-surface-border);
  border-radius: var(--radius-sm);
}

/* Morning briefing date line typography refinement */
#morning-briefing > p:nth-child(2) {
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

/* === HUB OVERVIEW CARDS POLISH (impeccable sweep) === */


/* Icon pop entrance — two-beat choreography within card */
.hub-card-enter .hub-card-icon,
.hub-tool-enter .hub-card-icon {
  opacity: 0;
  animation: hubIconFadeIn 0.25s var(--ease-out-expo) both;
  animation-delay: calc(var(--i, 0) * 50ms + 280ms);
}

@keyframes hubIconFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Stat number bounce-settle transition curve */
.hub-stat-number {
  display: inline-block;
  transition: transform 0.25s var(--ease-out-bounce);
}

.hub-stat-number.is-counting {
  transform: scale(1.05);
}

/* === HARVEST PAGE POLISH + ANIMATE (impeccable sweep) === */

/* Staggered entrance for Ready to Harvest plant cards */
.harvest-card-enter {
  opacity: 0;
  animation: hubCardIn 0.4s var(--ease-out-expo) both;
  animation-delay: calc(var(--i, 0) * 50ms + 100ms);
}

/* HTMX swap fade-in for summary, chart, and cards sections */
#harvest-summary > :not(.animate-pulse),
#harvest-chart > :not(.animate-pulse),
#harvest-cards > :not(.animate-pulse) {
  animation: hubCardIn 0.35s var(--ease-out-expo) both;
}

/* Log button press feedback */
#ready-to-harvest-section .bg-brand-600 {
  transition: background-color 0.15s ease, transform 0.1s ease;
}
#ready-to-harvest-section .bg-brand-600:active {
  transform: scale(0.95);
}

/* Hover lift on Ready to Harvest plant cards */
#ready-to-harvest-section .hover\:bg-surface-alt {
  transition: background-color 0.15s ease,
              transform 0.2s var(--ease-out-expo),
              box-shadow 0.2s var(--ease-out-expo);
}
#ready-to-harvest-section .hover\:bg-surface-alt:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Hover lift on harvest summary stat cards */
#harvest-summary [class*="rounded-lg"] {
  transition: transform 0.2s var(--ease-out-expo),
              box-shadow 0.2s var(--ease-out-expo);
}
#harvest-summary [class*="rounded-lg"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Ready to Harvest section entrance + amber pulse */
#ready-to-harvest-section.harvest-ready-pulse {
  animation: hubCardIn 0.4s var(--ease-out-expo) both,
             harvestReadyPulse 1.2s var(--ease-default) 0.5s both;
}

@keyframes harvestReadyPulse {
  0%, 100% { border-left-color: rgb(251 191 36); }
  50% { border-left-color: rgb(245 158 11); box-shadow: -3px 0 8px -2px rgba(245, 158, 11, 0.25); }
}

/* Skeleton-to-content blur dissolve */
@keyframes harvestContentIn {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .harvest-card-enter,
  #harvest-summary > :not(.animate-pulse),
  #harvest-chart > :not(.animate-pulse),
  #harvest-cards > :not(.animate-pulse),
  #ready-to-harvest-section.harvest-ready-pulse {
    animation: none;
    opacity: 1;
    filter: none;
  }
}

/* === MY PLANTS — press feedback (impeccable sweep: animate) === */

/* Plant card image hover zoom (desktop only) */
@media (hover: hover) {
  .group:hover .plant-card-img-zoom {
    transform: scale(1.08);
  }
}
.plant-card-img-zoom {
  transition: transform 0.25s var(--ease-out-expo);
}

/* Search input brand glow on focus */
.my-plants-search-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.my-plants-search-input:focus {
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(58, 140, 75, 0.2);
}

/* Segmented control sliding pill */
.segmented-pill-slide {
  background-color: var(--color-brand, #3A8C4B);
  transition: transform 0.25s var(--ease-out-expo);
}

/* List item press feedback */
#my-plants-app .hub-list-stagger > * > .flex.items-center {
  transition: transform 0.1s var(--ease-out-expo), background-color 0.15s ease;
}
#my-plants-app .hub-list-stagger > * > .flex.items-center:active {
  transform: scale(0.98);
  transition-duration: 0.08s;
}

/* Quick-log button press pop */
#my-plants-app button[class*='rounded-full'][class*='bg-brand-50'] {
  transition: background-color 0.15s ease, transform 0.1s var(--ease-out-expo);
}
#my-plants-app button[class*='rounded-full'][class*='bg-brand-50']:active {
  transform: scale(0.85);
  transition-duration: 0.08s;
}

@media (prefers-reduced-motion: reduce) {
  #my-plants-app .hub-list-stagger > * > .flex.items-center:active,
  #my-plants-app button[class*='rounded-full'][class*='bg-brand-50']:active {
    transform: none;
  }
}

/* === WATERING HUB POLISH + ANIMATE (impeccable sweep) === */

/* Water button press feedback + HTMX loading state */
.watering-group button[hx-post] {
  transition: transform 0.15s var(--ease-out-back-subtle),
              box-shadow 0.15s ease,
              opacity 0.15s ease;
}
.watering-group button[hx-post]:active {
  transform: scale(0.93);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.watering-group button[hx-post]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}
.watering-group button[hx-post].htmx-request {
  opacity: 0.7;
  pointer-events: none;
}

/* Card hover lift */
.watering-group {
  transition: transform 0.2s var(--ease-out-back-subtle),
              border-color 0.2s ease,
              box-shadow 0.2s ease;
}
.watering-group:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Progress strip smooth color transition on watering */
.watering-group .w-1.flex-shrink-0 {
  transition: background-color 0.5s var(--ease-out-expo);
}

@media (prefers-reduced-motion: reduce) {
  .watering-group button[hx-post]:active,
  .watering-group button[hx-post]:hover,
  .watering-group:hover {
    transform: none;
  }
  .watering-group .w-1.flex-shrink-0 {
    transition: none;
  }
}

@media (max-width: 768px) {
  .watering-group:hover {
    transform: none;
    box-shadow: none;
  }
}

/* Add Plants button press feedback */
button[hx-get*="watering_add_plants"] {
  transition: transform 0.15s var(--ease-out-back-subtle),
              background-color 0.15s ease;
}
button[hx-get*="watering_add_plants"]:active {
  transform: scale(0.95);
}

/* Reorder arrow buttons active press feedback */
.watering-group [x-show="editMode"] button {
  transition: transform 0.1s var(--ease-out-back-subtle);
}
.watering-group [x-show="editMode"] button:active {
  transform: scale(0.85);
}

/* Progress strip pulse on overdue state */
@keyframes watering-pulse-urgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.watering-group .w-1.bg-red-500,
.watering-group .w-1.bg-red-400 {
  animation: watering-pulse-urgent 2s ease-in-out infinite;
}

/* Floating action bar Group button press */
.fixed[x-show] .bg-brand-600 {
  transition: transform 0.15s var(--ease-out-back-subtle),
              background-color 0.15s ease;
}
.fixed[x-show] .bg-brand-600:active {
  transform: scale(0.93);
}

@media (prefers-reduced-motion: reduce) {
  button[hx-get*="watering_add_plants"]:active,
  .watering-group [x-show="editMode"] button:active,
  .fixed[x-show] .bg-brand-600:active {
    transform: none;
  }
  .watering-group .w-1.bg-red-500,
  .watering-group .w-1.bg-red-400 {
    animation: none;
  }
}

/* === PLANNING BOARD POLISH + ANIMATE === */

/* Polish: select dropdown hover feedback */
#planning-board #group-by:hover,
#planning-board #filter-by:hover {
  border-color: var(--color-content-faint);
}

/* Polish: consistent toolbar control heights */
#planning-board .flex-wrap.items-center select,
#planning-board [data-view-toggle],
#planning-board [data-action="toggle-selection-mode"] {
  min-height: 36px;
}

/* Polish: breathing room between toolbar and content */
#planning-board [data-planning-board-content] {
  margin-top: 1rem;
}

/* Polish: multi-select focus ring for keyboard users */
#planning-board [data-action="toggle-selection-mode"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-brand-light);
}


/* Animate: view toggle smooth transition + press feedback */
[data-view-toggle] {
  transition: background-color 0.15s var(--ease-out-expo),
              color 0.15s var(--ease-out-expo),
              box-shadow 0.15s ease;
}
[data-view-toggle]:active {
  transform: scale(0.95);
  transition: transform 0.08s var(--ease-out-expo);
}

/* Animate: search input focus ring expansion */
#planning-search {
  transition: border-color 0.2s var(--ease-out-expo),
              box-shadow 0.2s var(--ease-out-expo);
}

/* Animate: floating action bar enter/exit */
@keyframes planningBarIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes planningBarOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(8px); }
}
.planning-action-bar-enter {
  animation: planningBarIn 0.25s var(--ease-out-expo) both;
}
.planning-action-bar-exit {
  animation: planningBarOut 0.18s cubic-bezier(0.4, 0, 1, 1) both;
}

/* === CAN I GROW POLISH + ANIMATE (impeccable sweep) === */

/* Crop chip button: press feedback + hover lift (animate-5, delight-1) */
.crop-select-btn {
  transition: transform 0.15s var(--ease-out-expo),
              background-color 0.15s ease,
              border-color 0.15s ease,
              box-shadow 0.15s ease;
}
.crop-select-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}
.crop-select-btn:active {
  transform: scale(0.93);
  transition-duration: 0.1s;
  box-shadow: none;
}

/* Selected crop image glow (delight-4) */
.crop-select-btn[aria-pressed='true'] img {
  box-shadow: 0 0 0 2px rgba(196, 111, 70, 0.3), 0 0 8px rgba(196, 111, 70, 0.15);
}
.crop-select-btn img {
  transition: box-shadow 0.2s ease;
}

/* Verdict banner entrance (delight-2, overdrive-2) */
@keyframes verdictArrive {
  from { opacity: 0; transform: scale(0.95) translateY(4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
[data-verdict-banner].flex {
  animation: verdictArrive 0.3s var(--ease-out-bounce) both;
}

/* Climate stats stagger fade-in (delight-3) */
@keyframes climateStatIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
[data-climate-card] .grid > .text-center {
  opacity: 0;
  animation: climateStatIn 0.3s var(--ease-out-expo) forwards;
}
[data-climate-card] .grid > .text-center:nth-child(1) { animation-delay: 0ms; }
[data-climate-card] .grid > .text-center:nth-child(2) { animation-delay: 60ms; }
[data-climate-card] .grid > .text-center:nth-child(3) { animation-delay: 120ms; }

/* Progress bar fill animation (animate-4, delight-5) */
[data-season-bar],
[data-gdd-bar],
[data-daylight-bar] {
  transition: width 0.35s var(--ease-out-expo),
              background-color 0.2s ease;
}
[data-gdd-bar] { transition-delay: 80ms; }
[data-daylight-bar] { transition-delay: 160ms; }

/* Crop detail panel entrance on HTMX swap (animate-2) */
#crop-detail-section:not(.hidden) > [data-crop-detail] {
  animation: hubPanelIn 0.25s var(--ease-out-expo) both;
}

/* Search results dropdown fade+slide (animate-6) */
#crop-search-results {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s var(--ease-out-expo), transform 0.2s var(--ease-out-expo);
}
#crop-search-results:not(:empty) {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll strip fade edge hint (polish-3, critique-4) */
[data-climate-card] .snap-x.overflow-x-auto {
  mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 24px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 24px), transparent);
}

/* Search input warm focus (delight-6) */
[data-climate-card] input[name='q'] {
  transition: box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
[data-climate-card] input[name='q']:focus {
  border-color: var(--color-warning);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.08);
}

/* Reduced motion: disable Can I Grow animations */
@media (prefers-reduced-motion: reduce) {
  .crop-select-btn:hover,
  .crop-select-btn:active { transform: none; }
  [data-verdict-banner].flex { animation: none; }
  [data-climate-card] .grid > .text-center { opacity: 1; animation: none; }
  #crop-detail-section:not(.hidden) > [data-crop-detail] { animation: none; }
  #crop-search-results:not(:empty) { animation: none; }
}

/* === GARDEN PLANS POLISH + ANIMATE (impeccable sweep) === */

/* Progress ring scale-pop entrance */
.plan-progress-ring {
  opacity: 0;
  animation: planRingIn 0.3s var(--ease-out-expo) 0.2s both;
}

@keyframes planRingIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

/* Thumbnail strip stagger entrance */
.plan-thumb-stagger img {
  opacity: 0;
  animation: planThumbPop 0.3s var(--ease-out-expo) both;
}
.plan-thumb-stagger img:nth-child(1) { animation-delay: 80ms; }
.plan-thumb-stagger img:nth-child(2) { animation-delay: 120ms; }
.plan-thumb-stagger img:nth-child(3) { animation-delay: 160ms; }
.plan-thumb-stagger img:nth-child(4) { animation-delay: 200ms; }
.plan-thumb-stagger img:nth-child(5) { animation-delay: 240ms; }
.plan-thumb-stagger img:nth-child(6) { animation-delay: 280ms; }

@keyframes planThumbPop {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}

/* In-season dot single-cycle pulse */
.plan-season-dot {
  display: inline-block;
  animation: planSeasonPulse 0.8s var(--ease-default) 0.4s both;
  animation-iteration-count: 1;
}

@keyframes planSeasonPulse {
  0% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.6); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Favourite star warm glow on card hover */
#garden-plans-grid [role='button']:hover .plan-fav-star {
  filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.5));
}
.plan-fav-star {
  transition: filter 0.2s ease;
}

/* Search input warm focus glow */
#garden-plans-grid input[type='text'] {
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
#garden-plans-grid input[type='text']:focus {
  border-color: var(--color-warning);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.08);
}

/* Card hover shadow lift (applied via hub-card-interactive on plan cards) */
#garden-plans-grid [role='button'] {
  transition: box-shadow 0.15s var(--ease-out-expo),
              background-color 0.15s ease;
}
#garden-plans-grid [role='button']:hover {
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.06),
              0 1px 2px -1px rgb(0 0 0 / 0.06);
}

/* Progress ring stroke transition for re-renders */
#garden-plans-grid svg circle.text-brand-500 {
  transition: stroke-dasharray 0.4s var(--ease-out-expo);
}

/* === GREETING PER-CHARACTER STAGGER === */
@keyframes charReveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.greeting-char {
  display: inline-block;
  animation: charReveal 0.4s var(--ease-out-expo) both;
}
.greeting-char-space {
  width: 0.25em;
}

/* === JOURNAL MICRO-INTERACTIONS === */

/* Tag filter chips — selection transition + press feedback */
.journal-tag-chip {
  transition: background-color 180ms var(--ease-out-back-subtle),
              color 180ms var(--ease-out-back-subtle),
              border-color 180ms var(--ease-out-back-subtle),
              transform 180ms var(--ease-out-back-subtle);
}
.journal-tag-chip:active {
  transform: scale(0.95);
}

/* Rich entry cards — hover lift */
.journal-entry-card {
  transition: transform 200ms var(--ease-out-back-subtle),
              box-shadow 200ms var(--ease-out-back-subtle);
}
@media (hover: hover) {
  .journal-entry-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }
}

/* Calendar day cells — press feedback */
.journal-calendar-cell {
  transition: background-color 150ms ease,
              transform 100ms var(--ease-out-back-subtle);
}
.journal-calendar-cell:active {
  transform: scale(0.98);
}

/* Calendar day cell — hover glow on desktop */
@media (hover: hover) {
  .journal-calendar-cell:hover {
    box-shadow: 0 0 0 1px rgba(58, 140, 75, 0.15),
                0 2px 8px rgba(58, 140, 75, 0.08);
  }
}

/* Action icons on entry cards — hover/press scale */
.journal-entry-action {
  transition: transform 150ms var(--ease-out-back-subtle),
              color 150ms ease;
}
.journal-entry-action:hover {
  transform: scale(1.15);
}
.journal-entry-action:active {
  transform: scale(0.9);
}

/* Calendar navigation arrows — directional hint */
.journal-nav-prev {
  transition: transform 150ms var(--ease-out-back-subtle);
}
.journal-nav-prev:hover {
  transform: translateX(-2px);
}
.journal-nav-prev:active {
  transform: translateX(-4px);
}
.journal-nav-next {
  transition: transform 150ms var(--ease-out-back-subtle);
}
.journal-nav-next:hover {
  transform: translateX(2px);
}
.journal-nav-next:active {
  transform: translateX(4px);
}

/* Filter chip dismiss buttons — press feedback */
.journal-chip-dismiss {
  transition: transform 100ms var(--ease-out-back-subtle),
              color 150ms ease;
}
.journal-chip-dismiss:hover {
  transform: scale(1.2);
}
.journal-chip-dismiss:active {
  transform: scale(0.8);
}

/* Milestone chip — press feedback */
.group\/chip:active {
  transform: scale(0.97);
  transition: transform 0.1s var(--ease-out-back-subtle);
}

/* Photo gallery — hover zoom peek */
.journal-photo-wrap {
  overflow: hidden;
  border-radius: 0.5rem;
}
.journal-photo-wrap img {
  transition: transform 0.25s var(--ease-out-back-subtle);
}
@media (hover: hover) {
  .journal-photo-wrap:hover img {
    transform: scale(1.03);
  }
}

/* Bottom sheet drag handle — active feedback */
.sheet-handle {
  transition: width 0.2s var(--ease-out-back-subtle),
              background-color 0.2s;
}
.sheet-handle:active {
  width: 3.5rem;
  background-color: rgba(58, 140, 75, 0.3);
}

/* Sticky date header — reduced-motion respect for backdrop-blur */
@media (prefers-reduced-motion: reduce) {
  .journal-date-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background-color: var(--color-surface-alt);
  }
}

/* === COMPANION ANALYSIS — hover/focus/active polish === */

/* Stat cards hover lift */
.companion-stat-card {
  transition: transform 200ms var(--ease-out-back-subtle),
              box-shadow 200ms var(--ease-out-back-subtle);
}
@media (hover: hover) {
  .companion-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
}

/* Conflict/pairing row hover */
.companion-row {
  transition: transform 150ms var(--ease-out-back-subtle),
              filter 150ms var(--ease-out-back-subtle);
}
@media (hover: hover) {
  .companion-row:hover {
    transform: translateX(4px);
    filter: brightness(1.02);
  }
}

/* Connector symbol wiggle on row hover (delight-2) */
.companion-connector {
  display: inline-block;
  transition: transform 200ms var(--ease-out-back-subtle);
}
@media (hover: hover) {
  .companion-row:hover .companion-connector {
    animation: companionConnectorWiggle 400ms var(--ease-out-back-subtle);
  }
}
@keyframes companionConnectorWiggle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Staggered entrance for rows on section expand (delight-4) */
.companion-stagger-list .companion-stagger-item {
  animation: companionRowIn 0.3s var(--ease-out-expo) both;
}
.companion-stagger-list .companion-stagger-item:nth-child(1) { animation-delay: 0ms; }
.companion-stagger-list .companion-stagger-item:nth-child(2) { animation-delay: 40ms; }
.companion-stagger-list .companion-stagger-item:nth-child(3) { animation-delay: 80ms; }
.companion-stagger-list .companion-stagger-item:nth-child(4) { animation-delay: 120ms; }
.companion-stagger-list .companion-stagger-item:nth-child(5) { animation-delay: 160ms; }
.companion-stagger-list .companion-stagger-item:nth-child(6) { animation-delay: 200ms; }
.companion-stagger-list .companion-stagger-item:nth-child(n+7) { animation-delay: 240ms; }

@keyframes companionRowIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Chevron rotation — expo ease-out */
.companion-chevron {
  transition: transform 300ms var(--ease-out-expo) !important;
}

/* Search input focus glow */
.companion-search-input {
  transition: border-color 200ms var(--ease-out-back-subtle),
              box-shadow 200ms var(--ease-out-back-subtle);
}
.companion-search-input:focus {
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(58, 140, 75, 0.15);
  outline: none;
}

/* Section toggle press feedback */
.companion-section-toggle {
  transition: transform 100ms var(--ease-out-back-subtle);
}
.companion-section-toggle:active {
  transform: scale(0.99);
}

/* Reduced motion: disable companion animations */
@media (prefers-reduced-motion: reduce) {
  .companion-stagger-list .companion-stagger-item {
    animation: none;
    opacity: 1;
  }
  .companion-row:hover .companion-connector {
    animation: none;
  }
}

/* ─── Extras / Systems cards ─── */
#extras-list .grid > a {
  transition: transform 0.2s var(--ease-out-expo),
              box-shadow 0.2s var(--ease-out-expo),
              border-color 0.2s ease;
}
#extras-list .grid > a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(120, 100, 60, 0.08);
}
#extras-list .grid > a:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
  box-shadow: none;
}
@media (max-width: 768px) {
  #extras-list .grid > a:hover {
    transform: none;
    box-shadow: none;
  }
}
/* Emoji icon pop on card hover */
#extras-list .grid > a .text-2xl {
  display: inline-block;
  transition: transform 0.2s var(--ease-out-expo);
}
#extras-list .grid > a:hover .text-2xl {
  transform: scale(1.15);
}
/* Action button press feedback */
#extras-list .grid > a button {
  transition: transform 0.1s var(--ease-out-expo),
              background-color 0.15s ease, color 0.15s ease;
}
#extras-list .grid > a button:active {
  transform: scale(0.85);
  transition-duration: 0.08s;
}
/* Add Extra CTA press feedback */
.space-y-6 > .flex > button.bg-brand-600 {
  transition: background-color 0.15s ease,
              transform 0.15s var(--ease-out-expo),
              box-shadow 0.15s ease;
}
.space-y-6 > .flex > button.bg-brand-600:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(58, 140, 75, 0.25);
}
.space-y-6 > .flex > button.bg-brand-600:active {
  transform: scale(0.95);
  transition-duration: 0.08s;
  box-shadow: none;
}
/* Reduced motion: disable all extras animations */
@media (prefers-reduced-motion: reduce) {
  #extras-list .grid > a:hover,
  #extras-list .grid > a:active,
  #extras-list .grid > a:hover .text-2xl,
  #extras-list .grid > a button:active,
  .space-y-6 > .flex > button.bg-brand-600:hover,
  .space-y-6 > .flex > button.bg-brand-600:active {
    transform: none;
    box-shadow: none;
  }
}

/* === SEASONAL PLANT DETAIL POLISH + ANIMATE (impeccable sweep) === */

/* Add Event button — hover lift + active press */
[data-tour-scope="seasonal-plant-detail"] .bg-brand-600 {
  transition: transform 0.15s var(--ease-out-expo),
              box-shadow 0.15s ease,
              background-color 0.15s ease;
}
[data-tour-scope="seasonal-plant-detail"] .bg-brand-600:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 72, 37, 0.2);
}
[data-tour-scope="seasonal-plant-detail"] .bg-brand-600:active {
  transform: scale(0.95);
  transition-duration: 0.08s;
  box-shadow: none;
}

/* Back/nav buttons — directional hover shift */
[data-tour-scope="seasonal-plant-detail"] .bg-surface-alt {
  transition: transform 0.2s var(--ease-out-expo),
              background-color 0.15s ease;
}
[data-tour-scope="seasonal-plant-detail"] .bg-surface-alt:hover {
  transform: translateX(-2px);
}
[data-tour-scope="seasonal-plant-detail"] .bg-surface-alt:active {
  transform: translateX(-1px) scale(0.97);
  transition-duration: 0.08s;
}

/* Plant image — hover zoom (desktop only) */
[data-tour-scope="seasonal-plant-detail"] .object-cover {
  transition: transform 0.3s var(--ease-out-expo);
}
@media (hover: hover) {
  [data-tour-scope="seasonal-plant-detail"] .object-cover:hover {
    transform: scale(1.08);
  }
}

/* Lifecycle badge — hover emphasis */
[data-tour-scope="seasonal-plant-detail"] .rounded-full.text-xs {
  transition: transform 0.2s var(--ease-out-expo),
              box-shadow 0.2s ease;
}
[data-tour-scope="seasonal-plant-detail"] .rounded-full.text-xs:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(22, 72, 37, 0.15);
}

/* Tab buttons — smooth transition + press feedback */
[data-tour-scope="seasonal-plant-detail"] [role="tab"],
[data-tour-scope="seasonal-plant-detail"] .border-b button {
  transition: border-color 0.25s var(--ease-out-expo),
              color 0.2s ease;
}
[data-tour-scope="seasonal-plant-detail"] [role="tab"]:active,
[data-tour-scope="seasonal-plant-detail"] .border-b button:active {
  transform: scale(0.97);
  transition: transform 0.08s var(--ease-out-expo);
}

@media (prefers-reduced-motion: reduce) {
  [data-tour-scope="seasonal-plant-detail"] .bg-brand-600:hover,
  [data-tour-scope="seasonal-plant-detail"] .bg-brand-600:active,
  [data-tour-scope="seasonal-plant-detail"] .bg-surface-alt:hover,
  [data-tour-scope="seasonal-plant-detail"] .bg-surface-alt:active,
  [data-tour-scope="seasonal-plant-detail"] .object-cover:hover,
  [data-tour-scope="seasonal-plant-detail"] .rounded-full.text-xs:hover,
  [data-tour-scope="seasonal-plant-detail"] [role="tab"]:active,
  [data-tour-scope="seasonal-plant-detail"] .border-b button:active {
    transform: none;
    box-shadow: none;
  }
}

/* =====================================================
 * Permanent Plant Detail — hover/active/focus animations
 * impeccable(polish+animate): safe for HTMX swap (no entrance animations)
 * ===================================================== */

/* Add Event button: hover lift + active press */
[data-tour-scope="permanent-plant-detail"] .bg-brand-600 {
  transition: transform 0.15s var(--ease-out-expo),
              box-shadow 0.15s ease,
              background-color 0.15s ease;
}
[data-tour-scope="permanent-plant-detail"] .bg-brand-600:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 72, 37, 0.2);
}
[data-tour-scope="permanent-plant-detail"] .bg-brand-600:active {
  transform: scale(0.95);
  transition-duration: 0.08s;
  box-shadow: none;
}

/* Edit Plant button: hover lift + active press */
[data-tour-scope="permanent-plant-detail"] .border-brand-600 {
  transition: transform 0.15s var(--ease-out-expo),
              box-shadow 0.15s ease,
              background-color 0.15s ease,
              border-color 0.15s ease;
}
[data-tour-scope="permanent-plant-detail"] .border-brand-600:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(22, 72, 37, 0.1);
}
[data-tour-scope="permanent-plant-detail"] .border-brand-600:active {
  transform: scale(0.95);
  transition-duration: 0.08s;
  box-shadow: none;
}

/* Tab button: press feedback + smooth border transition */
[data-tour-scope="permanent-plant-detail"] .tab-button {
  transition: border-color 0.25s var(--ease-out-expo),
              color 0.2s ease,
              transform 0.1s var(--ease-out-expo);
}
[data-tour-scope="permanent-plant-detail"] .tab-button:active {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

/* Tab button: visual continuity during HTMX request */
[data-tour-scope="permanent-plant-detail"] .tab-button.htmx-request {
  opacity: 0.7;
}

/* Plant image: hover zoom on desktop */
[data-tour-scope="permanent-plant-detail"] .object-cover {
  transition: transform 0.3s var(--ease-out-expo),
              box-shadow 0.3s var(--ease-out-expo);
}
@media (hover: hover) {
  [data-tour-scope="permanent-plant-detail"] .object-cover:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px -4px rgba(22, 72, 37, 0.15);
  }
}

/* Back link: directional hover shift */
[data-tour-scope="permanent-plant-detail"] a[href*="plants"].text-content-muted {
  transition: transform 0.2s var(--ease-out-expo),
              color 0.15s ease;
}
[data-tour-scope="permanent-plant-detail"] a[href*="plants"].text-content-muted:hover {
  transform: translateX(-2px);
}
[data-tour-scope="permanent-plant-detail"] a[href*="plants"].text-content-muted:active {
  transform: translateX(-1px) scale(0.97);
  transition-duration: 0.08s;
}

/* Reduced motion safety net */
@media (prefers-reduced-motion: reduce) {
  [data-tour-scope="permanent-plant-detail"] .bg-brand-600:hover,
  [data-tour-scope="permanent-plant-detail"] .bg-brand-600:active,
  [data-tour-scope="permanent-plant-detail"] .border-brand-600:hover,
  [data-tour-scope="permanent-plant-detail"] .border-brand-600:active,
  [data-tour-scope="permanent-plant-detail"] .object-cover:hover,
  [data-tour-scope="permanent-plant-detail"] .tab-button:active,
  [data-tour-scope="permanent-plant-detail"] a[href*="plants"].text-content-muted:hover,
  [data-tour-scope="permanent-plant-detail"] a[href*="plants"].text-content-muted:active {
    transform: none;
    box-shadow: none;
  }
  [data-tour-scope="permanent-plant-detail"] .animate-spin {
    animation: none;
    opacity: 0.7;
  }
}

/* ============================================================
   Season Review — hover/active/focus states
   ============================================================ */

/* Stat card hover lift and press */
.review-stat-card {
  transition: transform 0.2s var(--ease-out-expo),
              box-shadow 0.2s var(--ease-out-expo);
}
.review-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(120, 100, 60, 0.08);
}
.review-stat-card:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
}

/* Performer plant card hover highlight */
.review-performer-card {
  transition: transform 0.2s var(--ease-out-expo),
              box-shadow 0.2s ease;
}
.review-performer-card:hover {
  transform: translateX(3px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Back to Dashboard link directional shift */
.review-back-link {
  transition: transform 0.2s var(--ease-out-expo),
              background-color 0.15s ease;
}
.review-back-link:hover {
  transform: translateX(-2px);
}
.review-back-link:active {
  transform: translateX(-1px) scale(0.97);
  transition-duration: 0.08s;
}

/* CTA button press feedback */
.review-section .btn-primary {
  transition: transform 0.15s var(--ease-out-expo),
              box-shadow 0.15s ease,
              background-color 0.15s ease;
}
.review-section .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 72, 37, 0.2);
}
.review-section .btn-primary:active {
  transform: scale(0.95);
  transition-duration: 0.08s;
  box-shadow: none;
}

/* Disable motion-based hover on mobile for performer cards */
@media (max-width: 768px) {
  .review-performer-card:hover {
    transform: none;
    box-shadow: none;
  }
}

/* Reduced motion safety net for season review */
@media (prefers-reduced-motion: reduce) {
  .review-stat-card:hover,
  .review-stat-card:active,
  .review-performer-card:hover,
  .review-back-link:hover,
  .review-back-link:active,
  .review-section .btn-primary:hover,
  .review-section .btn-primary:active {
    transform: none;
    box-shadow: none;
  }
}

/* ==========================================================================
   Soil Studio — interaction polish
   ========================================================================== */

/* Tab indicator smooth transition on switch */
.soil-studio-tab {
  transition: border-color 200ms var(--ease-out-back-subtle),
              color 200ms var(--ease-out-back-subtle);
}

/* Card hover lift + shadow */
#ingredients-tab .border.rounded-lg,
#mixes-tab .border.rounded-lg {
  transition: box-shadow 200ms var(--ease-out-back-subtle),
              transform 200ms var(--ease-out-back-subtle);
}
#ingredients-tab .border.rounded-lg:hover,
#mixes-tab .border.rounded-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}
#ingredients-tab .border.rounded-lg:active,
#mixes-tab .border.rounded-lg:active {
  transform: translateY(0);
  transition-duration: 100ms;
}

/* CTA button press scale */
#soil-studio-container .bg-brand-600 {
  transition: background-color 150ms var(--ease-out-back-subtle),
              transform 100ms var(--ease-out-back-subtle);
}
#soil-studio-container .bg-brand-600:active {
  transform: scale(0.97);
}

/* Edit/delete icon hover scale */
#soil-studio-container .text-brand-600 svg,
#soil-studio-container .text-red-600 svg {
  transition: transform 150ms var(--ease-out-back-subtle);
}
#soil-studio-container .text-brand-600:hover svg,
#soil-studio-container .text-red-600:hover svg {
  transform: scale(1.15);
}

/* Reduced motion safety net for soil studio */
@media (prefers-reduced-motion: reduce) {
  .soil-studio-tab {
    transition-duration: 0.01ms !important;
  }
  #ingredients-tab .border.rounded-lg,
  #mixes-tab .border.rounded-lg {
    transition-duration: 0.01ms !important;
  }
  #ingredients-tab .border.rounded-lg:hover,
  #mixes-tab .border.rounded-lg:hover {
    transform: none;
  }
  #soil-studio-container .bg-brand-600 {
    transition-duration: 0.01ms !important;
  }
  #soil-studio-container .text-brand-600 svg,
  #soil-studio-container .text-red-600 svg {
    transition-duration: 0.01ms !important;
  }
}

/* ===== Garden Resources: hover/press micro-interactions ===== */

/* CTA button hover lift and press feedback */
#garden-resources-hub .bg-brand-600,
#garden-resources-hub .bg-purple-600 {
  transition: transform 0.15s var(--ease-out-expo),
              box-shadow 0.15s ease,
              background-color 0.15s ease;
}
#garden-resources-hub .bg-brand-600:hover,
#garden-resources-hub .bg-purple-600:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 72, 37, 0.2);
}
#garden-resources-hub .bg-brand-600:active,
#garden-resources-hub .bg-purple-600:active {
  transform: scale(0.95);
  transition-duration: 0.08s;
  box-shadow: none;
}

/* Edit/delete icon button hover scale and press feedback */
#garden-resources-hub .rounded-full svg {
  transition: transform 150ms var(--ease-out-back-subtle);
}
#garden-resources-hub .rounded-full:hover svg {
  transform: scale(1.15);
}
#garden-resources-hub .rounded-full:active svg {
  transform: scale(0.9);
}

/* Need card hover lift on desktop */
#garden-resources-hub .bg-surface-tint.rounded-lg {
  transition: transform 200ms var(--ease-out-back-subtle),
              box-shadow 200ms var(--ease-out-back-subtle);
}
@media (hover: hover) {
  #garden-resources-hub .bg-surface-tint.rounded-lg:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }
}

/* Summary stat card hover lift */
#garden-resources-hub .bg-brand-100 {
  transition: transform 200ms var(--ease-out-back-subtle),
              box-shadow 200ms var(--ease-out-back-subtle);
}
@media (hover: hover) {
  #garden-resources-hub .bg-brand-100:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(120, 100, 60, 0.08);
  }
}

/* Reduced motion: disable all garden-resources interactions */
@media (prefers-reduced-motion: reduce) {
  #garden-resources-hub .bg-brand-600,
  #garden-resources-hub .bg-purple-600,
  #garden-resources-hub .rounded-full svg,
  #garden-resources-hub .bg-surface-tint.rounded-lg,
  #garden-resources-hub .bg-brand-100 {
    transition: none !important;
  }
  #garden-resources-hub .bg-brand-600:hover,
  #garden-resources-hub .bg-brand-600:active,
  #garden-resources-hub .bg-purple-600:hover,
  #garden-resources-hub .bg-purple-600:active,
  #garden-resources-hub .rounded-full:hover svg,
  #garden-resources-hub .rounded-full:active svg,
  #garden-resources-hub .bg-surface-tint.rounded-lg:hover,
  #garden-resources-hub .bg-brand-100:hover {
    transform: none !important;
    box-shadow: none !important;
  }
}

/* ============================================================
   Shopping List — hover/active micro-interactions
   ============================================================ */

/* Button press feedback */
#shopping-list-summary .inline-flex:active,
#shopping-list-summary button:active {
  transform: scale(0.97);
  transition: transform 100ms var(--ease-out-back-subtle);
}
#shopping-list-summary .inline-flex,
#shopping-list-summary button {
  transition: transform 100ms var(--ease-out-back-subtle);
}

/* Breakdown row hover highlight */
#shopping-list-summary .space-y-2 > .flex.justify-between {
  transition: background-color 150ms ease, transform 150ms var(--ease-out-back-subtle);
}
#shopping-list-summary .space-y-2 > .flex.justify-between:hover {
  background-color: var(--color-surface-tint);
  transform: translateX(2px);
}

/* Material card border highlight on hover */
#shopping-list-summary .border.border-surface-border.rounded-lg.p-6 {
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
#shopping-list-summary .border.border-surface-border.rounded-lg.p-6:hover {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 1px var(--color-brand-light);
}

/* Progress card status pulse on hover */
@keyframes status-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
#shopping-list-summary .bg-brand-50:hover .text-brand-700,
#shopping-list-summary .bg-brand-50:hover .text-brand-600 {
  animation: status-pulse 600ms var(--ease-out-back-subtle) 1;
}

/* Shopping totals grid card hover lift */
.bg-gradient-to-r .grid .bg-surface-tint {
  transition: transform 200ms var(--ease-out-back-subtle), box-shadow 200ms ease;
}
.bg-gradient-to-r .grid .bg-surface-tint:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Print button hover lift */
#shopping-list-summary button[onclick="printShoppingList()"] {
  transition: transform 0.2s var(--ease-out-back-subtle), box-shadow 0.2s ease;
}
#shopping-list-summary button[onclick="printShoppingList()"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(147, 51, 234, 0.2);
}
#shopping-list-summary button[onclick="printShoppingList()"]:hover svg {
  transform: translateY(-1px);
  transition: transform 0.2s var(--ease-out-back-subtle);
}

/* Reduced motion: disable all shopping list animations */
@media (prefers-reduced-motion: reduce) {
  #shopping-list-summary .inline-flex:active,
  #shopping-list-summary button:active,
  #shopping-list-summary .space-y-2 > .flex.justify-between:hover,
  #shopping-list-summary .border.border-surface-border.rounded-lg.p-6:hover,
  .bg-gradient-to-r .grid .bg-surface-tint:hover,
  #shopping-list-summary button[onclick="printShoppingList()"]:hover,
  #shopping-list-summary button[onclick="printShoppingList()"]:hover svg {
    transform: none !important;
    box-shadow: none !important;
    animation: none !important;
  }
  #shopping-list-summary .bg-brand-50:hover .text-brand-700,
  #shopping-list-summary .bg-brand-50:hover .text-brand-600 {
    animation: none;
  }
}

/* ===== Billing: button text ↔ spinner crossfade during HTMX requests ===== */
.button-text {
  transition: opacity 150ms var(--ease-out-back-subtle);
}
.htmx-request .button-text {
  opacity: 0;
}
.loading-spinner {
  transition: opacity 150ms var(--ease-out-back-subtle);
  opacity: 0;
}
.htmx-request .loading-spinner {
  opacity: 1;
  display: inline-flex !important;
}
@media (prefers-reduced-motion: reduce) {
  .button-text,
  .loading-spinner {
    transition: none;
  }
}

/* === CARE "ALL CAUGHT UP" CELEBRATION === */

.caught-up-icon {
  animation: hubChipIn 0.3s var(--ease-out-expo) 0.1s both,
             planSeasonPulse 0.8s var(--ease-default) 0.4s both;
  animation-iteration-count: 1, 1;
}

.caught-up-heading {
  animation: hubPanelIn 0.25s var(--ease-out-expo) 0.2s both;
}

.caught-up-subtext {
  animation: hubPanelIn 0.25s var(--ease-out-expo) 0.35s both;
}

/* === CARE ACTION BUTTON PRESS FEEDBACK === */

.care-action-btn {
  transition: transform 0.1s var(--ease-out-expo),
              background-color 0.15s ease;
}
.care-action-btn:active {
  transform: scale(0.95);
  transition-duration: 0.08s;
}

@media (prefers-reduced-motion: reduce) {
  .care-action-btn:active {
    transform: none;
  }
}

/* === PLAN ADOPTION CELEBRATION === */

.plan-adopt-icon {
  animation: verdictArrive 0.3s var(--ease-out-bounce) both;
}

.plan-adopt-heading {
  animation: hubPanelIn 0.25s var(--ease-out-expo) 0.15s both;
}

.plan-adopt-subtitle {
  animation: hubPanelIn 0.25s var(--ease-out-expo) 0.25s both;
}

.plan-adopt-list {
  animation: hubPanelIn 0.25s var(--ease-out-expo) 0.35s both;
}

@media (prefers-reduced-motion: reduce) {
  .plan-adopt-icon,
  .plan-adopt-heading,
  .plan-adopt-subtitle,
  .plan-adopt-list {
    animation: none;
    opacity: 1;
  }
}
