/* ============================================================
   サイト共通フッター（リンク・コピーライト・シェアボタン）
   色は style/tokens.css のトークン（--c-*）を参照する。
   ============================================================ */

.footer-elem-outer {
  all: unset;
  display: block;
  padding: 0 1rem 1rem 1rem;
}

.footer-link-box-outer {
  all: unset;
  display: block;
  font-family: var(--font-family);
  margin-bottom: 16px;
}

.footer-link-box {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  color: var(--c-text-3);
}

.footer-link-inner {
  all: unset;
}

.footer-link-inner li {
  all: unset;
}

.footer-link-inner a {
  cursor: pointer;
  text-decoration: none;
  text-underline-offset: 0.15em;
  margin-bottom: 7px;
  font-size: 14px;
  line-height: 2;
  display: block;
  width: fit-content;
}

.footer-link-inner .line-link-icon777 {
  width: 14px;
  height: 14px;
}

.copyright {
  width: fit-content;
  display: flex;
  gap: 4px;
  font-size: 11px;
  color: var(--c-text-4);
  margin: 0 auto;
  margin-top: 8px;
  flex-direction: column;
  align-items: center;
  flex-direction: row;
  letter-spacing: 0.06px;
  font-weight: bold;
}

.copyright a {
  color: var(--c-text-5);
  font-weight: normal;
}

.app_link {
  margin: 3px 0;
  text-decoration: none;
  font-size: 13px;
  color: var(--c-text-3);
}

.app_link a {
  text-decoration: none;
}

.app-dl {
  font-size: 11px;
  margin-bottom: 4px;
  letter-spacing: 0.06px;
  color: var(--c-text-5);
}

.open-btn2 {
  all: unset;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- シェアボタン ---------- */

.share-nav {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 1rem;
  padding-top: 0;
}

.share-nav h3 {
  all: unset;
  font-size: 13px;
  color: var(--c-text-1);
  display: block;
  margin: 0 auto;
  line-height: 1.5;
}

.share-nav h3 span {
  user-select: none;
  font-family: Arial;
}

.share-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 0 1rem;
}

.share-menu-outer {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-evenly;
}

.share-menu-item {
  display: block;
  cursor: pointer;
}

.share-menu-icon {
  width: 32px;
  height: 32px;
  background-repeat: no-repeat;
  background-size: contain;
  display: block;
}

.share-menu-icon-line {
  background-image: url('/assets/line.svg');
}

.share-menu-icon-twitter {
  background-image: url('/assets/twitter_x.svg');
  background-color: var(--c-sns-x);
  border-radius: 6px;
}

.share-menu-icon-facebook {
  background-image: url('/assets/facebook.svg');
}

.share-menu-icon-hatena {
  background-color: var(--c-sns-hatena);
  background-image: url('/assets/hatena.svg');
  border-radius: 6px;
}

/* ---------- URLコピー ---------- */

.copy-btn {
  display: flex;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  min-height: 48px;
  width: 100%;
  border-radius: 99rem;
  border: 1px solid var(--c-border-strong);
  font-weight: normal;
  box-sizing: border-box;
}

.copy-btn-inner {
  display: flex;
  align-items: center;
  gap: 4px;
}

.copy-btn-text {
  width: fit-content;
  font-size: 13px;
}

.copy-btn-icon {
  width: 32px;
  height: 32px;
  background-repeat: no-repeat;
  display: block;
}

.link-icon {
  background-image: url('/assets/copy_icon_b.svg');
}

.copy-btn-copied .copy-icon {
  background-image: url('/assets/copy_icon.svg');
  width: 16px;
  height: 16px;
}

/* コピー完了ツールチップ */
.description1 {
  z-index: 100;
  display: none;
  position: fixed;
  padding: 10px;
  font-size: 13px;
  color: var(--c-text-inverse);
  font-weight: bold;
  border-radius: 4px;
  background-color: var(--c-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  width: 87.5%;
  cursor: auto;
  user-select: none;
  -webkit-user-select: none;
}

.copy-btn-copied .description1 {
  display: inline-block;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* 要素の中心を正確に配置 */
}

.copy-btn-title {
  font-size: 12px;
  font-weight: normal;
  line-height: 1.6;
}

.copy-btn-text {
  font-size: 13px;
  font-weight: normal;
  line-height: 1.6;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.fade-in-copy .description1 {
  animation-name: fadeIn;
  animation-duration: 0.25s;
  animation-fill-mode: both;
}

.fade-out-copy .description1 {
  animation-name: fadeOut;
  animation-duration: 0.5s;
  animation-fill-mode: both;
}

/* ---------- レスポンシブ ---------- */

@media screen and (min-width: 512px) {
  .footer-link-inner a {
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 8px;
  }

  .share-nav h3 {
    margin: 0;
  }

  .share-nav-inner {
    gap: 1.5rem;
  }

  .open-btn2 a:hover,
  .footer-link-box a:hover {
    -webkit-text-decoration: underline 1px currentColor;
    text-decoration: underline 1px currentColor;
  }

  .share-menu-outer {
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: nowrap;
    width: fit-content;
  }

  .share-nav-inner {
    flex-direction: row;
  }

  .share-menu-icon {
    width: 32px;
    height: 32px;
  }

  .share-nav {
    align-items: center;
  }

  .copy-btn:hover:not(.copy-btn-copied) {
    background-color: var(--c-bg-sub);
  }

  .app-dl {
    font-size: 13px;
  }

  .description1 {
    position: absolute;
    width: 450px;
  }

  .description1:before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    border: 15px solid transparent;
    border-top: 15px solid var(--c-overlay);
    margin-left: -15px;
    cursor: auto;
  }

  .copy-btn-outer {
    position: relative;
  }

  .copy-btn-copied .description1 {
    top: auto;
    bottom: 53px;
    transform: translate(-50%);
  }

  .copyright {
    margin-top: 20px;
    font-size: 13px;
  }

  .footer-link-box-outer {
    margin-bottom: 2rem;
  }
}

@media screen and (max-width: 360px) {
  .footer-link-inner a {
    font-size: 11.5px;
  }

  .copy-btn-title {
    width: fit-content;
    font-size: 12px;
  }
}

/* ---------- テーマ切替（フッター共通・3状態） ---------- */

.footer-theme-toggle-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.footer-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--c-text-3);
  font-size: 12px;
  padding: 8px 14px;
  border: 1px solid var(--c-border);
  border-radius: 99rem;
  user-select: none;
  -webkit-user-select: none;
}

.footer-theme-toggle:hover {
  background-color: var(--c-bg-sub);
  color: var(--c-text-1);
}

.footer-theme-toggle-label {
  line-height: 1;
}

/* 現在の選択ラベル（light/dark/auto）を出し分け */
.theme-label-dark,
.theme-label-auto {
  display: none;
}

:root[data-theme-pref="dark"] .theme-label-dark,
:root[data-theme-pref="auto"] .theme-label-auto {
  display: inline;
}

:root[data-theme-pref="dark"] .theme-label-light,
:root[data-theme-pref="auto"] .theme-label-light {
  display: none;
}
