import React from "react";

interface InfoModalProps {
  isOpen: boolean;
  title: string;
  message: string;
  description?: string;
  onClose: () => void;
}

const InfoModal: React.FC<InfoModalProps> = ({
  isOpen,
  title,
  message,
  description,
  onClose,
}) => {
  if (!isOpen) return null;

  return (
    <div className="fixed inset-0 bg-[#001f3f]/90 backdrop-blur-sm flex items-center justify-center z-[100] p-6">
      <div className="bg-white w-full max-w-md rounded-2xl shadow-2xl overflow-hidden">
        <div className="p-8">
          <h4 className="text-xl font-black text-[#002147] mb-4">{title}</h4>
          <p className="text-slate-700 font-medium mb-2">{message}</p>
          {description && (
            <p className="text-slate-500 text-sm">{description}</p>
          )}
          <div className="flex justify-end mt-6">
            <button
              onClick={onClose}
              className="bg-[#002147] text-white px-6 py-2 rounded-lg font-bold uppercase text-xs tracking-widest hover:bg-[#003366] transition-colors"
            >
              OK
            </button>
          </div>
        </div>
      </div>
    </div>
  );
};

export default InfoModal;


