<section class="danger-zone p-3 p-lg-4"><div class="d-flex flex-column flex-md-row align-items-md-center justify-content-between gap-3"><div><h2 class="h5 text-danger mb-1"><i class="fas fa-exclamation-triangle me-1"></i> {{ __('Danger Zone') }}</h2><p class="text-muted small mb-0">Permanently delete this account and its access. This cannot be undone.</p></div><button class="btn btn-outline-danger flex-shrink-0" type="button" data-bs-toggle="modal" data-bs-target="#deleteAccountModal">{{ __('Delete Account') }}</button></div></section>
<div class="modal fade" id="deleteAccountModal" tabindex="-1" aria-labelledby="deleteAccountModalLabel" aria-hidden="true"><div class="modal-dialog modal-dialog-centered"><div class="modal-content"><form method="post" action="{{ route('profile.destroy') }}">@csrf @method('delete')<div class="modal-header"><h2 class="modal-title h5" id="deleteAccountModalLabel">{{ __('Confirm Account Deletion') }}</h2><button type="button" class="btn-close" data-bs-dismiss="modal"></button></div><div class="modal-body"><div class="alert alert-danger small">{{ __('This action permanently deletes your account. Enter your password to confirm.') }}</div><label class="form-label fw-semibold" for="delete_account_password">{{ __('Password') }}</label><input id="delete_account_password" name="password" type="password" class="form-control @if($errors->userDeletion->has('password')) is-invalid @endif" required autocomplete="current-password">@foreach($errors->userDeletion->get('password') as $message)<div class="invalid-feedback d-block">{{ $message }}</div>@endforeach</div><div class="modal-footer"><button type="button" class="btn btn-light" data-bs-dismiss="modal">{{ __('Cancel') }}</button><button class="btn btn-danger">{{ __('Delete Account') }}</button></div></form></div></div></div>
@if($errors->userDeletion->isNotEmpty())<script>document.addEventListener('DOMContentLoaded',()=>bootstrap.Modal.getOrCreateInstance(document.getElementById('deleteAccountModal')).show());</script>@endif
