/*
  子テーマ側の icon 上書き用CSS(icon-override.css)
  親テーマ(xeory_base)の icon.css は編集しない。
  こちらを別ファイルとして追加読み込みし、詳細度で上書きする。

  ★SVGマスク画像のパスについて★
  このファイルの設置場所(ft-bc/css/)から見た相対パスではなく、
  実際にSVGファイルが存在する親テーマ側の場所
  (xeory_base/lib/images/icon/)へのルート相対パスを直接指定している。
  子テーマにSVGを複製する必要はない。
*/
/*
  修正メモ:
  ・すべての「.fa-xxx:before」を「.fa.fa-xxx:before」に変更。
  ・Font Awesome 6本体(all.min.css)は
      .fa-angle-up { --fa: "\f106"; }
      .fa:before, .fas:before, ... { content: var(--fa); }
    という形で「.fa:before」(詳細度 0,0,1,1) を持っており、
    従来の「.fa-angle-up:before」(詳細度 0,0,1,1) と同じ詳細度のため
    読み込み順で負けて content が上書きされ、アイコンが消えていた。
  ・「.fa.fa-xxx:before」(詳細度 0,0,2,1) にすることで、
    読み込み順に関係なく必ずこちらが勝つようにした。
*/

/*
  fa-angle-up(ページトップボタンの矢印)について:
  絶対配置+top/right座標での位置指定は、.pagetop span の
  サイズ(child-style.min.cssで67x67pxにカスタムされている)と
  噛み合わずボタンの外側にはみ出して見えなくなっていた。
  座標を数値で微調整するのではなく、flexboxで常に中央寄せする
  方式に変更。ボタンサイズが今後変わっても追従する。
*/
.pagetop span {
  display: flex;
  align-items: center;
  justify-content: center;
}
.fa-angle-up {
  display: block;
}
.fa.fa-angle-up:before {
  content: "";
  display: block;
  position: static; /* 親テーマ側の position:absolute が明示的に上書きされず
                        残ってしまっていたため、明示的に static を指定 */
  -webkit-mask: url(/wp-content/themes/xeory_base/lib/images/icon/angle-up.svg) no-repeat;
          mask: url(/wp-content/themes/xeory_base/lib/images/icon/angle-up.svg) no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
  background-color: #fff;
  width: 18px;
  height: 18px;
}

.fa-facebook-square {
  position: relative;
}
.fa.fa-facebook-square:before {
  content: "";
  position: absolute;
  -webkit-mask: url(/wp-content/themes/xeory_base/lib/images/icon/facebook.svg) no-repeat;
          mask: url(/wp-content/themes/xeory_base/lib/images/icon/facebook.svg) no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
  background-color: #ccc;
  width: 20px;
  height: 20px;
  top: 0;
  left: 0;
}
.fa-facebook-square:hover {
  cursor: pointer;
}
.fa.fa-facebook-square:hover::before {
  background-color: #0866ff;
  cursor: pointer;
}

.fa-rss {
  position: relative;
}
.fa.fa-rss:before {
  content: "";
  position: absolute;
  -webkit-mask: url(/wp-content/themes/xeory_base/lib/images/icon/rss.svg) no-repeat;
          mask: url(/wp-content/themes/xeory_base/lib/images/icon/rss.svg) no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
  background-color: #ccc;
  width: 18px;
  height: 18px;
  top: 0;
  left: 0;
}
.fa-rss:hover {
  cursor: pointer;
}
.fa.fa-rss:hover::before {
  background-color: #6CC655;
  cursor: pointer;
}

.fa-x {
  position: relative;
}
.fa.fa-x:before {
  content: "";
  position: absolute;
  -webkit-mask: url(/wp-content/themes/xeory_base/lib/images/icon/twitter.svg) no-repeat;
          mask: url(/wp-content/themes/xeory_base/lib/images/icon/twitter.svg) no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
  background-color: #ccc;
  width: 18px;
  height: 18px;
  top: 0;
  left: 0;
}
.fa-x:hover {
  cursor: pointer;
}
.fa.fa-x:hover::before {
  background-color: #000;
  cursor: pointer;
}

.fa-clock-o {
  position: relative;
}
.fa.fa-clock-o:before {
  content: "";
  position: absolute;
  -webkit-mask: url(/wp-content/themes/xeory_base/lib/images/icon/clock.svg) no-repeat;
          mask: url(/wp-content/themes/xeory_base/lib/images/icon/clock.svg) no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
  background-color: #383838;
  width: 13px;
  height: 13px;
  top: 0;
  left: -16px;
}

.fa-home {
  position: relative;
}
.fa.fa-home:before {
  content: "";
  position: absolute;
  -webkit-mask: url(/wp-content/themes/xeory_base/lib/images/icon/home.svg) no-repeat;
          mask: url(/wp-content/themes/xeory_base/lib/images/icon/home.svg) no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
  background-color: #383838;
  width: 13px;
  height: 13px;
  top: 0;
  left: -16px;
}

.fa-folder {
  position: relative;
}
.fa.fa-folder:before {
  content: "";
  position: absolute;
  -webkit-mask: url(/wp-content/themes/xeory_base/lib/images/icon/folder.svg) no-repeat;
          mask: url(/wp-content/themes/xeory_base/lib/images/icon/folder.svg) no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
  background-color: #383838;
  width: 12px;
  height: 12px;
  top: 0;
  left: -16px;
}

.fa-tag {
  position: relative;
}
.fa.fa-tag:before {
  content: "";
  position: absolute;
  -webkit-mask: url(/wp-content/themes/xeory_base/lib/images/icon/tag.svg) no-repeat;
          mask: url(/wp-content/themes/xeory_base/lib/images/icon/tag.svg) no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
  background-color: #383838;
  width: 13px;
  height: 13px;
  top: 0;
  left: -16px;
}

.fa-file {
  position: relative;
}
.fa.fa-file:before {
  content: "";
  position: absolute;
  -webkit-mask: url(/wp-content/themes/xeory_base/lib/images/icon/file.svg) no-repeat;
          mask: url(/wp-content/themes/xeory_base/lib/images/icon/file.svg) no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
  background-color: #383838;
  width: 12px;
  height: 12px;
  top: 0;
  left: -16px;
}

.fa-file-text {
  position: relative;
}
.fa.fa-file-text:before {
  content: "";
  position: absolute;
  -webkit-mask: url(/wp-content/themes/xeory_base/lib/images/icon/file-text.svg) no-repeat;
          mask: url(/wp-content/themes/xeory_base/lib/images/icon/file-text.svg) no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
  background-color: #383838;
  width: 12px;
  height: 12px;
  top: 0;
  left: -16px;
}

.fa-align-justify {
  position: relative;
}
.fa.fa-align-justify:before {
  content: "";
  position: absolute;
  -webkit-mask: url(/wp-content/themes/xeory_base/lib/images/icon/align-justify.svg) no-repeat;
          mask: url(/wp-content/themes/xeory_base/lib/images/icon/align-justify.svg) no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
  background-color: #383838;
  width: 24px;
  height: 24px;
  top: 11px;
  left: -24px;
}

.cat .fa-folder {
  margin-right: 20px;
}
.cat .fa.fa-folder:before {
  width: 16px;
  height: 16px;
  top: 0;
  left: 0;
}

.tag .fa-tag {
  margin-right: 20px;
}
.tag .fa.fa-tag:before {
  width: 16px;
  height: 16px;
  top: 0;
  left: 0;
}

.breadcrumb .fa-tag {
  margin-right: 0;
}
.breadcrumb .fa.fa-tag:before {
  width: 12px;
  height: 12px;
  left: -16px;
}
