import React from "react";

interface LightPittedStoneProps {
  children: React.ReactNode;
  /** Optional extra classes for the outer container */
  className?: string;
}

export default function LightPittedStone({
  children,
  className = ""
}: LightPittedStoneProps) {
  return (
    // Switched to a very light stone color, like the provided image
    <div className={`relative min-h-screen bg-stone-100 ${className}`}>

      {/* - Lowered opacity to 10% for a very subtle, light texture
          - Increased baseFrequency to 1.8 for extremely fine, uniform pitting, 
            avoiding large clusters and making it look closer to the concrete/plaster reference image.
          - Kept mix-blend-multiply to subtly darken the background with fine pits.
      */}
      <svg
        className="absolute inset-0 z-0 h-full w-full pointer-events-none opacity-25 mix-blend-multiply"
        xmlns="http://www.w3.org/2000/svg"
      >
        <filter id="pittedTexture" x="0" y="0" width="100%" height="100%" filterUnits="userSpaceOnUse">
          <feTurbulence
            type="fractalNoise"
            baseFrequency="0.45" // Lower frequency increases grain size further
            numOctaves="3"
            stitchTiles="stitch"
          />
          {/* Shift noise colors to neutral dark gray/black and boost alpha contrast */}
          <feColorMatrix
            type="matrix"
            values="0.33 0.33 0.33 0 0, 
                    0.33 0.33 0.33 0 0, 
                    0.33 0.33 0.33 0 0, 
                    0 0 0 2.0 -0.2"
          />
        </filter>
        <rect width="100%" height="100%" filter="url(#pittedTexture)" />
      </svg>

      {/* Content Wrapper */}
      <div className="relative z-10">
        {children}
      </div>

    </div>
  );
}