<?php
/**
 * Mail Doctor guides hub scaffold.
 *
 * @var string $mail_doctor_active_tab
 * @var string $mail_doctor_base_url
 *
 * @package MailDoctor
 */

use MailDoctor\Admin;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$mail_doctor_docs_root = MAIL_DOCTOR_URL . 'docs/';
?>
<div class="wrap maildoctor-admin-wrap">
	<?php settings_errors( 'maildoctor' ); ?>

	<div class="mail-doctor-guides-hero mail-doctor-card">
		<div class="mail-doctor-guides-hero__intro">
			<h2><?php esc_html_e( 'Guides & Playbooks', 'mail-doctor' ); ?></h2>
			<p><?php esc_html_e( 'From the first SMTP handshake to ongoing deliverability health, this hub collects curated checklists, provider recipes, and troubleshooting flows for busy stores.', 'mail-doctor' ); ?>
			</p>
			<div class="mail-doctor-guides-actions">
				<a class="button button-primary" href="<?php echo esc_url( Admin::page_url( 'settings' ) ); ?>">
					<span class="dashicons dashicons-admin-settings" aria-hidden="true"></span>
					<?php esc_html_e( 'Review SMTP Checklist', 'mail-doctor' ); ?>
				</a>
				<a class="button" href="<?php echo esc_url( Admin::page_url( 'logs' ) ); ?>">
					<span class="dashicons dashicons-search" aria-hidden="true"></span>
					<?php esc_html_e( 'Inspect Email Logs', 'mail-doctor' ); ?>
				</a>
			</div>
		</div>
		<dl class="mail-doctor-guides-hero__stats">
			<div>
				<dt><?php esc_html_e( 'Average setup time', 'mail-doctor' ); ?></dt>
				<dd><?php esc_html_e( '≈ 10 minutes', 'mail-doctor' ); ?></dd>
			</div>
			<div>
				<dt><?php esc_html_e( 'Providers covered', 'mail-doctor' ); ?></dt>
				<dd><?php esc_html_e( '6 popular SMTP & API platforms', 'mail-doctor' ); ?></dd>
			</div>
			<div>
				<dt><?php esc_html_e( 'Team ready', 'mail-doctor' ); ?></dt>
				<dd><?php esc_html_e( 'Shareable runbooks & copy-paste snippets', 'mail-doctor' ); ?></dd>
			</div>
		</dl>
	</div>

	<div class="mail-doctor-guides">
		<nav class="mail-doctor-guides-nav" aria-label="<?php esc_attr_e( 'Guide sections', 'mail-doctor' ); ?>">
			<ul>
				<li><a data-guide-nav href="#mail-doctor-guide-start"><span class="dashicons dashicons-yes-alt"
							aria-hidden="true"></span><?php esc_html_e( 'Quick Checklist', 'mail-doctor' ); ?></a>
				</li>
				<li><a data-guide-nav href="#mail-doctor-guide-providers"><span class="dashicons dashicons-email-alt"
							aria-hidden="true"></span><?php esc_html_e( 'Provider Recipes', 'mail-doctor' ); ?></a>
				</li>
				<li><a data-guide-nav href="#mail-doctor-guide-getting-started"><span class="dashicons dashicons-media-document"
							aria-hidden="true"></span><?php esc_html_e( 'Getting Started Walkthrough', 'mail-doctor' ); ?></a>
				</li>
				<li><a data-guide-nav href="#mail-doctor-guide-dns"><span class="dashicons dashicons-networking"
							aria-hidden="true"></span><?php esc_html_e( 'DNS Alignment', 'mail-doctor' ); ?></a>
				</li>
				<li><a data-guide-nav href="#mail-doctor-guide-runbook"><span class="dashicons dashicons-randomize"
							aria-hidden="true"></span><?php esc_html_e( 'Incident Runbook', 'mail-doctor' ); ?></a>
				</li>
				<li><a data-guide-nav href="#mail-doctor-guide-troubleshooting"><span class="dashicons dashicons-sos"
							aria-hidden="true"></span><?php esc_html_e( 'Error Library', 'mail-doctor' ); ?></a>
				</li>
				<li><a data-guide-nav href="#mail-doctor-guide-deliverability"><span class="dashicons dashicons-chart-area"
							aria-hidden="true"></span><?php esc_html_e( 'Deliverability', 'mail-doctor' ); ?></a>
				</li>
				<li><a data-guide-nav href="#mail-doctor-guide-resources"><span class="dashicons dashicons-book-alt"
							aria-hidden="true"></span><?php esc_html_e( 'Resources', 'mail-doctor' ); ?></a></li>
				<li><a data-guide-nav href="#mail-doctor-guide-support"><span class="dashicons dashicons-email-alt2"
							aria-hidden="true"></span><?php esc_html_e( 'Support', 'mail-doctor' ); ?></a></li>
			</ul>
		</nav>

		<div class="mail-doctor-guides-content">
			<section id="mail-doctor-guide-start">
				<h2><?php esc_html_e( 'Launch Checklist', 'mail-doctor' ); ?></h2>
				<p><?php esc_html_e( 'Work through these steps the first time you connect a store. Each card links to the relevant area in Mail Doctor.', 'mail-doctor' ); ?>
				</p>
				<div class="mail-doctor-guide-card-grid">
					<article class="mail-doctor-guide-card">
						<h3><?php esc_html_e( '1. Wire up SMTP credentials', 'mail-doctor' ); ?></h3>
						<p><?php esc_html_e( 'Choose your provider and enter host, port, authentication, and default sender identity.', 'mail-doctor' ); ?>
						</p>
						<a class="mail-doctor-guide-card__link" href="<?php echo esc_url( Admin::page_url( 'settings' ) ); ?>">
							<span class="dashicons dashicons-admin-generic" aria-hidden="true"></span>
							<?php esc_html_e( 'Open SMTP settings', 'mail-doctor' ); ?>
						</a>
					</article>
					<article class="mail-doctor-guide-card">
						<h3><?php esc_html_e( '2. Send a diagnostic test', 'mail-doctor' ); ?></h3>
						<p><?php esc_html_e( 'Use the status tab test button to confirm TLS, authentication, and latency from your production environment.', 'mail-doctor' ); ?>
						</p>
						<a class="mail-doctor-guide-card__link" href="<?php echo esc_url( Admin::page_url( 'status' ) ); ?>">
							<span class="dashicons dashicons-visibility" aria-hidden="true"></span>
							<?php esc_html_e( 'Run test email', 'mail-doctor' ); ?>
						</a>
					</article>
					<?php if ( \MailDoctor\Helpers\Dependencies::is_woocommerce_available() ) : ?>
					<article class="mail-doctor-guide-card">
						<h3><?php esc_html_e( '3. Map WooCommerce emails', 'mail-doctor' ); ?></h3>
						<p><?php esc_html_e( 'Toggle transactional templates on/off and preview them with real order data before rollout.', 'mail-doctor' ); ?>
						</p>
						<a class="mail-doctor-guide-card__link"
							href="<?php echo esc_url( add_query_arg( 'section', 'woocommerce', Admin::page_url( 'settings' ) ) ); ?>">
							<span class="dashicons dashicons-cart" aria-hidden="true"></span>
							<?php esc_html_e( 'Configure WooCommerce emails', 'mail-doctor' ); ?>
						</a>
					</article>
					<?php endif; ?>
					<article class="mail-doctor-guide-card">
						<h3><?php esc_html_e( '4. Schedule queue monitoring', 'mail-doctor' ); ?></h3>
						<p><?php esc_html_e( 'Add a repeating calendar reminder to glance at the queue snapshot and failure alerts.', 'mail-doctor' ); ?>
						</p>
						<a class="mail-doctor-guide-card__link" href="<?php echo esc_url( Admin::page_url( 'logs' ) ); ?>">
							<span class="dashicons dashicons-clock" aria-hidden="true"></span>
							<?php esc_html_e( 'Check email logs', 'mail-doctor' ); ?>
						</a>
					</article>
				</div>
			</section>

			<section id="mail-doctor-guide-getting-started">
				<h2><?php esc_html_e( 'Getting Started Walkthrough', 'mail-doctor' ); ?></h2>
				<p><?php esc_html_e( 'Follow these annotated screenshots to configure Mail Doctor without leaving the dashboard. Each frame highlights the exact panel and fields you will update along the way.', 'mail-doctor' ); ?>
				</p>

				<div class="mail-doctor-guide-screenshot-grid">
					<figure class="mail-doctor-guide-screenshot">
						<img src="<?php echo esc_url( MAIL_DOCTOR_URL . 'assets/img/guides/getting-started-step-1.png' ); ?>"
							alt="<?php esc_attr_e( 'Mail Doctor welcome screen highlighting the SMTP checklist.', 'mail-doctor' ); ?>"
							decoding="async" loading="lazy" />
						<figcaption>
							<?php esc_html_e( 'Begin on the launch checklist to review prerequisites before connecting your store.', 'mail-doctor' ); ?>
						</figcaption>
					</figure>

					<figure class="mail-doctor-guide-screenshot">
						<img src="<?php echo esc_url( MAIL_DOCTOR_URL . 'assets/img/guides/getting-started-step-2.png' ); ?>"
							alt="<?php esc_attr_e( 'SMTP settings panel showing sender identity, transport, and credentials fields.', 'mail-doctor' ); ?>"
							decoding="async" loading="lazy" />
						<figcaption>
							<?php esc_html_e( 'Fill out sender identity and delivery method, then paste provider credentials where prompted.', 'mail-doctor' ); ?>
						</figcaption>
					</figure>

					<figure class="mail-doctor-guide-screenshot">
						<img src="<?php echo esc_url( MAIL_DOCTOR_URL . 'assets/img/guides/getting-started-step-3.png' ); ?>"
							alt="<?php esc_attr_e( 'Status screen displaying successful test email confirmation.', 'mail-doctor' ); ?>"
							decoding="async" loading="lazy" />
						<figcaption>
							<?php esc_html_e( 'Use the status screen to send a test message and confirm everything is delivering as expected.', 'mail-doctor' ); ?>
						</figcaption>
					</figure>
				</div>
			</section>

			<section id="mail-doctor-guide-providers">
				<h2><?php esc_html_e( 'Provider Recipes', 'mail-doctor' ); ?></h2>
				<p><?php esc_html_e( 'Copy the minimal SMTP profile below, then add API keys or OAuth where applicable. Each snippet matches the fields on the Settings tab.', 'mail-doctor' ); ?>
				</p>
				<div class="mail-doctor-guide-card-grid mail-doctor-guide-card-grid--providers">
					<article class="mail-doctor-guide-card mail-doctor-guide-card--provider">
						<header>
							<h3><?php esc_html_e( 'Gmail / Google Workspace', 'mail-doctor' ); ?></h3>
							<span class="mail-doctor-guide-badge"><?php esc_html_e( 'App Password', 'mail-doctor' ); ?></span>
						</header>
						<pre><code>Host: smtp.gmail.com
