/* ================================
   即ヒメスライダー コンポーネントCSS
   ================================ */

/* ----------------------------------------
   Element: __header (セクションヘッダー)
   ---------------------------------------- */
.sokuhime_slider__header {
    display: flex;
    align-items: center;
    background: #f06292;
    color: #fff;
    padding: 0 12px;
    text-decoration: none;
    height: 45px;
    box-sizing: border-box;
}

.sokuhime_slider__title {
    font-size: large;
    font-weight: bold;
}

.sokuhime_slider__more {
    font-size: 12px;
    margin-left: auto;
}

/* ----------------------------------------
   Element: __list (横スクロールリスト)
   ---------------------------------------- */
.sokuhime_slider__list {
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ----------------------------------------
   Element: __item (各キャストカード)
   ---------------------------------------- */
.sokuhime_slider__item {
    min-width: calc((100% - 76px) / 4);
    margin: 1%;
    background: #fff;
    position: relative;
}

.sokuhime_slider__item a {
    display: block;
}

/* ----------------------------------------
   Element: __thumb (サムネイル画像)
   ---------------------------------------- */
.sokuhime_slider__thumb {
    display: block;
}

.sokuhime_slider__thumb a {
    display: block;
    position: relative;
    aspect-ratio: 3/4;
}

.sokuhime_slider__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ----------------------------------------
   Element: __time-label (待機中ラベル)
   ---------------------------------------- */
.sokuhime_slider__time-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    color: #e53935;
    font-size: 16px;
    text-align: center;
    padding: 10px 0;
    font-weight: bold;
}

/* ----------------------------------------
   Modifier: --two-rows (2行モード) / --one-row (1行モード)
   件数が閾値未満で JS が --one-row に切り替えても、上の余白は変えない
   ---------------------------------------- */
.sokuhime_slider--two-rows,
.sokuhime_slider--one-row {
    margin: 36px 0;
}

/* スクロール領域ラッパー（--two-rows / --one-row 共通） */
.sokuhime_slider__wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
}

/* ラッパー内の各行（--two-rows / --one-row 共通） */
.sokuhime_slider__wrapper .sokuhime_slider__list {
    overflow-x: visible;
    overflow-y: visible;
    width: max-content;
}

.sokuhime_slider__wrapper .sokuhime_slider__list:first-child {
    margin-bottom: 4px;
}

/* スライダーモード共通: アイテムサイズ固定（__wrapper 起点で列数に依存しない） */
.sokuhime_slider__wrapper .sokuhime_slider__item {
    min-width: 140px;
    width: 140px;
    flex-shrink: 0;
    margin: 2px;
}

/* スライダーモード共通: サムネイル */
.sokuhime_slider__wrapper .sokuhime_slider__thumb a {
    aspect-ratio: 3/4;
    width: 100%;
    height: 100%;
}

.sokuhime_slider__wrapper .sokuhime_slider__thumb img {
    display: block;
}

/* ----------------------------------------
   Modifier: --async (非同期取得時のCLS防止)
   ---------------------------------------- */
/* min-height: ヘッダー(45px) + カード2行(140px * 4/3 * 2 ≒ 373px) を考慮しつつ、
   ローディングスピナー表示中にレイアウトシフトを防ぐための最低高さ */
.sokuhime_slider--async {
    min-height: 340px;
}

/* ローディング表示 */
.sokuhime_slider__loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 280px;
}

.sokuhime_slider__loading img {
    width: 40px;
    height: 40px;
}
