/* ==========================================================================
   anime 作品ページ 独自サイドバー

   レイアウト(本文 + サイドバーの2カラム)は親テーマ(xwrite)の .container /
   .side が担当する。ここでは .side の中に入る .anime-sidebar 自身の見た目と
   PC 時の sticky 挙動だけを定義する。
   ========================================================================== */

.anime-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* PC では親の .side カラムの中で追従させる。
   親テーマは 992px でサイドバーがフレックスの別カラムになるので同じしきい値で有効化。 */
@media (min-width: 992px) {
    .anime-sidebar {
        position: sticky;
        top: 20px;
    }
}

/* --- 各ブロック共通 -------------------------------------------------------- */
.anime-sidebar-block {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 14px 16px;
}

.anime-sidebar-heading {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
    padding-left: 10px;
    border-left: 3px solid #f59e0b;
    line-height: 1.4;
}

/* --- ブロック1: タグバッジ ------------------------------------------------ */
.anime-sidebar-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.anime-sidebar-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #d1d5db;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 999px;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.anime-sidebar-tag:hover,
.anime-sidebar-tag:focus-visible {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #1e1e1e;
}

/* --- ブロック2: スタジオ作品(ポスター+タイトル+年) ---------------------- */
.anime-sidebar-poster-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.anime-sidebar-poster-item {
    margin: 0;
}

.anime-sidebar-poster-link {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
}

.anime-sidebar-poster-thumb {
    flex: 0 0 48px;
    width: 48px;
    height: 72px;
    background: #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anime-sidebar-poster-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.anime-sidebar-poster-placeholder {
    font-size: 10px;
    line-height: 1.2;
    color: #6b7280;
    text-align: center;
}

.anime-sidebar-poster-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 2px;
}

.anime-sidebar-poster-title {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.anime-sidebar-poster-link:hover .anime-sidebar-poster-title,
.anime-sidebar-poster-link:focus-visible .anime-sidebar-poster-title {
    color: #f59e0b;
}

.anime-sidebar-poster-year {
    font-size: 11px;
    color: #9ca3af;
}

/* --- ブロック3: 監督の他作品(テキストリスト) ----------------------------- */
.anime-sidebar-text-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.anime-sidebar-text-list li {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.anime-sidebar-text-list a {
    color: #d1d5db;
    text-decoration: none;
    display: inline-block;
}

.anime-sidebar-text-list a:hover,
.anime-sidebar-text-list a:focus-visible {
    color: #f59e0b;
    text-decoration: underline;
}

.anime-sidebar-text-year {
    color: #9ca3af;
    font-size: 12px;
}

.anime-sidebar-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    color: #f59e0b;
    text-decoration: none;
}

.anime-sidebar-more:hover,
.anime-sidebar-more:focus-visible {
    text-decoration: underline;
}