Port: 587
Encryption: TLS
Username: you@example.com
Password: &lt;App Password&gt;</code></pre>
						<?php
						$mail_doctor_gmail_recipe_url = add_query_arg(
							array(
								'section'   => 'smtp',
								'mail_doctor_recipe' => 'gmail',
							),
							Admin::page_url( 'settings' )
						);
						?>
						<a class="button button-primary" href="<?php echo esc_url( $mail_doctor_gmail_recipe_url ); ?>">
							<?php esc_html_e( 'Apply recipe', 'mail-doctor' ); ?>
						</a>
						<p class="mail-doctor-guide-card__footnote">
							<?php esc_html_e( 'Use a Google App Password; normal user passwords are blocked when 2FA is enabled.', 'mail-doctor' ); ?>
						</p>
					</article>
					<article class="mail-doctor-guide-card mail-doctor-guide-card--provider">
						<header>
							<h3><?php esc_html_e( 'SendGrid', 'mail-doctor' ); ?></h3>
							<span
								class="mail-doctor-guide-badge mail-doctor-guide-badge--api"><?php esc_html_e( 'API Key', 'mail-doctor' ); ?></span>
						</header>
						<pre><code>Host: smtp.sendgrid.net
Port: 587
Encryption: TLS
Username: apikey
Password: &lt;API Key&gt;</code></pre>
						<?php
						$mail_doctor_sendgrid_recipe_url = add_query_arg(
							array(
								'section'   => 'smtp',
								'mail_doctor_recipe' => 'sendgrid',
							),
							Admin::page_url( 'settings' )
						);
						?>
						<a class="button button-primary" href="<?php echo esc_url( $mail_doctor_sendgrid_recipe_url ); ?>">
							<?php esc_html_e( 'Apply recipe', 'mail-doctor' ); ?>
						</a>
						<p class="mail-doctor-guide-card__footnote">
							<?php
							printf(
								/* translators: %s: SendGrid Web API transport URL */
								wp_kses_post( __( 'Optional: use the <a href="%s" target="_blank" rel="noreferrer noopener">SendGrid Web API transport</a> under Settings → Integrations for status reporting.', 'mail-doctor' ) ),
								esc_url( 'https://docs.sendgrid.com/for-developers/sending-email/getting-started-smtp' )
							);
							?>
						</p>
					</article>
					<article class="mail-doctor-guide-card mail-doctor-guide-card--provider">
						<header>
							<h3><?php esc_html_e( 'Mailgun', 'mail-doctor' ); ?></h3>
							<span class="mail-doctor-guide-badge"><?php esc_html_e( 'Region aware', 'mail-doctor' ); ?></span>
						</header>
						<pre><code>Host: smtp.mailgun.org
