<?php
/**
 * Order Open Box Section
 *
 * This template can be overridden by copying it to yourtheme/mysterx/order/mysterx-open-box.php.
 *
 * @package Mysterx
 * @version 1.0.1
 */

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

if ( $unopened_count > 0 ) : ?>
	<div class="mysterx-order-open-box" style="margin-top: 20px; padding: 20px; background-color: #f9f9f9; border: 1px solid #eee; text-align: center; border-radius: 8px;">
		<p style="margin-bottom: 15px; font-weight: bold;"><?php esc_html_e( 'You have unopened Mystery Boxes in this order!', 'mysterx-mystery-boxes-for-woocommerce' ); ?></p>
		<a href="<?php echo esc_url( $url ); ?>" class="button mysterx-button" style="display: inline-block; padding: 10px 25px; background-color: #7f54b3; color: #fff; text-decoration: none; border-radius: 5px; font-weight: bold;">
			<?php esc_html_e( 'Open your Mystery Boxes', 'mysterx-mystery-boxes-for-woocommerce' ); ?>
		</a>
	</div>
<?php elseif ( $order->has_status( array( 'pending', 'on-hold' ) ) ) : ?>
	<div class="mysterx-order-open-box" style="margin-top: 20px; padding: 20px; background-color: #fff9e6; border: 1px solid #ffeeba; text-align: center; border-radius: 8px;">
		<p style="margin-bottom: 0; color: #856404;">
			<?php esc_html_e( 'Your Mystery Boxes will be available for opening once your payment is confirmed.', 'mysterx-mystery-boxes-for-woocommerce' ); ?>
		</p>
	</div>
<?php endif; ?>
