/* Apple-grade Minimalism & Elegance for T-Nesting */

@layer utilities {
  .ai-text-shimmer {
    background: linear-gradient(
      90deg,
      #38bdf8 0%,
      #818cf8 25%,
      #c084fc 50%,
      #f472b6 75%,
      #38bdf8 100%
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer 5s linear infinite;
  }
}

@keyframes shimmer {
  to {
    background-position: 200% center;
  }
}

/* Custom Minimalist Scrollbars */
.scrollbar-thin::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Apple Smooth Animations */
.chat-fade-in {
  animation: appleFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Typing Indicator */
.typing-dot {
  animation: appleTyping 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes appleTyping {
  0%, 80%, 100% { transform: scale(0.4); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* Rapid toolpath line */
.sim-rapid-line {
  stroke-dasharray: 4, 4;
  animation: toolpathDash 20s linear infinite;
}

@keyframes toolpathDash {
  to {
    stroke-dashoffset: -120;
  }
}

/* Interactive SVG hover */
#simSvg .sheet-part {
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
}

#simSvg .sheet-part:hover path,
#simSvg .sheet-part:hover circle,
#simSvg .sheet-part:hover polygon,
#simSvg .sheet-part:hover rect {
  stroke: #ffffff !important;
  stroke-width: 2 !important;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}
