<?php

if ( in_array($initial_theme, $free_themes) ) return;

if ( $is_preview || current_user_can('publish_pages') ) {

    ?>
    
    <div class="gs-team-restrict--pro-template">

        <div class="gs-team-restrict--pro-template-inner">

            <button class="gs-team-restrict--hide-btn" onclick="hide_restrict_notice(event)">X</button>

            <h2><?php _e( 'Sorry!', 'gsteam' ); ?></h2>

            <p style="margin-bottom: 16px;"><?php _e( 'This theme is not available in free version.<br>Please upgrade the plan to use this theme. Thanks!', 'gsteam' ); ?></p>

            <a href="https://www.gsplugins.com/product/gs-team-members/" target="_blank"><?php _e( 'Learn more details', 'gsteam' ); ?></a>
            
            <p class="gs-team-restrict--notice"><?php _e( 'Only Admin & Editor will see this message, visitor will see <strong>Grid 1 (Hover)</strong> template.', 'gsteam' ); ?></p>
            
            <p class="gs-team-restrict--info"><?php _e( 'This message is generated by <strong>GS Team</strong> plugin.', 'gsteam' ); ?></p>

        </div>

    </div>

    <style>
        .gs_team_area{position:relative;min-height:600px}.gs-team-restrict--pro-template{width:100%;max-width:100%;padding:2.5em!important;margin-left:auto;margin-right:auto;position:absolute;top:0;left:0;height:100%;z-index:99;background:rgb(62 68 84 / 60%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.gs-team-restrict--pro-template-inner{background:#fff;border-radius:4px;padding:2em;-webkit-box-shadow:0 0 2em rgb(133 134 156 / 20%);box-shadow:0 0 2em rgb(133 134 156 / 20%);position:relative}.gs-team-restrict--pro-template-inner h2{margin:0;margin-bottom:20px;font-size:2em;letter-spacing:1px}.gs-team-restrict--pro-template-inner .gs-team-restrict--notice{background:#ffefd5;padding:20px;margin-top:30px;border-radius:4px;font-size:.8em}.gs-team-restrict--pro-template-inner .gs-team-restrict--info{margin-top:20px;margin-bottom:0;font-size:.7em}.gs-team-restrict--pro-template-inner .gs-team-restrict--hide-btn{position:absolute;top:20px;right:20px;width:34px;height:34px;z-index:9999;line-height:34px;font-size:16px;padding:0;margin:0;border-radius:50%;background:#e3e4e8;color:#454356;outline:0;text-decoration:none;text-indent:unset}
    </style>

    <script>
        function hide_restrict_notice( event ) {jQuery( event.target ).closest('.gs-team-restrict--pro-template').fadeOut();}
    </script>

    <?php
    
}