<div class="wpcargo-row result-list">
    <div class="wpcargo-col-md-2">
        <?php do_action( 'before_wpcsr_rate_result_header', $rateInfo) ?>
        <?php if( $rate_logo ): ?>
            <div class="header-logo">
                <img class="wpcsr_logo" src="<?php echo $rate_logo; ?>" >
            </div>	
        <?php endif; ?>					
        <div class="header-content<?php echo ( !$rate_logo ) ? '-full' : '' ; ?> text-center">
            <p class="align-center"><?php echo $delivery_info->description; ?></p>
        </div>
    </div>
    <div class="wpcargo-col-md-8 rate-content-details">
        <h3 class="title ">
            <?php echo $rateInfo->brand; ?>
            <span class="more-info-btn"><span class="fa fa-info-circle"></span><?php echo wpcsr_read_more_label(); ?></span>
        </h3>
        <p class="subtitle"><?php echo $rateInfo->service; ?></p>
        <p class="origin"><strong><?php echo wpcsr_origin_label(); ?>:</strong> <?php echo $ship_from_info->location; ?></p>
        <p class="destination"><strong><?php echo wpcsr_destination_label(); ?>:</strong> <?php echo $ship_to_info->location; ?></p>
        <div id="wpcsr-rate-info" class="wpcsr-modal hide-element">
            <div class="wpcsr-modal-content">
                <span class="exit-modal">&times;</span>
                <div class="wpcsr-card-header">
                    <div class="header-logo">
                        <img class="wpcsr_logo" src="<?php echo $rate_logo; ?>" >
                    </div>						
                    <div class="header-content">
                        <h3 class="title "><?php echo $rateInfo->brand; ?></h3>
                        <p class="subtitle"><?php echo $rateInfo->service; ?></p>
                    </div>															
                </div>
                <div class="body">
                    <p><?php echo $rateInfo->description; ?></p>
                    <?php if( $delivery_info ): ?>
                        <p><strong><?php echo wpcsr_delivery_information_label(); ?></strong></p>
                        <p><?php echo wpcsr_type_label(); ?>: <?php echo $delivery_info->title; ?></p>
                        <p><?php echo wpcsr_description_label(); ?>: <?php echo $delivery_info->description; ?></p>
                    <?php endif; ?>
                </div>							
            </div>					
        </div>
    </div>
    <div class="wpcargo-col-md-2 text-right">
        <?php if( abs($rateInfo->rate_protection) > 0 ): ?>
            <div class="wpcsr-rate-block wpcsr-with-protection">
                <div class="wpcsr-rate wpcsr-inline">
                    <p class="wpcsr-label">
                        <strong>
                            <?php echo wpcsr_protection_variation_label(); ?>
                        </strong>
                        <a class="protection-info-btn" data-value="<?php echo $rateID; ?>"><?php echo wpcsr_read_more_label(); ?></a>
                    </p>
                    <p class="wpcsr-exc-vat-price"><span class="bold-price"><?php echo format_wpcsr_currency( wpcsr_get_shipment_rate( $rateID, $package_weight, 1 ), true); ?></span> <?php echo wpcsr_vat_labels(); ?></p>								
                    <form class="wpcsr-inline" action="" method="POST">
                        <?php wp_nonce_field( 'wpcsr_create_order_action', 'wpcsr_create_order_step2' ); ?>
                        <input type="hidden" name="_wpcsr" value="<?php echo $rateID;  ?>">
                        <input type="hidden" name="wpc-multiple-package" value="<?php echo $wpcsr_parcels; ?>">
                        <input type="hidden" name="wpc-pm-piece-type" value="<?php echo $package_type; ?>">
                        <input type="hidden" name="origin" value="<?php echo $ship_from_info->location; ?>">
                        <input type="hidden" name="origin_postcode" value="<?php echo $origin_postcode; ?>">
                        <input type="hidden" name="destination" value="<?php echo $ship_to_info->location; ?>">
                        <input type="hidden" name="destination_postcode" value="<?php echo $destination_postcode; ?>">
                        <input type="hidden" name="protection" value="1">
                        <input type="hidden" name="weight" value="<?php echo $package_weight; ?>">
                        <input class="wpcargo-btn wpcargo-btn-primary wpcsr-purchase-btn" type="submit" value="<?php echo wpcsr_book_now_label(); ?>">
                    </form>
                </div>
            </div>
        <?php endif; ?>
        <div class="wpcsr-rate-block wpcsr-no-protection">
            <div class="wpcsr-rate wpcsr-inline">
                <p class="wpcsr-label"><strong><?php echo wpcsr_no_protection_label(); ?></strong></p>
                <p class="wpcsr-exc-vat-price"><span class="bold-price"><?php echo format_wpcsr_currency(wpcsr_get_shipment_rate( $rateID, $package_weight, 0 ), true); ?></span> <?php echo wpcsr_vat_labels(); ?></p>
                <form class="wpcsr-inline" action="" method="POST">
                    <?php wp_nonce_field( 'wpcsr_create_order_action', 'wpcsr_create_order_step2' ); ?>
                    <input type="hidden" name="_wpcsr" value="<?php echo $rateID; ?>">
                    <input type="hidden" name="wpc-multiple-package" value="<?php echo $wpcsr_parcels; ?>">
                    <input type="hidden" name="wpc-pm-piece-type" value="<?php echo $package_type; ?>">
                    <input type="hidden" name="origin" value="<?php echo $ship_from_info->location; ?>">
                    <input type="hidden" name="origin_postcode" value="<?php echo $origin_postcode; ?>">
                    <input type="hidden" name="destination" value="<?php echo $ship_to_info->location; ?>">
                    <input type="hidden" name="destination_postcode" value="<?php echo $destination_postcode; ?>">
                    <input type="hidden" name="protection" value="0">
                    <input type="hidden" name="weight" value="<?php echo $package_weight; ?>">
                    <input class="wpcargo-btn wpcargo-btn-primary wpcsr-purchase-btn" type="submit" value="<?php echo wpcsr_book_now_label(); ?>">
                </form>			
            </div>
        </div>
        <?php do_action( 'before_wpcsr_rate_result_body', $rateInfo ) ?>
    </div>
</div>
<?php if( abs($rateInfo->rate_protection) > 0 ): ?>
    <div id="wpcsr-protection-info" class="wpcsr-modal hide-element protection-<?php echo $rateID; ?>">
        <div class="wpcsr-modal-content">
            <span class="exit-modal">&times;</span>
            <div class="body">
                <?php do_action( 'wpcsr_protection_covered_information', $rateInfo ) ?>
            </div> 						
        </div>					
    </div>
<?php endif; ?>