<table class="widefat cloud-storage-requirements-table system-status-table" cellspacing="1px" cellpadding="4px" style="width:100%; margin-top:2em;">
	<caption><?php esc_html_e( 'Cloud Storage Requirements', 'wpo_wcpdf_pro' ); ?></caption>
	<thead>
		<tr>
			<th align="left"><?php esc_html_e( 'Service', 'wpo_wcpdf_pro' ); ?></th>
			<th align="left"><?php esc_html_e( 'Required', 'wpo_wcpdf_pro' ); ?></th>
			<th align="left"><?php esc_html_e( 'Present', 'wpo_wcpdf_pro' ); ?></th>
		</tr>
	</thead>
	<tbody>
		<?php
			foreach ( $requirements as $label => $config ) :
				if ( $config['result'] ) {
					$background = '#68de7c'; // green
					$color      = 'black';
				} elseif ( isset( $config['fallback'] ) ) {
					$background = '#f2d675'; // yellow
					$color      = 'black';
				} else {
					$background = '#ffabaf'; // red
					$color      = 'black';
				}
		?>
			<tr>
				<td class="title"><?php echo esc_html( $label ); ?></td>
				<td><?php echo wp_kses_post( $config['required'] === true ? esc_html__( 'Yes', 'wpo_wcpdf_pro' ) : $config['required'] ); ?></td>
				<td style="background-color:<?php echo esc_attr( $background ); ?>; color:<?php echo esc_attr( $color ); ?>">
					<?php
					if ( ! empty( $config['value'] ) ) {
						echo wp_kses_post( $config['value'] );
					}
					if ( $config['result'] && ! $config['value'] ) {
						echo esc_html__( 'Yes', 'wpo_wcpdf_pro' );
					}
					if ( ! $config['result'] ) {
						if ( isset( $config['fallback'] ) ) {
							printf( '<div>%s. %s</div>', esc_html__( 'No', 'wpo_wcpdf_pro' ), esc_html( $config['fallback'] ) );
						}
						if ( isset( $config['failure'] ) ) {
							printf( '<div>%s</div>', wp_kses_post( $config['failure'] ) );
						}
					}
					?>
				</td>
			</tr>
		<?php endforeach; ?>
	</tbody>
</table>