/**
 * 標準ギャラリー（.wp-block-gallery）: タップで拡大できることの視覚ヒント
 * GLightbox 用。pointer-events: none でタッチを阻害しない。
 * 全画面幅（PCの広いウィンドウ含む）で表示。
 */

.wp-block-gallery figure.wp-block-image > a,
.wp-block-gallery figure.wp-block-image > button,
.wp-block-gallery .blocks-gallery-item figure > a,
.wp-block-gallery .blocks-gallery-item figure > button {
    position: relative;
    display: block;
}

.wp-block-gallery figure.wp-block-image,
.wp-block-gallery .blocks-gallery-item figure {
    position: relative;
}

/* 画像が <a> / <button> で包まれているケース（最も多い）— :has 非対応でも有効 */
.wp-block-gallery figure.wp-block-image > a::after,
.wp-block-gallery figure.wp-block-image > button::after,
.wp-block-gallery .blocks-gallery-item figure > a::after,
.wp-block-gallery .blocks-gallery-item figure > button::after {
    content: "";
    position: absolute;
    z-index: 5;
    pointer-events: none;
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 9999px;
    background-color: rgba(20, 184, 166, 0.55);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3Cpath d='M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 58% 58%;
    box-shadow:
        0 1px 2px rgba(12, 74, 110, 0.12),
        0 2px 10px rgba(20, 184, 166, 0.2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.38);
    right: 0.5rem;
    bottom: 0.5rem;
    top: auto;
}

.wp-block-gallery figure.wp-block-image:has(figcaption) > a::after,
.wp-block-gallery figure.wp-block-image:has(figcaption) > button::after,
.wp-block-gallery .blocks-gallery-item figure:has(figcaption) > a::after,
.wp-block-gallery .blocks-gallery-item figure:has(figcaption) > button::after {
    top: 0.5rem;
    bottom: auto;
}

/* 画像のみ（<a> / <button> なし）— :has 対応ブラウザのみ */
@supports selector(:has(*)) {
    .wp-block-gallery figure.wp-block-image:not(:has(> a)):not(:has(> button))::after,
    .wp-block-gallery .blocks-gallery-item figure:not(:has(> a)):not(:has(> button))::after {
        content: "";
        position: absolute;
        z-index: 5;
        pointer-events: none;
        width: 2.125rem;
        height: 2.125rem;
        border-radius: 9999px;
        background-color: rgba(20, 184, 166, 0.55);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3Cpath d='M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 58% 58%;
        box-shadow:
            0 1px 2px rgba(12, 74, 110, 0.12),
            0 2px 10px rgba(20, 184, 166, 0.2);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        border: 1px solid rgba(255, 255, 255, 0.38);
        right: 0.5rem;
        bottom: 0.5rem;
        top: auto;
    }

    .wp-block-gallery figure.wp-block-image:not(:has(> a)):not(:has(> button)):has(figcaption)::after,
    .wp-block-gallery .blocks-gallery-item figure:not(:has(> a)):not(:has(> button)):has(figcaption)::after {
        top: 0.5rem;
        bottom: auto;
    }
}
