'use client';

import React from 'react';
import AdBanner from '@/components/ads/AdBanner';

export default function ToolsLayout({
    children,
}: {
    children: React.ReactNode;
}) {
    return (
        <div className="flex flex-col min-h-screen">
            {/* AdSense script - managed by global AdSenseScript component */}
            <div className="flex-grow relative">
                {children}
            </div>

            {/* Footer Ad Placement - Appears on ALL tool pages */}
            {/* AdBanner handles its own visibility - only shows when an ad is filled */}
            <div className="container mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl pb-8">
                <AdBanner
                    dataAdSlot="2607110637" // Anzeige 1
                    dataAdFormat="auto"
                    fullWidthResponsive={true}
                    className="bg-slate-50 rounded-xl p-4 border border-slate-100"
                />
            </div>
        </div>
    );
}
