/* =========================================
 *  右サイドバー関連
 * ========================================= */

.single-sidebar {
  padding: 2rem 1.5rem 2rem 2rem;
  background: var(--color-bg-sidebar);
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* バナーエリア */
.single-sidebar-banner {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: .35rem;
  overflow: hidden;
  background: #e6ddd0;
}

.single-sidebar-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-sidebar-banner-widget {
  width: 100%;
  height: 100%;
}

.single-sidebar-banner-widget img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* タイトル */
.single-sidebar-title {
  font-family: var(--font-hero-en);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--color-text-main);
}

/* タグ一覧 */
.single-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.single-tag-item {
  padding: 0.4rem 0.8rem;
  background: var(--color-bg-main);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--color-text-main);
  transition: background 0.2s ease;
}

.single-tag-item:hover {
  background: var(--color-border);
  text-decoration: none;
  color: var(--color-text-main);
  background-image: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: var(--color-text-main) !important;
}

.single-tags-empty {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-text-main);
  opacity: 0.5;
}

/* ウィジェットエリア */
.single-sidebar-widget {
  width: 100%;
  border-radius: .35rem;
  overflow: hidden;
  background: var(--color-bg-main);
  border: 1px solid var(--color-border);
  padding: 1rem;
}

.single-sidebar-widget-item {
  width: 100%;
}

/* ウィジェット内に画像が含まれている場合のスタイル */
.single-sidebar-widget:has(.single-sidebar-widget-item img),
.single-sidebar-widget:has(img),
.single-sidebar-widget.has-image {
  padding: 0;
  display: block;
}

.single-sidebar-widget.has-image .single-sidebar-widget-item {
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
}

/* 画像が直接ウィジェット内にある場合 */
.single-sidebar-widget.has-image > img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  display: block;
  margin: 0;
}

.single-sidebar-widget-item img,
.single-sidebar-widget.has-image .single-sidebar-widget-item img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  display: block;
  margin: 0;
}

/* 画像ウィジェットのfigureタグのパディングを削除 */
.single-sidebar-widget.has-image figure,
.single-sidebar-widget:has(img) figure {
  margin: 0;
  padding: 0;
  padding-bottom: 0 !important;
}

.single-sidebar-widget.has-image figure img,
.single-sidebar-widget:has(img) figure img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  display: block;
  margin: 0;
}

/* モバイル・タブレット対応 */
/* タブレット時（769px〜1024px）は main.css で非表示に設定 */
/* スマホ時（768px以下）のみ非表示 */
@media (max-width: 768px) {
  .single-sidebar {
    display: none !important;
  }
}

/* PCサイズ（1025px以上）では表示 */
@media (min-width: 1025px) {
  .single-sidebar {
    display: flex !important;
  }
}

