{#if showOverlay}
{displayTitle}
(minimized = !minimized)} class="rounded-lg p-1 text-theme-text-secondary transition-colors hover:bg-theme-interactive-hover hover:text-theme-text-primary" title={minimized ? 'Maximieren' : 'Minimieren'} >
{#if minimized}
{:else}
{/if}
{#if progress() > 0}
{Math.round(progress())}% abgeschlossen
{#if loading.estimatedTime && loading.estimatedTime > Date.now()}
~{Math.max(1, Math.ceil((loading.estimatedTime - Date.now()) / 1000))}s verbleibend
{/if}
{/if}
{#if !minimized}
{#each loading.steps as step, index}
{#if step.status === 'completed'}
{:else if step.status === 'active'}
{:else if step.status === 'error'}
{:else}
{/if}
{step.label}
{#if step.message}
{step.message}
{/if}
{#if index < loading.steps.length - 1}
{#if step.status === 'active'}
{/if}
{/if} {/each}
{#if loading.error}
{loading.error}
{/if} {#if loading.funFact && !loading.error}
{loading.funFact}
{/if}
{#if loading.error}
loadingStore.reset()} class="w-full rounded-lg border border-theme-border-default bg-theme-surface px-4 py-2 text-sm font-medium text-theme-text-primary transition-all hover:bg-theme-interactive-hover hover:shadow-md" > Schließen
{/if} {/if}
{/if}