/* 画像と余白・縁取りのデザイン */
.wp-block-image.is-style-dl-zoom {
    display: inline-block;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    text-align: center;
}
.wp-block-image.is-style-dl-zoom img {
    border-radius: 8px; /* 画像の端を丸く切り取る */
    display: block;
    max-width: 100%;
    height: auto;
}

/* ボタンラッパー */
.custom-image-btns {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

/* 共通ボタン設定 */
.custom-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    transition: background-color 0.2s ease-in-out;
}

/* 左：画像をダウンロード（青） */
.custom-dl-btn { background-color: #007bff; }
.custom-dl-btn:hover { background-color: #0056b3; }

/* 右：画像を拡大表示（緑） */
.custom-zoom-btn { background-color: #28a745; }
.custom-zoom-btn:hover { background-color: #1b7b31; }

/* モーダルの背景（グレーアウト） */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ダウンロード用モーダルコンテンツ */
.dl-modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.dl-modal-check-wrap {
    margin: 25px 0;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.dl-modal-check-wrap input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
}
.modal-dl-btn {
    padding: 14px 40px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    background-color: #bdbdbd; /* 初期グレーアウト */
    color: #fff;
    cursor: not-allowed;
    transition: background-color 0.3s;
}
.modal-dl-btn.ready {
    background-color: #e57373; /* 薄赤 */
    cursor: pointer;
}
.modal-dl-btn.ready:hover {
    background-color: #d32f2f; /* ホバーで濃く */
}

/* 拡大表示用モーダルコンテンツ */
.zoom-modal-content {
    background-color: #fff;
    width: 90vw;
    height: 90vh;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 2px solid #eaeaea; /* 縁取り */
}
.zoom-modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.2s ease-out;
    transform-origin: center center;
}
.zoom-modal-content img.zoomed {
    cursor: grab;
}
.zoom-modal-content img.zoomed:active {
    cursor: grabbing;
}