Port: 587
Encryption: TLS
Username: postmaster@YOUR_DOMAIN
Password: &lt;SMTP Password&gt;</code></pre>
						<?php
						$mail_doctor_mailgun_recipe_url = add_query_arg(
							array(
								'section'   => 'smtp',
								'mail_doctor_recipe' => 'mailgun',
							),
							Admin::page_url( 'settings' )
						);
						?>
						<a class="button button-primary" href="<?php echo esc_url( $mail_doctor_mailgun_recipe_url ); ?>">
							<?php esc_html_e( 'Apply recipe', 'mail-doctor' ); ?>
						</a>
						<p class="mail-doctor-guide-card__footnote">
							<?php esc_html_e( 'Replace YOUR_DOMAIN with the Mailgun sending domain. EU regions use smtp.eu.mailgun.org.', 'mail-doctor' ); ?>
						</p>
					</article>
					<article class="mail-doctor-guide-card mail-doctor-guide-card--provider">
						<header>
							<h3><?php esc_html_e( 'Amazon SES', 'mail-doctor' ); ?></h3>
							<span
								class="mail-doctor-guide-badge mail-doctor-guide-badge--api"><?php esc_html_e( 'Access Keys', 'mail-doctor' ); ?></span>
						</header>
						<pre><code>Host: email-smtp.us-east-1.amazonaws.com
