<?php
/**
 * Search form template
 *
 * @package Rosea
 *
 * This file is part of the Rosea WordPress theme.
 *
 * Rosea WordPress Theme, Copyright 2026 nopStation
 * Rosea is distributed under the terms of the GNU General Public License v2 or later.
 *
 * @license GPL-2.0-or-later
 * @license URI: https://www.gnu.org/licenses/gpl-2.0.html
 */
?>

<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
	<label for="search-field" class="screen-reader-text"><?php esc_html_e( 'Search for:', 'rosea' ); ?></label>
	<div class="input-group">
		<input type="search" id="search-field" class="form-control amber-border" placeholder="<?php esc_attr_e( 'Search blog posts...', 'rosea' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" aria-label="<?php esc_attr_e( 'Search blog posts', 'rosea' ); ?>" required>
		<div class="input-group-append">
			<button class="input-group-text amber lighten-3" type="submit" aria-label="<?php esc_attr_e( 'Submit search', 'rosea' ); ?>">
				<span class="screen-reader-text"><?php esc_html_e( 'Search', 'rosea' ); ?></span>
				<i class="fas fa-search pr-2" aria-hidden="true"></i> 
				<span aria-hidden="true"><?php esc_html_e( 'Search', 'rosea' ); ?></span>
			</button>
		</div>
	</div>
</form>
