<?php
/**
 * Modern Template - Back Side
 */
if ( ! defined( 'ABSPATH' ) ) { exit; }

$cloudi7_icg_org_name    = get_option( 'cloudi7_icg_org_name', 'Organization Name' );
$cloudi7_icg_org_address = get_option( 'cloudi7_icg_org_address', '' );
$cloudi7_icg_org_phone   = get_option( 'cloudi7_icg_org_phone', '' );
$cloudi7_icg_org_email   = get_option( 'cloudi7_icg_org_email', '' );
$cloudi7_icg_org_website = get_option( 'cloudi7_icg_org_website', '' );
$cloudi7_icg_org_terms   = get_option( 'cloudi7_icg_org_terms', '' );
$cloudi7_icg_orientation = get_option( 'cloudi7_icg_orientation', 'horizontal' );

$cloudi7_icg_website_display = str_replace( array( 'http://', 'https://' ), '', $cloudi7_icg_org_website );
?>

<div class="cloudi7-icg-card modern <?php echo esc_attr( $cloudi7_icg_orientation ); ?> back">
    <div class="cloudi7-icg-card-body">
        <div class="cloudi7-icg-contact-info">
            <?php if ( $cloudi7_icg_org_address ) : ?>
                <div class="cloudi7-icg-contact-item address"><?php echo esc_html( $cloudi7_icg_org_address ); ?></div>
            <?php endif; ?>
            <?php if ( $cloudi7_icg_org_phone ) : ?>
                <div class="cloudi7-icg-contact-item phone"><?php esc_html_e( 'Phone:', 'cloudi7-id-card-generator' ); ?> <?php echo esc_html( $cloudi7_icg_org_phone ); ?></div>
            <?php endif; ?>
            <?php if ( $cloudi7_icg_org_email ) : ?>
                <div class="cloudi7-icg-contact-item email"><?php esc_html_e( 'Email:', 'cloudi7-id-card-generator' ); ?> <?php echo esc_html( $cloudi7_icg_org_email ); ?></div>
            <?php endif; ?>
            <?php if ( $cloudi7_icg_org_website ) : ?>
                <div class="cloudi7-icg-contact-item website"><?php esc_html_e( 'Website:', 'cloudi7-id-card-generator' ); ?> <?php echo esc_html( $cloudi7_icg_website_display ); ?></div>
            <?php endif; ?>
        </div>
        
        <div class="cloudi7-icg-divider"></div>
        
        <div class="cloudi7-icg-terms-section">
            <div class="cloudi7-icg-terms-title"><?php esc_html_e( 'Terms & Conditions', 'cloudi7-id-card-generator' ); ?></div>
            <div class="cloudi7-icg-terms-content">
                <?php echo nl2br( esc_html( $cloudi7_icg_org_terms ) ); ?>
            </div>
        </div>
    </div>
</div>