Port: 587
Encryption: TLS
Username: &lt;SMTP Username&gt;
Password: &lt;SMTP Password&gt;</code></pre>
						<?php
						$mail_doctor_ses_recipe_url = add_query_arg(
							array(
								'section'   => 'smtp',
								'mail_doctor_recipe' => 'ses',
							),
							Admin::page_url( 'settings' )
						);
						?>
						<a class="button button-primary" href="<?php echo esc_url( $mail_doctor_ses_recipe_url ); ?>">
							<?php esc_html_e( 'Apply recipe', 'mail-doctor' ); ?>
						</a>
						<p class="mail-doctor-guide-card__footnote">
							<?php esc_html_e( 'If you use the SES API transport, switch to the API tab in Settings → Integrations to unlock event webhooks.', 'mail-doctor' ); ?>
						</p>
					</article>
				</div>
			</section>

			<section id="mail-doctor-guide-dns">
				<h2><?php esc_html_e( 'DNS Alignment', 'mail-doctor' ); ?></h2>
				<p><?php esc_html_e( 'Use Mail Doctor’s status tab to confirm records propagate. Keep production and staging domains aligned to avoid SPF failures.', 'mail-doctor' ); ?>
				</p>
				<div class="mail-doctor-guide-callouts">
					<div class="mail-doctor-guide-callout">
						<h3><?php esc_html_e( 'Baseline TXT Records', 'mail-doctor' ); ?></h3>
						<pre><code>v=spf1 include:sendgrid.net include:mailgun.org ~all
