*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overscroll-behavior: none;
}

body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Hiragino Kaku Gothic", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "游ゴシック体", YuGothic, "游ゴシック Medium", "Yu Gothic Medium", Meiryo,
    sans-serif;
}

main {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--color-white);
}

/* 画面 */
.screen {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 500ms ease 200ms, visibility 500ms ease 200ms;
}
.screen[data-shown="true"] {
  height: auto;
  overflow: visible;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 読み込み画面 */
/* #loading_screen {
} */
#loading_screen > .contents {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 100vh;
}
#loading_screen > .contents > .message {
  display: inline-block;
  color: var(--color-black);
}

/* 検索画面 */
/* #search_screen {
} */
#search_screen > .contents {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  width: 90%;
  /* min-width: 980px; */
  height: 100%;
  min-height: 100vh;
}
/* ヘッダ */
#search_screen > .contents > .header {
  flex: 0;
  padding: 4px;
}
#search_screen > .contents > .header > h3 {
  margin: 4px 0;
  font-weight: bold;
}
#search_screen > .contents > .header > p {
  margin: 5px auto 5px 30px;
  font-size: 12px;
}
/* ボディ */
#search_screen > .contents > .body {
  flex: 1;
  overflow: hidden;
}

/* メニュータブヘッダ */
#menu_tab_control > .header {
  width: 100%;
  flex: 0;
  background-color: var(--color-white);
}

/* メニュータブページ */
#menu_tab_control > .pages > .page[data-shown="true"] {
  height: 100%;
}

/* 頭文字タブ */
#initial_tab_control > .bar > .tabs > .tab.na {
  /* 該当データが無いタブを削除 */
  display: none;
}

/* 頭文字タブページ */
#initial_tab_control > .pages > .page.na {
  /* 該当データが無いタブを削除 */
  display: none;
}
#initial_tab_control > .pages > .page > .accordion_control > .summary {
  display: none;
}

/* お気に入りタブパネルコントロール */
#favorite_tab_panel_control {
  --panel-item-width: 195px;
  --panel-item-height: 195px;
}
#favorite_tab_panel_control > .groups > .group > .contents > .title {
  padding: 0px;
}

#favorite_tab_panel_control > .groups > .group > .contents > .items {
  margin-top: 20px;
}

/* 利用条件ダイアログ */
#terms_of_use_dialog {
  width: 800px;
  height: 600px;
  border: none;
}

#terms_of_use_dialog > .contents {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 95%;
  height: 100%;
  margin: 0 auto;
}

#terms_of_use_dialog > .contents > .description {
  flex: 0;
}

#terms_of_use_dialog > .contents > .terms {
  --terms-background-color: var(--color-white);

  flex: 1;
  /* ダイアログサイズ基準 */
  background-color: var(--terms-background-color);
  border: 1px solid var(--color-gray);
  overflow: auto;
  /* 左右は中央になるようにマージン */
  margin: 15px auto;
}

#terms_of_use_dialog > .contents > .terms > h4 {
  margin: 10px 0;
}

#terms_of_use_dialog > .contents > .terms > p {
  margin: auto 14px 12px;
  font-size: 14px;
  line-height: 1.15;
}

#terms_of_use_dialog > .contents > .terms > ul {
  margin: 0;
  padding: 0;
}

#terms_of_use_dialog > .contents > .terms > ul > li {
  list-style: none;
  margin: auto 25px 5px;
  font-size: 14px;
}

#terms_of_use_dialog > .contents > .terms > ul > li > ul {
  list-style-type: circle;
  padding-left: 15px;
}

#terms_of_use_dialog > .contents > .terms > ul > li > ul > li {
  list-style: none;
  margin: auto 5px;
}

#terms_of_use_dialog > .contents > .terms > .eula_head {
  font-size: 14px;
  margin-top: 10px;
  margin-left: 14px;
  margin-bottom: 5px;
}

#terms_of_use_dialog > .contents > .agrees {
  flex: 0;
}

#terms_of_use_dialog > .contents > .agrees > .agree_button {
  --agreeButton-background-color: var(--color-black);
  --agreeButton-color: var(--color-white);

  /* ボタン見た目 */
  width: 200px;
  height: 50px;
  background-color: var(--agreeButton-background-color);
  border: none;
  border-radius: 25px;
  cursor: pointer;

  /* 左右は中央になるようにマージン */
  margin: 0px auto;

  /* ボタンの子要素 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#terms_of_use_dialog > .contents > .agrees > .agree_button span {
  color: var(--agreeButton-color);
  font-size: 14px;
}

/* 利用条件ダイアログの説明用アコーディオン */
#term_description_rollup > .contents > p {
  margin: 0;
  font-size: 14px;
}

#term_description_rollup > .contents > p > a {
  color: var(--color-black);
  word-break: keep-all;
}

/* 資料一覧ダイアログ */
#list_of_documents_dialog {
  width: 90%;
  height: 90vh;
  min-width: 800px;
  min-height: 600px;
  border: none;
}

#list_of_documents_dialog .favorite {
  position: absolute;
  top: 0;
  right: 0;
  border-bottom: 1px solid var(--color-gray);
  border-left: 1px solid var(--color-gray);
  border-bottom-left-radius: 8px;
  transition: opacity 300ms ease;
}

#list_of_documents_dialog .favorite > .favorite_button {
  cursor: pointer;
}

#list_of_documents_dialog .favorite > .favorite_button > .favorite_button_input {
  display: none;
}

#list_of_documents_dialog .favorite > .favorite_button > .favorite_button_inner {
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-dark-gray);
  transition: background-color 300ms ease, color 300ms ease, border 300ms ease;
}

