search box

スライドして開く検索ボックスサンプルです。

```html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.css">
<style>
@font-face {
  font-family: 'Noto Sans JP';
  font-style: normal;
  font-weight: 400;
  src: local("Noto Sans CJK JP Regular"),
       url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Regular.woff2) format('woff2'),
       url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Regular.woff) format('woff'),
       url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Regular.otf) format('opentype');
}
*,
*::before,
*::after {
  box-sizing: inherit;
}
body {
  box-sizing: border-box;
  font-family: 'Noto Sans JP', sans-serif;
}

/* sample +++++++++++++++++++ */
.header {
  position: relative;
  width: 1080px;
  margin: 0 auto;
  border: 1px solid transparent;
}
.header > .logo {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 50px;
}
.header > .gnav {
  display: flex;
  height: 50px;
  margin: 0;
  padding-left: 120px;
  background: #EEE;
  list-style: none;
}
.header > .gnav > li {
  flex: 1;
  text-align: center;
}
.header > .btn-nav {
  position: absolute;
  top: 50px;
  right: 0;
  width: 80px;
}
.header > .btn-nav a {
  display: block;
  width: 80px;
  height: 24px;
  background-color: #000;
  color: #fff;
}
.header > .btn-nav a:hover {
  background-color: #999;
}

/* search +++++++++++++++++++ */
.header-search {
  position: absolute;
  top: 50px;
  right: 0;
  z-index: 2;
  width: 1080px;
  height: 0;
}
.header-search > .field {
  position: absolute;
  top: 0;
  right: 0;
  display: block;
  overflow: hidden;
  width: 124px;
  padding: 0;
  transition: 0.3s ease;
  visibility: hidden;
}
.header-search .btn-search,
.header-search .btn-toggle {
  position: absolute;
  top: 0;
  overflow: hidden;
  display: block;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: transparent;
  line-height: 24px;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}
.header-search .btn-search {
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
}
.header-search .btn-toggle {
  right: 100px;
  visibility: visible;
}
.header-search .input-search {
  width: 100%;
  height: 24px;
  padding: 0 24px;
  visibility: hidden;
}

/* show | hidden */
.header-search .chk-toggle {
  position: absolute;
  z-index: -2;
  opacity: 0.001;
}
.chk-toggle:checked ~ .field {
  width: 100%;
}
.chk-toggle:checked ~ .field > .input-search {
  visibility: visible;
}
.chk-toggle:checked ~ .field > .btn-search {
  visibility: visible;
}
.chk-toggle:checked ~ .field > .btn-toggle {
  right: 0;
}
</style>
</head>
<body>

<header class="header">
  <p class="logo">logo</p>
  <ul class="gnav">
    <li>menu</li>
    <li>menu</li>
    <li>menu</li>
    <li>menu</li>
  </ul>
  <div class="header-search">
    <input type="checkbox" id="toggle" class="chk-toggle">
    <form class="field">
      <input type="text" name="kw" class="input-search" placeholder="SEARCH">
      <button type="submit" class="btn-search">◎</button>
      <label for="toggle" class="btn-toggle">◎</label>
    </form>
  </div>
  <div class="btn-nav"><a href="">menu</a></div>
</header>

</body>
</html>
```