/* muimui shop · svg icon library — no emoji anywhere */
/* every icon takes { size, color, stroke } props */

const Icon = ({ children, size = 16, color = 'currentColor', viewBox = '0 0 24 24', style }) => (
  <svg
    xmlns="http://www.w3.org/2000/svg"
    width={size}
    height={size}
    viewBox={viewBox}
    fill="none"
    stroke={color}
    strokeWidth="1.6"
    strokeLinecap="round"
    strokeLinejoin="round"
    style={style}
    aria-hidden="true"
  >
    {children}
  </svg>
);

const Heart = ({ size = 14, color = '#FF8FB1', filled = true, style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill={filled ? color : 'none'} stroke={color} strokeWidth="1.6" style={style} aria-hidden="true">
    <path d="M12 20.5s-7-4.6-9.2-9.1C1.3 8 3.4 4 7 4c2 0 3.6 1.1 5 3 1.4-1.9 3-3 5-3 3.6 0 5.7 4 4.2 7.4C19 15.9 12 20.5 12 20.5z" />
  </svg>
);

const HeartOutline = (props) => <Heart {...props} filled={false} />;

const Sparkle = ({ size = 14, color = '#FF8FB1', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill={color} style={style} aria-hidden="true">
    <path d="M12 2 L13.2 10.8 L22 12 L13.2 13.2 L12 22 L10.8 13.2 L2 12 L10.8 10.8 Z" />
  </svg>
);

const SparkleSmall = ({ size = 8, color = '#FF8FB1', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill={color} style={style} aria-hidden="true">
    <path d="M12 4 L13.5 10.5 L20 12 L13.5 13.5 L12 20 L10.5 13.5 L4 12 L10.5 10.5 Z" />
  </svg>
);

const Flower = ({ size = 18, color = '#FF8FB1', center = '#FBF6F0', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 32 32" style={style} aria-hidden="true">
    <g fill={color}>
      <ellipse cx="16" cy="8" rx="4" ry="5.5"/>
      <ellipse cx="16" cy="24" rx="4" ry="5.5"/>
      <ellipse cx="8" cy="16" rx="5.5" ry="4"/>
      <ellipse cx="24" cy="16" rx="5.5" ry="4"/>
    </g>
    <circle cx="16" cy="16" r="3" fill={center} />
  </svg>
);

const PixelStar = ({ size = 10, color = '#FF8FB1', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 10 10" style={style} aria-hidden="true" shapeRendering="crispEdges">
    <g fill={color}>
      <rect x="4" y="0" width="2" height="2"/>
      <rect x="4" y="8" width="2" height="2"/>
      <rect x="0" y="4" width="2" height="2"/>
      <rect x="8" y="4" width="2" height="2"/>
      <rect x="2" y="2" width="2" height="2"/>
      <rect x="6" y="6" width="2" height="2"/>
      <rect x="2" y="6" width="2" height="2"/>
      <rect x="6" y="2" width="2" height="2"/>
      <rect x="4" y="4" width="2" height="2"/>
    </g>
  </svg>
);

const Palette = ({ size = 18, color = '#C8758B', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24" style={style} aria-hidden="true">
    <path d="M12 3c-5 0-9 3.6-9 8 0 3 2.2 5 5 5h1.5c1 0 1.5.6 1.5 1.5 0 .6-.4 1-.4 1.7 0 1 .9 1.8 2 1.8 5 0 8.4-3.6 8.4-8C21 6.6 17 3 12 3z"
          fill="none" stroke={color} strokeWidth="1.6" strokeLinejoin="round"/>
    <circle cx="7.5" cy="11" r="1.3" fill="#FF8FB1"/>
    <circle cx="10.5" cy="7.5" r="1.3" fill="#FFD580"/>
    <circle cx="14.5" cy="7.5" r="1.3" fill="#B8A8E8"/>
    <circle cx="17" cy="11" r="1.3" fill="#A8D8B8"/>
  </svg>
);

const CharacterFigure = ({ size = 18, color = '#C8758B', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <circle cx="12" cy="6.5" r="3"/>
    <path d="M7 21v-5c0-2.8 2.2-5 5-5s5 2.2 5 5v5"/>
    <path d="M9.5 14h5"/>
  </svg>
);

const Cube = ({ size = 18, color = '#C8758B', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <path d="M12 3 L21 7.5 L21 16.5 L12 21 L3 16.5 L3 7.5 Z"/>
    <path d="M3 7.5 L12 12 L21 7.5"/>
    <path d="M12 12 L12 21"/>
  </svg>
);

const Camera = ({ size = 18, color = '#C8758B', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <path d="M3 8.5a2 2 0 0 1 2-2h2.2l1.4-1.8a1 1 0 0 1 .8-.4h5.2a1 1 0 0 1 .8.4l1.4 1.8H19a2 2 0 0 1 2 2v9.5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
    <circle cx="12" cy="13" r="3.5"/>
    <circle cx="17.5" cy="9.5" r="0.6" fill={color}/>
  </svg>
);

const Mail = ({ size = 18, color = '#C8758B', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <rect x="3" y="5.5" width="18" height="13" rx="2"/>
    <path d="M3.5 7 L12 13 L20.5 7"/>
  </svg>
);

const Pencil = ({ size = 18, color = '#C8758B', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <path d="M16.5 4.5 L19.5 7.5 L7.5 19.5 L4 20 L4.5 16.5 Z"/>
    <path d="M14 7 L17 10"/>
  </svg>
);

const Lightbulb = ({ size = 18, color = '#C8758B', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <path d="M9 17h6"/>
    <path d="M10 20h4"/>
    <path d="M12 3.5a6 6 0 0 0-3.6 10.8c.6.4 1 1.1 1 1.8V17h5.2v-.9c0-.7.4-1.4 1-1.8A6 6 0 0 0 12 3.5z"/>
  </svg>
);

const Clipboard = ({ size = 18, color = '#C8758B', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <rect x="5" y="5" width="14" height="16" rx="2"/>
    <path d="M9 5V4a1.5 1.5 0 0 1 1.5-1.5h3A1.5 1.5 0 0 1 15 4v1"/>
    <path d="M8.5 11 L11 13 L15.5 9"/>
  </svg>
);

const Clock = ({ size = 16, color = '#C8758B', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <circle cx="12" cy="12" r="8.5"/>
    <path d="M12 7.5 L12 12 L15 14"/>
  </svg>
);

const LockHeart = ({ size = 64, color = '#C8758B', fill = '#FF8FB1', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 64 64" style={style} aria-hidden="true">
    {/* shackle */}
    <path d="M22 26v-4a10 10 0 0 1 20 0v4" fill="none" stroke={color} strokeWidth="2.5" strokeLinecap="round"/>
    {/* heart body */}
    <path d="M32 56s-18-10-18-22c0-6 5-10 10-10 3.6 0 6 2 8 5 2-3 4.4-5 8-5 5 0 10 4 10 10 0 12-18 22-18 22z"
          fill={fill} stroke={color} strokeWidth="1.8" strokeLinejoin="round"/>
    {/* keyhole */}
    <circle cx="32" cy="38" r="2.5" fill={color}/>
    <rect x="31" y="38" width="2" height="6" fill={color}/>
  </svg>
);

const ChevronDown = ({ size = 14, color = 'currentColor', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <path d="M6 9 L12 15 L18 9"/>
  </svg>
);

const Check = ({ size = 14, color = '#7BA888', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <path d="M5 12 L10 17 L19 7"/>
  </svg>
);

const Cross = ({ size = 14, color = '#D88080', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <path d="M6 6 L18 18"/>
    <path d="M18 6 L6 18"/>
  </svg>
);

const Spinner = ({ size = 14, color = '#B8A8E8', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="2.2" strokeLinecap="round" style={{ animation: 'spin 800ms linear infinite', ...(style||{}) }} aria-hidden="true">
    <path d="M12 3 a9 9 0 0 1 9 9" />
  </svg>
);

const Warning = ({ size = 14, color = '#D9A040', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <path d="M12 4 L21 19 L3 19 Z"/>
    <path d="M12 10 L12 14"/>
    <circle cx="12" cy="17" r="0.8" fill={color}/>
  </svg>
);

const ArrowLeft = ({ size = 14, color = 'currentColor', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <path d="M14 7 L8 12 L14 17"/>
    <path d="M8 12 L20 12"/>
  </svg>
);

const ArrowRight = ({ size = 14, color = 'currentColor', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <path d="M10 7 L16 12 L10 17"/>
    <path d="M16 12 L4 12"/>
  </svg>
);

const ExternalLink = ({ size = 14, color = 'currentColor', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <path d="M14 4 L20 4 L20 10"/>
    <path d="M20 4 L11 13"/>
    <path d="M18 14 V19 a1 1 0 0 1 -1 1 H5 a1 1 0 0 1 -1 -1 V7 a1 1 0 0 1 1 -1 H10"/>
  </svg>
);

const InfoCircle = ({ size = 16, color = '#C8758B', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <circle cx="12" cy="12" r="9"/>
    <path d="M12 8 L12 8.2"/>
    <path d="M12 11 L12 16"/>
  </svg>
);

const Download = ({ size = 14, color = 'currentColor', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <path d="M12 4 L12 16"/>
    <path d="M7 11 L12 16 L17 11"/>
    <path d="M5 20 L19 20"/>
  </svg>
);

const CheckCircle = ({ size = 32, color = '#7BA888', fill = '#E2EDDF', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 32 32" style={style} aria-hidden="true">
    <circle cx="16" cy="16" r="14" fill={fill} stroke={color} strokeWidth="2"/>
    <path d="M10 16 L14.5 20.5 L23 12" fill="none" stroke={color} strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round"/>
  </svg>
);

const Eye = ({ size = 16, color = '#C8758B', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <path d="M2.5 12 S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12 Z"/>
    <circle cx="12" cy="12" r="2.5"/>
  </svg>
);

const EyeOff = ({ size = 16, color = '#C8758B', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <path d="M3 3 L21 21"/>
    <path d="M6.5 7.5 C 4 9.5 2.5 12 2.5 12 S 6 18.5 12 18.5 c 1.6 0 3-.4 4.3-1"/>
    <path d="M10 5.7 c .7-.1 1.3-.2 2-.2 6 0 9.5 6.5 9.5 6.5 -.5 1-1.5 2.4-2.9 3.6"/>
  </svg>
);

const Grip = ({ size = 16, color = '#A88795', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24" style={style} aria-hidden="true">
    <g fill={color}>
      <circle cx="9" cy="6" r="1.4"/>
      <circle cx="15" cy="6" r="1.4"/>
      <circle cx="9" cy="12" r="1.4"/>
      <circle cx="15" cy="12" r="1.4"/>
      <circle cx="9" cy="18" r="1.4"/>
      <circle cx="15" cy="18" r="1.4"/>
    </g>
  </svg>
);

const Trash = ({ size = 14, color = '#D88080', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" style={style} aria-hidden="true">
    <path d="M4 7 L20 7"/>
    <path d="M9 7 V5 a1 1 0 0 1 1-1 h4 a1 1 0 0 1 1 1 V7"/>
    <path d="M6 7 L7 20 a1 1 0 0 0 1 1 h8 a1 1 0 0 0 1-1 L18 7"/>
  </svg>
);

const Plus = ({ size = 14, color = 'currentColor', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="2" strokeLinecap="round" style={style} aria-hidden="true">
    <path d="M12 5 L12 19"/>
    <path d="M5 12 L19 12"/>
  </svg>
);

const Minus = ({ size = 14, color = 'currentColor', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="2" strokeLinecap="round" style={style} aria-hidden="true">
    <path d="M5 12 L19 12"/>
  </svg>
);

const SafetyPin = ({ size = 22, color = '#C8758B', style }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24"
       fill="none" stroke={color} strokeWidth="1.4" strokeLinecap="round" style={style} aria-hidden="true">
    <circle cx="6" cy="6" r="2.8"/>
    <path d="M8 8 L18 18"/>
    <path d="M16 16 a2.5 2.5 0 1 0 -2 4 L7 13"/>
  </svg>
);

/* heart-shape css-style checkbox built as svg, takes checked state */
const HeartCheckSvg = ({ checked, size = 22 }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} viewBox="0 0 24 24" aria-hidden="true">
    <path
      d="M12 20.5s-7-4.6-9.2-9.1C1.3 8 3.4 4 7 4c2 0 3.6 1.1 5 3 1.4-1.9 3-3 5-3 3.6 0 5.7 4 4.2 7.4C19 15.9 12 20.5 12 20.5z"
      fill={checked ? '#FF8FB1' : '#FBF6F0'}
      stroke={checked ? '#C8758B' : '#C8758B'}
      strokeWidth="1.6"
      strokeLinejoin="round"
    />
    {checked && (
      <path d="M8.5 11.5 L11 14 L15.5 9.5" stroke="#fff" strokeWidth="1.8" fill="none" strokeLinecap="round" strokeLinejoin="round"/>
    )}
  </svg>
);

/* loose scatter of pixel stars & sparkles */
const StarScatter = ({ count = 7, style }) => {
  const items = [
    { x: '8%',  y: '18%', s: 8,  c: '#FF8FB1' },
    { x: '22%', y: '62%', s: 6,  c: '#E8A8B8' },
    { x: '38%', y: '12%', s: 10, c: '#B8A8E8' },
    { x: '54%', y: '78%', s: 7,  c: '#FFD580' },
    { x: '70%', y: '28%', s: 9,  c: '#FF8FB1' },
    { x: '84%', y: '64%', s: 6,  c: '#A8D8B8' },
    { x: '92%', y: '12%', s: 8,  c: '#E8A8B8' },
  ].slice(0, count);
  return (
    <div style={{ position: 'absolute', inset: 0, pointerEvents: 'none', ...style }}>
      {items.map((it, i) => (
        <div key={i} style={{
          position: 'absolute', left: it.x, top: it.y,
          ['--rot']: `${(i % 2 ? -1 : 1) * 8}deg`,
          animationDelay: `${i * 0.3}s`,
        }} className="float-soft">
          {i % 2 ? <PixelStar size={it.s} color={it.c} /> : <SparkleSmall size={it.s + 2} color={it.c} />}
        </div>
      ))}
    </div>
  );
};

// spin keyframes for the spinner — injected once
if (typeof document !== 'undefined' && !document.getElementById('mm-spin-kf')) {
  const s = document.createElement('style');
  s.id = 'mm-spin-kf';
  s.textContent = '@keyframes spin { to { transform: rotate(360deg); } }';
  document.head.appendChild(s);
}

Object.assign(window, {
  Icon, Heart, HeartOutline, Sparkle, SparkleSmall, Flower, PixelStar,
  Palette, CharacterFigure, Cube, Camera, Mail, Pencil, Lightbulb,
  Clipboard, Clock, LockHeart, ChevronDown, Check, Cross, Spinner, Warning,
  ArrowLeft, ArrowRight, ExternalLink, InfoCircle, Download, CheckCircle,
  Eye, EyeOff, Grip, Trash, Plus, Minus, SafetyPin,
  HeartCheckSvg, StarScatter,
});