#list_of_documents_dialog .favorite > .favorite_button > .favorite_button_inner::before {
  display: inline-block;
  width: 19px;
  height: 19px;
  margin-top: -2px;
  margin-right: 5px;
  vertical-align: middle;
  content: "";
  background: url(../resource/icon_heart_gray.svg) no-repeat 0 0;
  background-size: 100% auto;
  transition: background-image 300ms ease;
}

#list_of_documents_dialog .favorite > .favorite_button > .favorite_button_input:checked + .favorite_button_inner::before {
  background-image: url(../resource/icon_heart_active.svg);
}

#list_of_documents_dialog > .contents {
  overflow-y: auto;
  margin: 0 20px 20px;
}

#list_of_documents_dialog .accordion_control {
  margin-bottom: 10px;
}

/* 資料が存在するアコーディオン */
#list_of_documents_dialog .accordion_control > .summary {
  background-color: var(--color-dark-blue);
}

#list_of_documents_dialog .accordion_control > .summary > .title {
  color: var(--color-white);
  font-size: 16px;
  font-weight: bold;
  margin-left: 5px;
}

#list_of_documents_dialog .accordion_control > .summary > .title > .year {
  font-size: 24px;
  font-weight: bold;
}

#list_of_documents_dialog .accordion_control > .summary > .toggle {
  --toggle-border-color: var(--color-white);
}

/* 資料が存在しないアコーディオン */
#list_of_documents_dialog .no_doc > .summary {
  background-color: var(--color-dark-gray);
}

#list_of_documents_dialog .detail {
  background-color: var(--color-white);
}

#list_of_documents_dialog .model {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 40px 10px 10px 10px;
}

#list_of_documents_dialog .model_image {
  flex: 0.6;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

#list_of_documents_dialog .model_image > .image {
  object-fit: contain;
  width: 100%;
  min-width: 200px;
  max-height: 500px;
}

#list_of_documents_dialog .documents {
  flex: 0.4;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  margin-left: 10px;
}

#list_of_documents_dialog .documents > .document {
  margin-top: 10px;
}

#list_of_documents_dialog .doc_label {
  display: flex;
  flex-direction: row;
  align-items: center;
}

#list_of_documents_dialog .doc_label > span {
  display: flex;
  height: 40px;
  margin-top: 5px;
  padding-left: 5px;
  border-left: 6px solid var(--color-red);
  font-weight: bold;
  align-items: center;
}

#list_of_documents_dialog .doc_label > .tooltip_control {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin: 2px 5px;
}

#list_of_documents_dialog .doc_label > .tooltip_control > .mark {
  font-size: 16px;
}

#list_of_documents_dialog .doc_label > .tooltip_control > .contents {
  font-weight: normal;
  font-size: 12px;
}

#list_of_documents_dialog .doc_label .info_button {
  cursor: pointer;
}

#list_of_documents_dialog .doc_buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  margin: 10px;
}

#list_of_documents_dialog .doc_button {
  margin: 4px;
  align-content: center;
  text-align: center;
  cursor: pointer;

  /* 見た目 */
  background-color: var(--color-black);
  color: var(--color-white);
  min-width: 120px;
  height: 30px;
  border-radius: 20px;

  /* マウスホバー時 */
  transition: background-color 300ms ease, color 300ms ease, border 300ms ease;
}

#list_of_documents_dialog .doc_button:hover {
  color: var(--color-black);
  background-color: var(--color-light-gray);
  border: 1px solid var(--color-black);
}

#list_of_documents_dialog .doc_button > span {
  font-weight: bold;
}

/* 資料ガイドツールチップ */
#doc_guide_tooltip > .contents {
  max-width: 280px;
}
#doc_guide_tooltip > .contents > p {
  margin: 5px auto;
  font-size: 12px;
}

/* SP */
@media screen and (max-width: 768px) {
  /* 検索画面 */
  #search_screen > .contents {
    width: 100%;
    min-width: 100%;
  }

  #search_screen > .contents > .header > p {
    margin: 5px 10px;
    font-size: 12px;
  }

  /* 頭文字タブ*/
  #initial_tab_control > .bar {
    display: none;
  }

  /* 頭文字タブページ */
  /* data-shownに関わらず全てのページを強制的に表示 */
  #initial_tab_control > .pages > .page {
    height: auto;
    overflow: visible;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  #initial_tab_control > .pages > .page > .accordion_control {
    margin: 10px;
  }
  #initial_tab_control > .pages > .page > .accordion_control > .summary {
    display: flex;
  }

  #favorite_tab_panel_control {
    --panel-item-width: 168px;
    --panel-item-height: 168px;
  }

  /* 利用条件ダイアログ */
  #terms_of_use_dialog {
    width: 98%;
    border: none;
  }

  /* 資料一覧ダイアログ */
  #list_of_documents_dialog {
    width: 98%;
    min-width: auto;
    border: none;
  }

  #list_of_documents_dialog > .contents {
    margin: 0;
  }

  #list_of_documents_dialog .documents > .document {
    margin-top: 0;
  }

  #list_of_documents_dialog .model {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
  }

  #list_of_documents_dialog .accordion_control > .summary > .title {
    font-size: 14px;
    font-weight: bold;
  }

  #list_of_documents_dialog .accordion_control > .summary > .title > .year {
    font-size: 18px;
    font-weight: bold;
  }

  #list_of_documents_dialog .model_image {
    margin-top: 0px;
  }

  #list_of_documents_dialog .model_image > .image {
    width: 100%;
  }
}
