@charset "UTF-8";

/*
 * ウィジェットの追加スタイルを定義する。
 */
.widget {
  font-size: 15px;
  padding: 20px;
  border-radius: var(--cocoon-child-radius);
}

/* 追従エリアと画面上端の間隔を設ける。 */
.sidebar-scroll {
  top: 32px;
}

/* 標準の余白と枠幅を残し、白い背景は各ウィジェットで持たせる。 */
.sidebar {
  background: transparent;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
}

/* 右端のウィジェットをメインの左端と対称に配置する。 */
#sidebar {
  padding-right: 0;
}

/* 縦並びでは透明な親領域の左右パディングを重ねない。 */
@media screen and (max-width: 1023px) {
  #sidebar {
    padding-left: 0;
  }
}

/* 各ウィジェットを独立したカードとして表示する。 */
.sidebar .widget {
  background-color: #fff;
  margin-bottom: 24px;
}

/* 追従エリアの末尾と、追従ウィジェットがない場合の通常エリアの末尾は余白を外す。 */
.sidebar .sidebar-scroll .widget:last-child,
.sidebar:not(:has(.sidebar-scroll .widget)) > .widget:not(:has(~ .widget)) {
  margin-bottom: 0;
}

/* 見出しは中央に配置し、下線で本文と区切る。 */
.widget .widget-title {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  color: #252c35;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #506b85;
  border-radius: 0;
  padding: 0 0 10px;
  margin: 0 0 16px;
}

/* カテゴリ・アーカイブの項目にフォルダを添える。 */
.sidebar :is(.widget_categories, .widget_archive) li > a {
  position: relative;
  padding-left: 26px;
}

.sidebar :is(.widget_categories, .widget_archive) li > a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 16px;
  background-color: currentColor;
  mask: url("../../images/folder.svg") center / contain no-repeat;
}

/* アイコンの色でカテゴリとアーカイブを区別する。 */
.sidebar .widget_categories li > a::before {
  background-color: #f2c14e;
}

.sidebar .widget_archive li > a::before {
  background-color: #cbd5e1;
}

/* サイドバーのプロフィールを縦並びにする。 */
.sidebar .widget .author-box {
  margin-bottom: 0;
  border: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar .widget .author-box .author-thumb {
  width: 86px;
  height: 86px;
  float: none;
  padding: 0;
  margin: 0 auto 8px;
}

.sidebar .widget .author-box .author-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar .widget .author-box .author-content {
  float: none;
  width: 100%;
  margin: 0;
}

.sidebar .widget .author-box .author-name {
  font-size: 18px;
  color: #000;
  text-align: center;
}

.sidebar .widget .author-box .author-name a {
  color: #000;
  text-decoration: none;
}

/* 名前の下に共通の肩書きを表示する。 */
.sidebar .widget .author-box .author-name::after {
  content: "エンジニア・ブロガー";
  display: block;
  color: #78828d;
  font-size: 13px;
  font-weight: 400;
  margin-top: 8px;
}

.sidebar .widget .author-box .author-description {
  margin-top: 16px;
  font-size: 14px;
}

/* テーマ側の段落の行間指定を上書きする。 */
.sidebar .widget .author-box .author-description p {
  font-size: 14px;
  line-height: 1.6;
}

/* 人気記事のタイトルにテーマ側の文字サイズがある場合も統一する。 */
.widget_popular_entries .widget-entry-card-title {
  font-size: 15px;
}

/* 本文とリストにテーマ側の文字サイズがある場合も統一する。 */
.widget p,
.widget li {
  font-size: 15px;
}
