/* CSSスタイル */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* リンクの下線を消す */
a {
  text-decoration: none;
  color: #7a7a7a;
  /* デフォルトのテキスト色 */
}

/* Style for navigation bar */
.top_navbar {
  background-color: #1d1d1d;
  padding: 10px;
  display: flex;
  align-items: left;
  justify-content: space-between;
}

.nav-item {
  margin-right: 10px;
  position: relative;
}

.nav-link {
  text-decoration: none;
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
}

.nav2_item {
  position: relative;
  /* 親要素を相対位置指定 */
}

.nav2_link {
  display: inline-block;
  /* リンクをブロック要素として扱う */
  position: relative;
  /* 相対位置指定 */
}

.badge {
  position: absolute;
  /* 絶対位置指定 */
  top: -3px;
  /* 上からの位置調整 */
  left: -3px;
  /* 右からの位置調整 */
  font-size: 12px;
  line-height: 12px;
  border-radius: 50%;
  border-width: 1px;
  width: 20px;
  height: 20px;
  background-color: #ff1493;
  border: 4px solid #ff1493;
  color: #ffffff;
  text-align: center;
}

.profile-image {
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  border-radius: 50%;
}

.menu-image {
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.spacer {
  flex-grow: 1;
}

.account-popup {
  display: none;
  /* デフォルトでは非表示 */
  position: absolute;
  top: 40px;
  right: 0;
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 5px 10px;
  text-align: left;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  z-index: 1000;
  /* 最前面に表示 */
  width: 250px;
  /* 横幅を250pxに設定 */
}

.account-popup a {
  font-size: 1.05em;
  /* 文字サイズを大きく */
}

.account-popup.active {
  display: block;
}

.search-form {
  display: none;
  max-width: 100%;
  margin: 10px;
  padding: 5px;
  text-align: center;
  justify-content: center;
}

.search-button {
  padding: 5px 10px;
  text-decoration: none;
  color: #000;
  background-color: #eee;
  border: 1px solid #ccc;
  border-radius: 25px;
  background-image: url("../images/search-w.png");
  background-repeat: no-repeat;
  background-position: 5px center; /* アイコンを5px右に寄せる */
  padding-left: 35px; /* アイコンの位置変更に合わせて調整 */
}

.search-button:hover {
  background-color: #c0c0c0;
  text-decoration: none;
  cursor: pointer;
}

.verified-check {
  position: relative; /* ツールチップ位置調整のため */
}

.checkmark-image {
  width: 20px; /* 必要に応じてサイズを調整 */
  height: 20px; /* 必要に応じてサイズを調整 */
  vertical-align: middle;
}

/* ツールチップのスタイル改善 */
.tooltip {
  visibility: hidden;
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(104, 99, 185, 0.4);
  color: white;
  text-align: center;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: rgba(103, 99, 185, 0.4) transparent transparent transparent;
}

.verified-check:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

.back-to-top {
  display: none; /* 初期状態は非表示 */
  position: fixed;
  right: 20px;
  bottom: 50px;
  width: 50px;
  height: 50px;
  background-color: rgba(160, 155, 185, 0.4);
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.3s ease, opacity 0.3s ease,
    transform 0.5s ease-in-out;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}

/* JSが inline スタイルで display: block を設定した場合、強制的に flex に変更 */
.back-to-top[style*="block"] {
  display: flex !important;
}

.back-to-top:hover {
  background-color: rgba(105, 105, 105, 0.5);
  transform: scale(1.1);
}

.back-to-top img {
  max-width: 100%;
  max-height: 100%;
}
