<?php
/**
 * Search form template
 *
 * @package Pawfect
 */

// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}

$unique_id = wp_unique_id('search-form-');
?>

<form role="search" method="get" class="search-form pawfect-post-search" action="<?php echo esc_url(home_url('/')); ?>">
    <label for="<?php echo esc_attr($unique_id); ?>">
        <span class="screen-reader-text"><?php esc_html_e('Search for:', 'pawfect'); ?></span>
        <input type="search"
               id="<?php echo esc_attr($unique_id); ?>"
               class="search-field"
               placeholder="<?php esc_attr_e('Search posts...', 'pawfect'); ?>"
               value="<?php echo esc_attr( get_search_query() ); ?>"
               name="s" />
    </label>
    <button type="submit" class="search-submit" aria-label="<?php esc_attr_e('Search Submit', 'pawfect'); ?>">
        <span class="screen-reader-text"><?php esc_html_e('Search', 'pawfect'); ?></span>
      <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="#ffffff" viewBox="0 0 256 256">
                            <path d="M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"></path>
                        </svg>
    </button>
</form>
