
/* リセット用スタイル */
body {
  margin-block: 0;
}

p {
  margin: 0;
}

/* ヘッダー */
.header {
  position: relative;
  margin-block: 18px 24px;
}

/* ロゴ */
.header-logo {
  position: absolute;
  left: 0;
  top: 0;
  max-width: 263px;
  width: 100%;
  margin: 0;
}

/* 表示項目切り替えボタン */
.database-change {
  padding-top: 4px;
}

.database-change .hint {
  display: flex;
  align-items: center;
  -moz-column-gap: 6px;
  column-gap: 6px;
  margin-right: 18px;
  font-size: 14px;
  text-decoration: underline;
  font-weight: 500;
}

.database-change .hint .arrow {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F89A18;
  border-radius: 50%;
}

.database-change {
  display: flex;
  justify-content: flex-end;
  -moz-column-gap: 6px;
  column-gap: 6px;
  text-align: right;
}

.database-change button {
  padding: 10px 24px 10px 16px;
  display: flex;
  align-items: center;
  -moz-column-gap: 6px;
  column-gap: 6px;
  border-radius: 20px 20px 0 0;
}

/* 表示項目切り替えボタンのアイコン */
.database-change button::before {
  content: '';
  display: inline-block;
  width: 38px;
  height: 38px;
}

/* 加工食品検索ボタン */
#fooddb-buttun {
  background: #4D8017;
  /* 緑 */
}

/* 料理レシピ検索ボタン */
#recipedb-buttun {
  background: #F89A18;
  /* オレンジ */
}

/* 加工食品検索ボタンのアイコン */
#fooddb-buttun::before {
  background: url('../../common/img/icon-food.svg') no-repeat center/contain;
}

/* 料理レシピ検索ボタンのアイコン */
#recipedb-buttun::before {
  background: url('../../common/img/icon-recipe.svg') no-repeat center/contain;
}

/* 項目検索部分 */
.searchtables {
  padding: 28px 30px;
  background: #4D8017;
  /* 緑 */
}

#first_search_table td {
  height: 57px;
  padding: 0 8px 0 0;
}

#first_search_table #filter_global td:first-child {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

#example th,
#example td {
  min-width: 158px;
}

#example th:first-child,
#example td:first-child {
  min-width: 80px;
}

/*
 #kensakutables1,
 #kensakutables2 {
    display: flex;
 }
    */

/* 検索用テーブルとボタンの配置 */
#first_search_table {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}


#allergy input {
  width: auto;
  /*readmore.cssのサイズ幅の例外に設定*/
}

/*ボタンの共通スタイル*/
button {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease;
  /* ホバー時の背景色の変化をスムーズに */
}

/* 検索ボタンのスタイル*/
.search_button {
  width: 100px;
  height: 57px;
  flex-shrink: 0;
  color: #fff;
  border-radius: 76px;
  background: #F89A18;
  /* オレンジ */
}

.search_button:hover {
  background: rgba(248, 154, 24, .8);
  /* ホバー時はオレンジを少し透過*/
}

/* 栄養素表示ボタンのスタイル */
#simple_nutrition_button,
#all_nutrition_button {
  color: #000;
  font-size: 13px;
  background: none;
}

#simple_nutrition_button:hover,
#all_nutrition_button:hover {
  text-decoration: underline;
}

/* 詳細検索へボタン */
.readmore-button-box a {
  width: 180px;
  padding: 14px 12px 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #F89A18;
  /* オレンジ */
  border-radius: 76px;
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .3s ease;
}

/* 詳細検索へボタンの矢印 */
.readmore-button-box .arrow {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
}

.readmore-button-box a:hover {
  background: rgba(248, 154, 24, .8);
}

#search_button2,
.close-button-box {
  display: inline-block;
  width: 195px;
}

.close-button-box a {
  width: 100%;
  background: #70C837;
  color: #fff;
  border-radius: 76px;
  padding-block: 16px 17px;
  display: inline-block;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: background-color .3s ease;
}

.close-button-box a:hover {
  background: rgba(112, 200, 55, .8);
}


/* select要素のスタイル */
select,
input[type="search"] {
  width: 200px;
  height: 57px;
  padding: 8px;
  border-radius: 10px;
  background-color: #fff;
  font-size: 16px;
  font-weight: 700;
  color: #333;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="#333" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
  border: none;
}

select:focus,
input[type="search"]:focus {
  border-color: #66afe9;
  outline: none;
  box-shadow: 0 0 5px rgba(102, 175, 233, 0.6);
}

/* allergy_containerの要素の横幅を12%に設定 */
#allergy_search2 {
  width: 150px;
}

/* 原材料名の列幅を広くするスタイル */
#example td.wide-column {
  min-width: 300px !important; /* 必要に応じて幅を調整 */
  }

/* フッターのスタイル */
footer {
  padding-block: 20px;
}

footer p {
  font-size: 12px;
  text-align: center;
}


/* 画面が少し小さい時用のスタイル */
@media screen and (max-width: 1130px) {
  .database-change {
    padding-top: 80px;
  }
}

