@charset "UTF-8";

/* 投稿詳細ページ 共通設定 */

/* === Quillスタイルリスト（フラット構造対応） === */

a {
    word-wrap: break-word;
}

/* カウンターリセット */
.exhibition--info--section ol {
    padding-left: 1.5em;
    counter-reset: list-0 list-1 list-2 list-3;
}

/* レベル0: 1. 2. 3. */
.exhibition--info--section ol>li[data-list] {
    list-style-type: none;
    counter-increment: list-0;
    counter-reset: list-1 list-2 list-3;
}

.exhibition--info--section ol>li[data-list="ordered"]::before {
    content: counter(list-0, decimal) ". ";
    display: inline-block;
    white-space: nowrap;
    width: 1.2em;
    margin-left: -1.5em;
    margin-right: 0.3em;
    text-align: right;
}

/* レベル1: a. b. c. */
.exhibition--info--section ol>li[data-list].ql-indent-1 {
    counter-increment: list-1;
    counter-reset: list-2 list-3;
    padding-left: 3em;
}

.exhibition--info--section ol>li[data-list="ordered"].ql-indent-1::before {
    content: counter(list-1, lower-alpha) ". ";
}

/* レベル2: i. ii. iii. */
.exhibition--info--section ol>li[data-list].ql-indent-2 {
    counter-increment: list-2;
    counter-reset: list-3;
    padding-left: 4.5em;
}

.exhibition--info--section ol>li[data-list="ordered"].ql-indent-2::before {
    content: counter(list-2, lower-roman) ". ";
}

/* レベル3: 1. 2. 3. (リセット) */
.exhibition--info--section ol>li[data-list].ql-indent-3 {
    counter-increment: list-3;
    padding-left: 6em;
}

.exhibition--info--section ol>li[data-list="ordered"].ql-indent-3::before {
    content: counter(list-3, decimal) ". ";
}

/* === 箇条書きリスト（data-list="bullet"） === */
.exhibition--info--section ol>li[data-list="bullet"]::before {
    content: "\2022";
    display: inline-block;
    white-space: nowrap;
    width: 1.2em;
    margin-left: -1.5em;
    margin-right: 0.3em;
    text-align: right;
}

.exhibition--info--section ol>li[data-list="bullet"].ql-indent-1::before {
    content: "\25CB";
}

.exhibition--info--section ol>li[data-list="bullet"].ql-indent-2::before {
    content: "\25A0";
}

.exhibition--info--section ol>li[data-list="bullet"].ql-indent-3::before {
    content: "\2022";
}

/* === 標準HTMLリスト（Trumbowyg等・data-listなし） === */
.exhibition--info--section ul {
    padding-left: 1.5em;
}

.exhibition--info--section ul>li {
    list-style-type: disc;
    padding-left: 0.5em;
}

/* 標準ネストリスト */
.exhibition--info--section ol ol {
    counter-reset: list-1;
}

.exhibition--info--section ol ol>li {
    counter-increment: list-1;
}

.exhibition--info--section ol ol>li::before {
    content: counter(list-1, lower-alpha) ". ";
}

.exhibition--info--section ol ol ol {
    counter-reset: list-2;
}

.exhibition--info--section ol ol ol>li {
    counter-increment: list-2;
}

.exhibition--info--section ol ol ol>li::before {
    content: counter(list-2, lower-roman) ". ";
}

/* サイズ */
.ql-size-huge {
    font-size: 2.5em;
}

/* 配置 */
.ql-align-center {
    text-align: center;
}

.ql-align-right {
    text-align: right;
}

/* テーブル */
.exhibition--table {
    & td {
        max-width: 0;
        overflow: hidden;
        word-break: break-word;

        & img {
            max-width: 100%;
            height: auto;
        }

        & table {
            width: 100%;
            max-width: 100%;
        }
    }
}

.exhibition--info--section table[style*="width"] {
    max-width: unset !important;
    width: unset !important;
}


#exhibition_main .modal__container .headding--title-lower {
    margin-bottom: 2rem;
}

/* 動画埋め込み（styles.cssのグローバルiframeルールを上書き） */
.exhibition--info--section iframe {
    display: block;
    width: 100%;
    max-width: 800px;
    height: auto;
    aspect-ratio: 16 / 9;
    margin-top: 0;
}

/* リンクスタイル（reset.cssのa{color:inherit;text-decoration:none}を上書き） */
.post-body a {
    color: #06c;
    text-decoration: underline;
}

