/**
 * CKEditor画像アップロード機能用スタイル
 */
 
/* 画像の基本スタイル */
.ck-content img {
    max-width: 100%;
    height: auto;
    margin: 8px 0;
    border-radius: 4px;
}

/* 画像配置スタイル */
.ck-content .image {
    position: relative;
    clear: both;
    text-align: center;
    margin: 1em 0;
}

.ck-content .image img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    min-width: 50px;
}

/* 左寄せ */
.ck-content .image.image-style-align-left {
    float: left;
    margin-right: 1.5em;
    max-width: 50%;
}

/* 中央寄せ */
.ck-content .image.image-style-align-center {
    margin-left: auto;
    margin-right: auto;
    clear: both;
}

/* 右寄せ */
.ck-content .image.image-style-align-right {
    float: right;
    margin-left: 1.5em;
    max-width: 50%;
}

/* キャプション */
.ck-content .image > figcaption {
    color: #333;
    background-color: #f7f7f7;
    padding: 0.6em;
    font-size: 0.75em;
    text-align: center;
}

/* アップロード中表示 */
.ck-content .image.ck-appear {
    animation: fadeIn 0.8s;
}

/* 画像のクリック可能なスタイル（ホバー時） */
.ck-content .image:hover {
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

/* レスポンシブ対応（モバイル） */
@media (max-width: 768px) {
    .ck-content .image.image-style-align-left,
    .ck-content .image.image-style-align-right {
        float: none;
        max-width: 100%;
        margin: 1em auto;
    }
}

/* ライトボックスで表示される画像 */
.ckeditor-image-expanded {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.ckeditor-image-expanded img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.ckeditor-image-expanded .close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
}