/* スマホ用のスタイル */
@media screen and (max-width: 768px) {

  #example th,
  #example td {
    min-width: 50px;
  }

  #allergy_search2 {
    width: 150px;
  }

  .searchtables table,
  .searchtables tr,
  .searchtables td {
    display: block;
    width: 100%;
  }

  .searchtables td {
    margin-bottom: 10px;
  }

  .searchtables select,
  .searchtables input[type="search"] {
    width: 100%;
  }

}

/* DBのスタイル変更 */
#example {
  border-collapse: collapse;
  border: none;
}

#example th,
#example td {
  font-size: 13px;
  box-shadow: none;
}

table.dataTable>thead>tr>th,
table.dataTable>thead>tr>td {
  border-bottom: 2px solid #fff;
}

#example th {
  text-align: left;
  border: 2px solid #fff;
  background: #DBD7BE;
}

#example td {
  font-weight: 700;
}

#example td a {
  display: block;
  color: #F89A18;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

#example tbody>tr:nth-child(odd) {
  background: #F6F6F6;
}

#example tbody>tr:nth-child(even) {
  background: #F0F0F0;
}

#example .row-border>tbody>tr>*,
table.dataTable.display>tbody>tr>*,
table.dataTable.row-border>tbody>tr:first-child>*,
table.dataTable.display>tbody>tr:first-child>* {
  border: 2px solid #fff;
}

/* 表の矢印変更 */
#example thead>tr>th.dt-orderable-asc span.dt-column-order:before,
#example thead>tr>th.dt-ordering-asc span.dt-column-order:before,
#example thead>tr>td.dt-orderable-asc span.dt-column-order:before,
#example thead>tr>td.dt-ordering-asc span.dt-column-order:before,
#example thead>tr>th.dt-orderable-desc span.dt-column-order:after,
#example thead>tr>th.dt-ordering-desc span.dt-column-order:after,
#example thead>tr>td.dt-orderable-desc span.dt-column-order:after,
#example thead>tr>td.dt-ordering-desc span.dt-column-order:after {
  position: absolute;
  display: block;
  content: "";
  width: 10px;
  height: 10px;
  color: #fff;
  border: 2px solid #fff;
  box-sizing: border-box;
  opacity: 1;
}

#example thead>tr>th.dt-orderable-asc span.dt-column-order:before,
#example thead>tr>th.dt-ordering-asc span.dt-column-order:before,
#example thead>tr>td.dt-orderable-asc span.dt-column-order:before,
#example thead>tr>td.dt-ordering-asc span.dt-column-order:before {
  transform: rotate(-45deg);
  border-left: 0;
  border-bottom: 0;
}

#example thead>tr>th.dt-orderable-desc span.dt-column-order:after,
#example thead>tr>th.dt-ordering-desc span.dt-column-order:after,
#example thead>tr>td.dt-orderable-desc span.dt-column-order:after,
#example thead>tr>td.dt-ordering-desc span.dt-column-order:after {
  transform: rotate(-45deg);
  border-top: 0;
  border-right: 0;
}

#example thead>tr>th.dt-ordering-asc span.dt-column-order:before,
#example thead>tr>th.dt-ordering-desc span.dt-column-order:after,
#example thead>tr>td.dt-ordering-asc span.dt-column-order:before,
#example thead>tr>td.dt-ordering-desc span.dt-column-order:after {
  border-color: #8C8868;
  opacity: 1;
}

/* ページネーション */
#example_wrapper.dt-container .dt-paging .dt-paging-button.first,
#example_wrapper.dt-container .dt-paging .dt-paging-button.previous,
#example_wrapper.dt-container .dt-paging .dt-paging-button.next,
#example_wrapper.dt-container .dt-paging .dt-paging-button.last {
  width: 30px;
  height: 30px;
  margin: 4px 2px;
  color: #fff !important;
  border-radius: 50%;
  background: #F89A18;
}

#example_wrapper.dt-container .dt-paging .dt-paging-button {
  margin: 4px 6px;
  padding: 0;
  border: none;
  font-weight: 700;
}

#example_wrapper.dt-container .dt-paging .dt-paging-button.disabled,
#example_wrapper.dt-container .dt-paging .dt-paging-button.disabled:hover,
#example_wrapper.dt-container .dt-paging .dt-paging-button.disabled:active {
  padding: 0;
}

#example_wrapper.dt-container .dt-paging .dt-paging-button:hover,
#example_wrapper.dt-container .dt-paging .dt-paging-button.current,
#example_wrapper.dt-container .dt-paging .dt-paging-button.current:hover {
  color: #000 !important;
  border: none;
  background: none;
}

#example_wrapper.dt-container .dt-paging .dt-paging-button.current {
  text-decoration: underline !important;
}

#example_wrapper.dt-container .dt-paging .dt-paging-button:hover,
#example_wrapper.dt-container .dt-paging .dt-paging-button.current:hover {
  opacity: .8;
}

#example_wrapper.dt-container .dt-paging .dt-paging-button:active {
  background: none;
  box-shadow: none;
}

#rag-btn {
  position: fixed;
  bottom: 85px;
  right: 5px;
  z-index: 999;
}

#rag-frame {
  position: fixed;
  bottom: 140px;
  right: 10px;
}