/* ==========================================
   管理画面（エディタ）用のスタイル調整
   ========================================== */

/* エディタ用のコンテナスタイル */
.splide-slider-editor-container {
    background: #fcfcfc;
    border: 2px solid #007cba;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 1em;
}

.splide__slide-editor-wrapper {
    border: 2px dashed #b5b5b5;
    background: #ffffff;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

/* エディタ側のリンク設定中インジケーター */
.splide-editor-link-badge {
    background: #f0f7ff;
    border: 1px solid #b3d4fc;
    color: #0056b3;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    margin-bottom: 8px;
    display: inline-block;
    word-break: break-all;
}

/* ==========================================
   公開画面（フロントエンド）用のスタイル調整
   ========================================== */

/* スライドとリンクの全体調整 */
.splide__slide {
    height: auto;
}

.splide__slide-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none !important;
}

/* スライダー内のカバーブロックのサイズをフィットさせる */
.splide__slide .wp-block-cover {
    min-height: 400px;
    width: 100%;
}

/* ==========================================
   サムネイル・ページネーションのスタイル調整
   ========================================== */

/* ページネーション全体のコンテナ */
.splide__pagination {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    padding: 0;
    margin-top: 1em;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    list-style: none;
}

/* サムネイルボタン本体（画像が収まるように横幅を少し広く設計） */
.splide__pagination__page {
    width: 100px;           /* サムネイルの横幅 */
    height: auto;
    aspect-ratio: 16 / 9;
    padding: 0;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 0;
    background: #e0e0e0;
    opacity: 0.6;           /* 選択されていないときは少し透過 */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ホバー時の挙動 */
.splide__pagination__page:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* アクティブなサムネイルの枠線 */
.splide__pagination__page.is-active {
    opacity: 1;
    /* border-color: #007cba; */
    border-color: #002b65;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 複製されたカバーブロックを極小化するスタイル */
/* サムネイル枠の中に複製されたカバーブロック全体を収める */
.splide__pagination__page.has-cover-thumbnail .wp-block-cover {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

/* カバーブロックの背景画像とオーバーレイレイヤー */
.splide__pagination__page.has-cover-thumbnail .wp-block-cover__image-background,
.splide__pagination__page.has-cover-thumbnail .wp-block-cover__background {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* カバーブロックのインナー（テキスト等）のコンテナ */
.splide__pagination__page.has-cover-thumbnail .wp-block-cover__inner-container {
    position: absolute !important;
    z-index: 2 !important;
    width: 90% !important;
    max-height: 90% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    overflow: hidden !important;
    pointer-events: none; /* クリック動作を邪魔しないようにする */
}

/* サムネイル内の文字・インナーブロックの微小化 */
/* サムネイル内のテキスト要素（段落、見出し等）を極小サイズに強制リセット */
.splide__pagination__page.has-cover-thumbnail .wp-block-cover__inner-container * {
    font-size: 8px !important;       /* 文字を読める限界まで小さく */
    line-height: 1.1 !important;
    margin: 1px 0 !important;
    padding: 0 !important;
    color: #ffffff !important;       /* 文字色は白に固定 */
    text-shadow: 0 1px 2px rgba(0,0,0,0.8); /* 視認性を上げるためのシャドウ */
    white-space: nowrap;             /* 改行を防いで枠外へのはみ出しを防止 */
    overflow: hidden;
    text-overflow: ellipsis;         /* 長いテキストは「...」にする */
    width: 100% !important;
}

/* ボタンやリンクなどの不要な装飾要素をサムネイル内では非表示に */
.splide__pagination__page.has-cover-thumbnail .wp-block-button,
.splide__pagination__page.has-cover-thumbnail .wp-block-buttons {
    display: none !important;
}

/* 単純な画像サムネイルのスタイル調整 */
.splide__pagination__page.has-image-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}



.splide__arrow {
  background: none;
}
.splide__arrow svg {
  fill: #fff;
  height: 12em;
  width: 12em;
}
