/* --- PREMIUM TECH CHIP (Deep Hydro Edition) --- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px; /* Asymmetric padding for optical balance with dot */
  
  background: 
    linear-gradient(180deg, var(--glass-bg-light) 0%, transparent 100%),
    var(--surface-cyan-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  
  box-shadow: 
    0 4px 20px -4px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 var(--glass-highlight); /* Top highlight */
    
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  z-index: 10;
}

/* Hover State: "Activation" */
.chip:hover {
  transform: translateY(-2px);
  border-color: var(--surface-cyan-border);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--text);
  box-shadow: 
    0 10px 30px -5px var(--brand-glow), /* Cyan glow */
    inset 0 0 0 1px color-mix(in srgb, var(--brand) 20%, transparent); /* Inner glow */
}

/* Click State */
.chip:active {
  transform: translateY(0) scale(0.98);
}

/* --- THE PULSING DOT (Sensor Status) --- */
.chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  position: relative;
  box-shadow: 0 0 10px var(--brand);
}

/* Inner Core Pulse (Heartbeat) */
.chip .dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--text);
  opacity: 0.6;
  animation: corePulse 3s ease-in-out infinite;
}

/* Outer Ripple (Radar Wave) */
.chip .dot::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 100%;
  border: 1px solid var(--brand);
  border-radius: 50%;
  opacity: 0;
  animation: rippleOut 3s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Hover Enhancement for Dot */
.chip:hover .dot {
  background: var(--text);
  box-shadow: 0 0 15px var(--text), 0 0 5px var(--brand);
}

/* --- SHIMMER EFFECT (Glass Reflection) --- */
.chip::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--stroke-strong),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.chip:hover::after {
  left: 150%;
  transition: left 0.8s ease;
}

/* --- ANIMATIONS --- */
@keyframes corePulse {
  0%, 100% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1); opacity: 0.9; }
}

@keyframes rippleOut {
  0% { width: 100%; height: 100%; opacity: 0.8; border-width: 1px; }
  100% { width: 300%; height: 300%; opacity: 0; border-width: 0; }
}

/* --- MAGNETIC VARIANT (Optional JS hook class) --- */
.chip.magnetic {
  /* Smoother transition for JS-driven movement */
  transition: transform 0.1s linear, background 0.3s ease, border-color 0.3s ease; 
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  .chip, .chip::after { transition: none; }
  .chip:hover { transform: none; }
  .chip .dot::before, .chip .dot::after { animation: none; }
  .chip:hover::after { display: none; }
}