/*
 * 前台顯示 CKEditor 5 產生的內容（商品介紹、文章、自訂頁、合約）
 * 只針對 CKEditor 5 專用的 class，不影響其他版面
 */
figure.image {
    display: table;
    clear: both;
    margin: 1em auto;
    text-align: center;
    max-width: 100%;
}
figure.image img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    min-width: 100%;
    height: auto;
}
figure.image.image_resized {
    display: block;
    box-sizing: border-box;
}
figure.image.image_resized img {
    width: 100%;
}
figure.image > figcaption {
    display: table-caption;
    caption-side: bottom;
    padding: .4em;
    font-size: .875em;
    color: #666;
    word-break: break-word;
}
img.image_resized {
    height: auto;
}
.image-inline {
    display: inline-flex;
    max-width: 100%;
    align-items: flex-start;
}
.image-inline img {
    flex-grow: 1;
    flex-shrink: 1;
    max-width: 100%;
    height: auto;
}
.image-style-side,
.image-style-align-right {
    float: right;
    margin-left: 1.5em;
    max-width: 50%;
}
.image-style-align-left {
    float: left;
    margin-right: 1.5em;
    max-width: 50%;
}
.image-style-block-align-left { margin-left: 0; margin-right: auto; }
.image-style-block-align-right { margin-left: auto; margin-right: 0; }

figure.table {
    display: table;
    margin: 1em auto;
    max-width: 100%;
    overflow-x: auto;
}
figure.table table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    height: 100%;
    border: 1px double #b3b3b3;
}
figure.table table td,
figure.table table th {
    min-width: 2em;
    padding: .4em;
    border: 1px solid #bfbfbf;
}

figure.media {
    clear: both;
    margin: 1em 0;
    display: block;
    min-width: 15em;
}

@media (max-width: 575.98px) {
    .image-style-side,
    .image-style-align-left,
    .image-style-align-right {
        float: none;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}