/* 段落間スペース（CMSリッチテキストの<p>タグ用） */
.exhibition--info--section p+p {
    margin-top: 1em;
}

/* 見出し */
.exhibition--info--section {

    & h1 {
        font-size: 2rem;
    }

    & h2 {
        font-size: 1.5rem;
    }

    & h3 {
        font-size: 1.2rem;
    }

    & h4 {
        font-size: 1rem;
    }
}

/* 投稿内のテーブル */
.exhibition--info--section.post-body,
.card--content {
    & table {
        display: block;

        & tbody {
            display: contents;
        }

        & tr {
            display: flex;
            flex-wrap: wrap;
            gap: 2rem;

            @media (max-width: 767.98px) {
                flex-direction: column;
                align-items: center;
            }
        }

        & td {
            display: block;
            flex: 1
        }
    }
}


/* モーダル内のテーブル */
.exhibition--info--section {
    & img {
        max-width: 100%;
        height: auto;
    }

    & .exhibited-works {
        & table {
            display: block;

            & tbody {
                display: contents;

                & tr {
                    display: grid;
                    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
                    gap: 2rem;
                }

                & td {
                    display: block;

                    & img {
                        /* aspect-ratio: 1/1; */
                        max-width: unset;
                        /* object-fit: cover; */
                    }
                }
            }
        }
    }

    & .modal {
        & table {
            /* margin-top: 24px; */
            display: flex;
            flex-direction: column;
            gap: 2rem;

            & tbody {
                display: contents;

                & tr {
                    display: flex;
                    gap: 2rem;


                    & td {
                        display: block;

                        &:first-child {
                            max-width: 300px;
                            width: 100%;
                            flex-shrink: 0;

                            & img {
                                /* object-fit: cover; */
                                width: 100%;
                                max-width: unset;
                                height: auto;
                            }
                        }
                    }
                }
            }
        }

        & h3>span {
            color: var(--color-green) !important;
            font-weight: 600;
        }
    }

    @media (max-width: 767.98px) {
        & .modal {
            & .modal__container {
                padding-inline: 24px;
            }

            & table {
                gap: 4rem;

                & tbody {
                    & tr {
                        flex-direction: column;
                        gap: 1rem;

                        & td {
                            &:first-child {
                                max-width: 100%;
                            }

                        }

                    }
                }
            }
        }
    }

}

.exhibition--related-event {
    & table {
        /* margin-top: 24px; */
        display: block;
        margin-bottom: 1rem;

        & tbody {
            display: contents;

            & tr {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
                gap: 2rem;


                & td:has(img) {
                    display: block;
                    /* aspect-ratio: 1/1; */

                    & img {
                        /* object-fit: cover; */
                        width: 100%;
                        max-width: unset;
                        height: auto;
                    }
                }
            }
        }
    }
}

/* 共通リンクパーツ */
.exhibition--info--section a[href$=".pdf"] {
    background-color: var(--color-orange) !important;
    color: var(--color-white);
    padding: 12px 24px 12px 0;
    border-radius: 100vh;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    font-size: 1.125rem;
    border: 2px solid transparent;
    position: relative;
    max-width: 430px;
    width: 100%;
    box-shadow: 0px 6px 6px #00000029;
    font-feature-settings: "palt";

    &::after {
        content: "";
        background-image: url("../../../assets/images/common/pdf_white.svg");
        position: absolute;
        top: 50%;
        right: 24px;
        width: 24px;
        height: 24px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        transform: translateY(-50%);

        @media (max-width: 767.98px) {
            right: 12px;
            width: 20px;
            height: 20px;
        }
    }
}

/* 共通リンクパーツ */
.exhibition--info--section a[target="_blank"]:not([href$=".pdf"], [href*="get.adobe.com"], [href*="x162-43-90-147.static.xvps.ne.jp"], [href*="aiou.museum"]) {
    background-color: var(--color-orange) !important;
    color: var(--color-white);
    padding: 12px 24px 12px 0;
    border-radius: 100vh;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    font-size: 1.125rem;
    border: 2px solid transparent;
    position: relative;
    max-width: 430px;
    width: 100%;
    box-shadow: 0px 6px 6px #00000029;
    font-feature-settings: "palt";

    &::after {
        content: url("../../../assets/images/common/external_white.svg");
        position: absolute;
        top: 50%;
        right: 24px;
        width: 24px;
        height: 24px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        transform: translateY(-50%);

        @media (max-width: 767.98px) {
            right: 12px;
            width: 20px;
            height: 20px;
        }
    }
}