@charset "utf-8";

.search-box {
  margin: 20px 0 28px;
  padding: 18px;
  background: #f8fbff;
  border: 1px solid #d8e6f5;
  border-radius: 10px;
  position: relative;
  z-index: 20;
  overflow: visible !important;
  box-sizing: border-box;
}

.search-label {
  display: block;
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 1.05em;
}

.search-form {
  margin: 0;
}

.search-row {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  align-items: center;
  overflow: visible !important;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  z-index: 30;
  overflow: visible !important;
}

.search-input-wrap input[type="text"] {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 16px;
  border: 1px solid #c8ced6;
  border-radius: 12px;
  font-size: 16px;
  background: #fff;
}

.search-input-wrap input[type="text"]:focus {
  outline: none;
  border-color: #d86d6d;
  box-shadow: 0 0 0 3px rgba(216, 109, 109, 0.12);
}

.search-row button {
  flex: 0 0 92px;
  width: 92px;
  padding: 12px 0;
  border: 1px solid #d86d6d;
  background: #d86d6d;
  color: #fff;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  font-size: 16px;
  font-weight: bold;
}

.search-row button:hover {
  background: #c95c5c;
  border-color: #c95c5c;
}

.suggest-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  z-index: 99999;
  overflow: hidden;
}

.suggest-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  background: #fff;
  font-size: 14px;
  line-height: 1.4;
}

.suggest-item:last-child {
  border-bottom: none;
}

.suggest-item:hover {
  background: #f5f5f5;
}

.suggest-item-more {
  font-weight: bold;
  color: #333;
}

@media screen and (max-width: 600px) {
  .search-box {
    padding: 14px;
  }

  .search-label {
    margin-bottom: 8px;
    font-size: 1em;
  }

  .search-row {
    gap: 8px;
  }

  .search-input-wrap input[type="text"] {
    padding: 10px 12px;
    font-size: 16px;
  }

  .search-row button {
    flex: 0 0 76px;
    width: 76px;
    padding: 10px 0;
    font-size: 15px;
  }
}

/* =========================================
   スマホ検索サジェスト専用UI
   HanabiSuggest用
========================================= */
@media screen and (max-width: 900px) {

  body.suggest-mode {
    overflow: hidden;
  }

  body.suggest-mode #mainimg,
  body.suggest-mode #sp-top-cta-ab,
  body.suggest-mode #main > section,
  body.suggest-mode #sub,
  body.suggest-mode #side,
  body.suggest-mode footer,
  body.suggest-mode .nav-fix-pos-pagetop,
  body.suggest-mode #menubarNew {
    display: none !important;
  }

  body.suggest-mode #contents,
  body.suggest-mode #contents-in,
  body.suggest-mode #main {
    width: 100%;
    margin: 0;
    padding: 0;
    float: none;
  }

  body.suggest-mode .search-box {
    position: fixed;
    top: 8px;
    left: 8px;
    right: 8px;
    z-index: 10000;
    margin: 0 !important;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  }

  body.suggest-mode .search-form {
    margin: 0;
  }

  body.suggest-mode .search-row {
    display: block;
  }

  body.suggest-mode .search-input-wrap {
    width: 100%;
    position: relative;
  }

  body.suggest-mode #keywordInput {
    width: 100%;
    box-sizing: border-box;
    font-size: 16px; /* iPhoneの自動ズーム対策 */
  }

  body.suggest-mode .search-form button[type="submit"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
  }

  body.suggest-mode #suggestBox,
  body.suggest-mode .suggest-box {
    display: block;
    position: static !important;
    margin-top: 8px;
    max-height: calc(var(--suggest-vh, 100vh) - 170px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
  }
}