// Minimal lucide-style SVG icons used across the site.
// Match lucide stroke style: 1.5 stroke, round caps/joins.

const I = ({ size = 18, children, style, ...rest }) => (
  <svg
    xmlns="http://www.w3.org/2000/svg"
    width={size}
    height={size}
    viewBox="0 0 24 24"
    fill="none"
    stroke="currentColor"
    strokeWidth="1.6"
    strokeLinecap="round"
    strokeLinejoin="round"
    style={style}
    {...rest}
  >
    {children}
  </svg>
);

const IconChevronLeft = (p) => <I {...p}><polyline points="15 18 9 12 15 6" /></I>;
const IconChevronRight = (p) => <I {...p}><polyline points="9 18 15 12 9 6" /></I>;
const IconArrowRight = (p) => <I {...p}><line x1="5" y1="12" x2="19" y2="12" /><polyline points="12 5 19 12 12 19" /></I>;
const IconMenu = (p) => <I {...p}><line x1="4" y1="6" x2="20" y2="6" /><line x1="4" y1="12" x2="20" y2="12" /><line x1="4" y1="18" x2="20" y2="18" /></I>;
const IconX = (p) => <I {...p}><line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" /></I>;
const IconLock = (p) => <I {...p}><rect x="4" y="11" width="16" height="10" rx="2" /><path d="M8 11V8a4 4 0 0 1 8 0v3" /></I>;
const IconCheck = (p) => <I {...p}><polyline points="20 6 9 17 4 12" /></I>;
const IconPlus = (p) => <I {...p}><line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" /></I>;
const IconMinus = (p) => <I {...p}><line x1="5" y1="12" x2="19" y2="12" /></I>;

// Feature icons (lucide visual style)
const IconNetwork = (p) => (
  <I {...p}>
    <rect x="9" y="2" width="6" height="6" rx="1" />
    <rect x="2" y="16" width="6" height="6" rx="1" />
    <rect x="16" y="16" width="6" height="6" rx="1" />
    <path d="M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3" />
    <path d="M12 12V8" />
  </I>
);
const IconBrush = (p) => (
  <I {...p}>
    <path d="M9.06 11.9l8.07-8.06a2.85 2.85 0 1 1 4.03 4.03l-8.06 8.08" />
    <path d="M7.07 14.94c-1.66 0-3 1.35-3 3.02 0 1.33-2.5 1.52-2 2.02 1.08 1.1 2.49 2.02 4 2.02 2.2 0 4-1.8 4-4.04a3.01 3.01 0 0 0-3-3.02z" />
  </I>
);
const IconSparkles = (p) => (
  <I {...p}>
    <path d="M12 3l1.7 4.6L18.3 9.3 13.7 11l-1.7 4.6L10.3 11 5.7 9.3l4.6-1.7L12 3z" />
    <path d="M19 14l.9 2.4L22.3 17.3 19.9 18.2 19 20.6 18.1 18.2 15.7 17.3 18.1 16.4 19 14z" />
    <path d="M5 16l.6 1.6L7.2 18.2l-1.6.6L5 20.4 4.4 18.8 2.8 18.2 4.4 17.6 5 16z" />
  </I>
);
const IconCpu = (p) => (
  <I {...p}>
    <rect x="5" y="5" width="14" height="14" rx="2" />
    <rect x="9" y="9" width="6" height="6" />
    <path d="M9 2v3M15 2v3M9 19v3M15 19v3M2 9h3M2 15h3M19 9h3M19 15h3" />
  </I>
);
const IconBox = (p) => (
  <I {...p}>
    <path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" />
    <polyline points="3.27 6.96 12 12.01 20.73 6.96" />
    <line x1="12" y1="22.08" x2="12" y2="12" />
  </I>
);
const IconHardDrive = (p) => (
  <I {...p}>
    <line x1="22" y1="12" x2="2" y2="12" />
    <path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" />
    <line x1="6" y1="16" x2="6.01" y2="16" />
    <line x1="10" y1="16" x2="10.01" y2="16" />
  </I>
);

window.Icons = {
  IconChevronLeft, IconChevronRight, IconArrowRight, IconMenu, IconX,
  IconLock, IconCheck, IconPlus, IconMinus,
  IconNetwork, IconBrush, IconSparkles, IconCpu, IconBox, IconHardDrive,
};
