import React from "react";

const ConfirmModal = ({ isOpen, title, message, onCancel, onConfirm }) => {
  if (!isOpen) return null;

  return (
    <div className="fixed inset-0 z-[999] flex items-center justify-center bg-black/10">
      <div
        className="bg-white/90 backdrop-blur-xl border border-white/40 
        rounded-3xl shadow-2xl p-8 w-[90%] max-w-md text-center"
      >
        {/* Title */}
        <h2 className="text-2xl font-bold text-gray-900 mb-3">{title}</h2>

        {/* Message */}
        <p className="text-gray-600 mb-8 text-[17px]">{message}</p>

        {/* Buttons */}
        <div className="flex justify-center gap-5">
          <button
            onClick={onCancel}
            className="
              px-6 py-3 rounded-xl text-gray-700 
              border border-gray-300 bg-white
              hover:bg-gray-100 hover:shadow-md
              transition-all duration-150 font-medium
            "
          >
            Cancel
          </button>

          <button
            onClick={onConfirm}
            className="
              px-7 py-3 rounded-xl text-white font-semibold
              bg-[#4880FF] hover:bg-[#6B9BFF]
              shadow-lg hover:shadow-xl
              transition-all duration-150
            "
          >
            Confirm
          </button>
        </div>
      </div>
    </div>
  );
};

export default ConfirmModal;