_dmarc 3600 IN TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com"
dkim._domainkey 3600 IN TXT "v=DKIM1; k=rsa; p=…"</code></pre>
						<p class="mail-doctor-guide-card__footnote">
							<?php esc_html_e( 'Replace include mechanisms with the providers you actively use. Start with p=none for DMARC if you need to monitor before enforcing.', 'mail-doctor' ); ?>
						</p>
					</div>
					<div class="mail-doctor-guide-callout mail-doctor-guide-callout--checklist">
						<h3><?php esc_html_e( 'Verification Checklist', 'mail-doctor' ); ?></h3>
						<ul>
							<li><?php esc_html_e( '✅ SPF passes across sandbox and production domains', 'mail-doctor' ); ?>
							</li>
							<li><?php esc_html_e( '✅ DKIM selector rotated every 12 months', 'mail-doctor' ); ?>
							</li>
							<li><?php esc_html_e( '✅ DMARC aggregate reports delivered to a monitored mailbox', 'mail-doctor' ); ?>
							</li>
							<li><?php esc_html_e( '✅ BIMI / MTA-STS evaluated for branded transactional sends', 'mail-doctor' ); ?>
							</li>
						</ul>
					</div>
				</div>
			</section>

			<section id="mail-doctor-guide-runbook">
				<h2><?php esc_html_e( 'Incident Runbook', 'mail-doctor' ); ?></h2>
				<p><?php esc_html_e( 'Use this lightweight flow during on-call incidents or whenever customer support flags missing emails.', 'mail-doctor' ); ?>
				</p>
				<ol class="mail-doctor-guide-timeline">
					<li>
						<strong><?php esc_html_e( 'Validate the queue snapshot', 'mail-doctor' ); ?></strong>
						<span><?php esc_html_e( 'Open the Status tab, confirm whether failures are spiking, and capture the current provider code.', 'mail-doctor' ); ?></span>
					</li>
					<li>
						<strong><?php esc_html_e( 'Confirm provider health', 'mail-doctor' ); ?></strong>
						<span><?php esc_html_e( 'Check the provider status page and your account throttling limits. Apply fallback transport if the outage is upstream.', 'mail-doctor' ); ?></span>
					</li>
					<li>
						<strong><?php esc_html_e( 'Release quarantined emails', 'mail-doctor' ); ?></strong>
						<span><?php esc_html_e( 'Filter the log for quarantined messages, fix the root cause (bad address or payload), then release retries from the log detail modal.', 'mail-doctor' ); ?></span>
					</li>
					<li>
						<strong><?php esc_html_e( 'Notify stakeholders', 'mail-doctor' ); ?></strong>
						<span><?php esc_html_e( 'Post an incident note with timeline + provider code in Slack/Teams, and update once the queue returns to steady state.', 'mail-doctor' ); ?></span>
					</li>
				</ol>
			</section>

			<section id="mail-doctor-guide-troubleshooting">
				<h2><?php esc_html_e( 'Error Library', 'mail-doctor' ); ?></h2>
				<table class="widefat mail-doctor-table">
					<thead>
						<tr>
							<th><?php esc_html_e( 'Code', 'mail-doctor' ); ?></th>
							<th><?php esc_html_e( 'Meaning', 'mail-doctor' ); ?></th>
							<th><?php esc_html_e( 'Suggested action', 'mail-doctor' ); ?></th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td>550</td>
							<td><?php esc_html_e( 'Mailbox unavailable', 'mail-doctor' ); ?></td>
							<td><?php esc_html_e( 'Verify the recipient address or remove from queue.', 'mail-doctor' ); ?>
							</td>
						</tr>
						<tr>
							<td>535</td>
							<td><?php esc_html_e( 'Authentication failed', 'mail-doctor' ); ?></td>
							<td><?php esc_html_e( 'Rotate credentials and confirm the SMTP user has access.', 'mail-doctor' ); ?>
							</td>
						</tr>
						<tr>
							<td>421</td>
							<td><?php esc_html_e( 'Service not available', 'mail-doctor' ); ?></td>
							<td><?php esc_html_e( 'Reduce sending rate or check provider status page.', 'mail-doctor' ); ?>
							</td>
						</tr>
					</tbody>
				</table>
			</section>

			<section id="mail-doctor-guide-deliverability">
				<h2><?php esc_html_e( 'Deliverability Best Practices', 'mail-doctor' ); ?></h2>
				<ul class="mail-doctor-bullet-list">
					<li><?php esc_html_e( 'Warm new sending domains gradually and monitor reputation dashboards.', 'mail-doctor' ); ?>
					</li>
					<li><?php esc_html_e( 'Use a consistent From domain that matches your storefront URL.', 'mail-doctor' ); ?>
					</li>
					<li><?php esc_html_e( 'Add a List-Unsubscribe header for non-critical notifications.', 'mail-doctor' ); ?>
					</li>
					<li><?php esc_html_e( 'Keep email templates lean—avoid oversized images and inline scripts.', 'mail-doctor' ); ?>
					</li>
					<li><?php esc_html_e( 'Schedule periodic reviews of bounce/complaint logs.', 'mail-doctor' ); ?>
					</li>
				</ul>
			</section>

			<section id="mail-doctor-guide-premium">
				<h2><?php esc_html_e( 'Unlock Premium Features (Pro)', 'mail-doctor' ); ?></h2>
				<p><?php esc_html_e( 'Need more advanced deployment tools? Mail Doctor Pro unlocks critical automation and routing features designed for high-volume stores.', 'mail-doctor' ); ?>
				</p>
				<div class="mail-doctor-guide-resource-grid">
					<div class="mail-doctor-guide-resource">
						<span class="dashicons dashicons-admin-links" aria-hidden="true"></span>
						<div>
							<strong><?php esc_html_e( 'Webhooks & REST API', 'mail-doctor' ); ?></strong>
							<span><?php esc_html_e( 'Pipe email events straight into Slack, Zapier, or your custom CRMs instantly.', 'mail-doctor' ); ?></span>
						</div>
					</div>
					<div class="mail-doctor-guide-resource">
						<span class="dashicons dashicons-bell" aria-hidden="true"></span>
						<div>
							<strong><?php esc_html_e( 'Real-time Alerts & Digests', 'mail-doctor' ); ?></strong>
							<span><?php esc_html_e( 'Get pinged when failure limits spike, and receive a daily summary of email activities.', 'mail-doctor' ); ?></span>
						</div>
					</div>
					<div class="mail-doctor-guide-resource">
						<span class="dashicons dashicons-download" aria-hidden="true"></span>
						<div>
							<strong><?php esc_html_e( 'Export Logs & EMLs', 'mail-doctor' ); ?></strong>
							<span><?php esc_html_e( 'Download complete log histories via CSV & JSON or exact EML sources for debugging.', 'mail-doctor' ); ?></span>
						</div>
					</div>
				</div>
				<br>
				<a class="button button-primary" href="<?php echo esc_url( 'https://wpdoctorpro.com/products/mail-doctor' ); ?>" target="_blank" rel="noopener noreferrer">
					<span class="dashicons dashicons-star-filled" aria-hidden="true"></span>
					<?php esc_html_e( 'View Pricing & Upgrade', 'mail-doctor' ); ?>
				</a>
			</section>

			<section id="mail-doctor-guide-resources">
				<h2><?php esc_html_e( 'Additional Resources', 'mail-doctor' ); ?></h2>
				<div class="mail-doctor-guide-resource-grid">
					<a class="mail-doctor-guide-resource"
						href="<?php echo esc_url( 'https://wpdoctorpro.com/docs/mail-doctor/welcome-to-mail-doctor' ); ?>"
						target="_blank" rel="noopener noreferrer">
						<span class="dashicons dashicons-lightbulb" aria-hidden="true"></span>
						<div>
							<strong><?php esc_html_e( 'Full Getting Started Guide', 'mail-doctor' ); ?></strong>
							<span><?php esc_html_e( 'Step-by-step walkthrough with screenshots.', 'mail-doctor' ); ?></span>
						</div>
					</a>
					<a class="mail-doctor-guide-resource"
						href="<?php echo esc_url( 'https://wpdoctorpro.com/docs/mail-doctor/error-codes-quick-checklist' ); ?>"
						target="_blank" rel="noopener noreferrer">
						<span class="dashicons dashicons-editor-help" aria-hidden="true"></span>
						<div>
							<strong><?php esc_html_e( 'Error Code Reference', 'mail-doctor' ); ?></strong>
							<span><?php esc_html_e( 'Extended list of SMTP responses and suggested fixes.', 'mail-doctor' ); ?></span>
						</div>
					</a>
					<a class="mail-doctor-guide-resource"
						href="<?php echo esc_url( 'https://wpdoctorpro.com/docs/mail-doctor/privacy-and-security-overview' ); ?>"
						target="_blank" rel="noopener noreferrer">
						<span class="dashicons dashicons-shield" aria-hidden="true"></span>
						<div>
							<strong><?php esc_html_e( 'Privacy & Security Playbook', 'mail-doctor' ); ?></strong>
							<span><?php esc_html_e( 'Retention policies, structured logging, and data export tips.', 'mail-doctor' ); ?></span>
						</div>
					</a>
				</div>
			</section>

			<section id="mail-doctor-guide-support">
				<h2><?php esc_html_e( 'Get Support', 'mail-doctor' ); ?></h2>
				<p><?php esc_html_e( 'Need extra help or want to share logs and screenshots? Send us a message and we will follow up with next steps.', 'mail-doctor' ); ?>
				</p>
				<a class="button button-primary" href="<?php echo esc_url( 'https://wpdoctorpro.com/support' ); ?>"
					target="_blank" rel="noopener noreferrer">
					<span class="dashicons dashicons-format-chat" aria-hidden="true"></span>
					<?php esc_html_e( 'Open support portal', 'mail-doctor' ); ?>
				</a>
			</section>
		</div>
	</div>
</div>