@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/
.author-box .author-name a {
  text-decoration: none;
  color: #ffffff;
} 

/************************************
** アイキャッチ画像を記事タイトルの上に移動する
************************************/

/*記事ヘッダーの枠組み*/
.article-header {
	display: flex; /*フレックスボックスレイアウト*/
	flex-direction: column; /*ブロック要素を縦に並べる*/
}

/*アイキャッチの枠組み*/
.eye-catch-wrap {
	order: -1; /*順番*/
	overflow: hidden; /*はみ出した部分を非表示 ※IE対策*/
}

/*アイキャッチ*/
.eye-catch {
	margin-bottom: 0; /*下の余白*/
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}

function add_header_searchform($navi, $args) {
 ob_start();
	get_template_part('searchform');
 	$searchform = ob_get_contents();
 ob_end_clean();
 if( $args->theme_location == NAV_MENU_HEADER ){
  $navi .= '<li class="header-search">' . $searchform . '</li>';
 }
 return $navi;
}
add_filter('wp_nav_menu_items','add_header_searchform', 10, 2);


.header-search {
  width: 200px !important;
}

.header-search .search-box {
  margin: 0;
}

.header-search input[type="text"] {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 14px 14px 14px 14px / 50% 50% 50% 50%;
}

.header-search .search-submit {
  color: #378cb0;
}


cocoon-master > tmp > header-container.php

        <?php //ロゴ前にコードを挿入するためのアクションフック
        do_action( 'wp_header_logo_before_open' ); ?>

        <?php //ロゴタグの生成
        generate_the_site_logo_tag(); ?>

        <?php //ロゴ後にコードを挿入するためのアクションフック
        do_action( 'wp_header_logo_after_open' ); ?>


function add_header_contents() {
	get_template_part('searchform');
}
add_filter('wp_header_logo_after_open','add_header_contents', 10, 2);



.header-in {
  position: relative;
}

.header-in .search-box {
  position: absolute;
  top: 50%;
  right: 16px;
  margin: 0;
  width: 280px;
  transform: translateY(-50%);
}

.header-in input[type="text"] {
  padding: 8px 14px 8px 40px;
  font-size: 14px;
  background: #edf6f9;
  border: 1px solid #9fcde1;
  border-radius: 16px 16px 16px 16px / 50% 50% 50% 50%;
}

.header-in .search-submit {
  left: 3px;
  right: auto;
  color: #378cb0;
}

/*1023px以下*/
@media screen and (max-width: 1023px) {
  .header-in .search-box {
    display: none;
  }
}

