/* Put this in your static_data/css/ckeditor-custom.css */

/* Make all images in CKEditor content responsive */
.ck-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

/* Remove any fixed dimensions */
.ck-content figure.image {
    display: block;
    margin: 1em 0;
    max-width: 100%;
}

/* Make image captions look good */
.ck-content figcaption {
    text-align: center;
    font-size: 0.8em;
    color: #555;
    margin-top: 0.5em;
}

/* Style for formatted text that allows wrapping */
pre.ck-formatted-text {
    white-space: pre-wrap;       /* CSS3 */
    white-space: -moz-pre-wrap;  /* Firefox */
    white-space: -pre-wrap;      /* Opera <7 */
    white-space: -o-pre-wrap;    /* Opera 7 */
    word-wrap: break-word;       /* IE & Chrome */
    font-family: inherit;        /* Use the normal text font */
    background-color: #f8f8f8;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
}

/* Style for code blocks - non-wrapping */
pre.code {
    white-space: pre;            /* Preserve formatting, no wrapping */
    overflow-x: auto;            /* Add horizontal scrollbar when needed */
    font-family: monospace;      /* Use monospace font for code */
    background-color: #f5f5f5;
    padding: 1em;
    border-radius: 4px;
    border-left: 3px solid #2c8898;
}

/* Style for code blocks inserted via the codeBlock button - non-wrapping */
.ck-content pre.ck-code-block {
    white-space: pre;            /* Preserve formatting, no wrapping */
    overflow-x: auto;            /* Add horizontal scrollbar when needed */
}