@import url('https://fonts.googleapis.com/css2?family=Oswald&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400;1,700&display=swap');

@media print {
    body {
        margin: 0 !important;
    }
}

.main-container {
    font-family: 'Lato';
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.ck-content {
    font-family: 'Lato';
    line-height: 1.6;
    word-break: break-word;
    min-height: auto !important;
}

.editor-container_classic-editor .editor-container__editor {
    min-width: 795px;
    max-width: 795px;
}

.ck-content h3.category {
    font-family: 'Oswald';
    font-size: 20px;
    font-weight: bold;
    color: #555;
    letter-spacing: 10px;
    margin: 0;
    padding: 0;
}

.ck-content h2.document-title {
    font-family: 'Oswald';
    font-size: 50px;
    font-weight: bold;
    margin: 0;
    padding: 0;
    border: 0;
}

.ck-content h3.document-subtitle {
    font-family: 'Oswald';
    font-size: 20px;
    color: #555;
    margin: 0 0 1em;
    font-weight: bold;
    padding: 0;
}

.ck-content p.info-box {
    --background-size: 30px;
    --background-color: #e91e63;
    padding: 1.2em 2em;
    border: 1px solid var(--background-color);
    background:
        linear-gradient(135deg, var(--background-color) 0%, var(--background-color) var(--background-size), transparent var(--background-size)),
        linear-gradient(135deg,
            transparent calc(100% - var(--background-size)),
            var(--background-color) calc(100% - var(--background-size)),
            var(--background-color));
    border-radius: 10px;
    margin: 1.5em 2em;
    box-shadow: 5px 5px 0 #ffe6ef;
}

.ck-content span.marker {
    background: yellow;
}

.ck-content span.spoiler {
    background: #000;
    color: #000;
}

.ck-content span.spoiler:hover {
    background: #000;
    color: #fff;
}

.ck-content .button {
    display: inline-block;
    width: 260px;
    border-radius: 8px;
    margin: 0 auto;
    padding: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.ck-content .button--green {
    background-color: #406b1e;
}

.ck-content .button--black {
    background-color: #141517;
}

.main-container {
    font-family: 'Lato', sans-serif;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.editor-container_classic-editor .editor-container__editor {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.editor-container_include-word-count.editor-container_classic-editor .editor-container__editor .ck-editor .ck-editor__editable {
    border-radius: 0;
}

.ck.ck-toolbar {
    flex-wrap: wrap;
    padding: 5px;
}

@media screen and (max-width: 768px) {
    .main-container {
        padding: 0 10px;
    }

    .editor-container_classic-editor .editor-container__editor {
        min-height: 150px;
    }

    .ck.ck-toolbar {
        font-size: 14px;
    }

    .ck.ck-toolbar .ck.ck-toolbar__items {
        gap: 5px;
    }

    .ck-editor__editable {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .main-container {
        padding: 0 5px;
    }

    .ck.ck-toolbar {
        font-size: 12px;
    }

    .ck-editor__editable {
        font-size: 13px;
    }

    .editor-container_classic-editor .editor-container__editor {
        min-height: 120px;
    }
}

.ck.ck-powered-by {
    display: none;
}

.ck.ck-evaluation-badge {
    display: none;
}

.show-format-symbols::selection {
    background: rgba(200, 200, 255, 0.5);
}

.ck.ck-sticky-panel__content.ck-sticky-panel__content_sticky {
    top: 40px !important;
}

@media (max-width: 1199px) {
    .ck.ck-sticky-panel__content.ck-sticky-panel__content_sticky {
        top: 10px !important;
    }
}

/* show-format-symbols */
.editor-container p::before {
    content: " ¶";
    color: gray;
    font-size: 0.8em;
    pointer-events: none;
}

.show-format-symbols::selection {
    background: rgba(200, 200, 255, 0.5);
}

.ck-content.show-format-symbols span.whitespace::after {
    content: '⋅';
    margin-inline-start: -0.2em;
    color: #999;
}

.editor-container span.wrapped-br::before {
    content: '↵';
    color: #999;
}

/* Line-height */
.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw.ck-balloon-panel_visible.ck-balloon-panel_with-arrow {
    border-radius: 10px;
}

.ck-content h1,
.ck-content h2,
.ck-content h3,
.ck-content h4,
.ck-content h5,
.ck-content h6,
.ck-content .h1,
.ck-content .h2,
.ck-content .h3,
.ck-content .h4,
.ck-content .h5,
.ck-content .h6 {
    margin: 1em 0 1em 0;
    padding: 0;
    line-height: normal;
    font-weight: bold;
}

.ck-content code {
    margin: 0;
    padding: 0.15em 0.25em;
    background-color: #f7f8fa;
    border-radius: 2px;
    font-family: monospace;
    font-size: 1em;
    color: #e83e8c;
    word-wrap: break-word;
}

.underline-menu {
    z-index: 1000;
}

.ck-balloon-panel .ck-balloon-rotator .ck-balloon-rotator__content .underline-menu {
    z-index: 9999 !important;
    max-height: calc(100vh - 60px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: none;
    overflow-y: auto;
}

.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw.ck-balloon-panel_visible.ck-balloon-panel_with-arrow {
    border-radius: 10px;
}

.ck-underline-apply-btn:hover,
.ck-underline-clear-btn:hover {
    background: #0285ff !important;
}

.selected {
    background-color: #aec4ff !important;
}

.hr-style-wrapper:hover,
.hr-style-option:hover {
    background-color: #aec4ff !important;
}

.ck-hr-apply-btn:hover,
.ck-hr-clear-btn:hover {
    background: #0285ff !important;
}

.ck.ck-balloon-panel.ck-balloon-panel_visible.ck-balloon-panel_with-arrow {
    border-radius: 15px;
}

.ck-table-row-resizer {
    bottom: 0;
    cursor: col-resize;
    position: absolute;
    right: var(--ck-table-column-resizer-position-offset);
    top: 0;
    user-select: none;
    width: var(--ck-table-column-resizer-width);
    z-index: var(--ck-z-default);
}

.ck-table-row-resizer:hover {
    background: rgba(0, 0, 255, 0.6);
}

.wrap-text-right~* {
    clear: left !important;
}

.wrap-text-left~* {
    clear: right !important;
}

.ck-content .table .ck-table-resized {
    table-layout: auto !important;
}

/* Paste Form */
.ck.ck-balloon-panel.ck-balloon-panel_arrowless.ck-balloon-panel_visible.popup-before-paste {
    border-radius: 15px;
}

.ck-paste-options-form {
    display: flex;
    flex-direction: column;
    padding: 16px;
    width: 320px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    position: relative !important;
}

.ck-paste-options-form .ck-button {
    justify-content: center;
}

.ck-preview-box {
    border: 1px solid #ddd;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    background-color: #f9f9f9;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
}

.ck.ck-paste-overlay {
    max-height: calc(100vh - 200px) !important;
    max-width: 100% !important;
    overflow-y: auto;
    padding: 20px !important;
    border: 1px solid #ccc;
    margin-bottom: 1em;
}

.popup-before-paste {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 9999 !important;
    height: revert !important;
    width: 60% !important;
    max-height: calc(100vh - 60px);
    padding: 2rem;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: none;
}

.popup-before-paste::-webkit-scrollbar {
    width: 12px;
}

.popup-before-paste::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.popup-before-paste::-webkit-scrollbar-track {
    background-color: transparent;
}

.ck.ck-button.ck-button-paste-styles,
.ck.ck-button.ck-button-paste-plain {
    left: 0;
    width: 100%;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
    display: inline;
}

.ck-button-paste-styles:hover,
.ck-button-paste-plain:hover {
    background-color: #0056b3;
}

.ck.ck-button.ck-button-paste-styles {
    border-radius: 0px 0px 0px 15px !important;
}

.ck.ck-button.ck-button-paste-plain {
    border-radius: 0px 0px 15px 0px !important;
}

.ck-button-container {
    display: flex;
    gap: 0px;
    height: 50px !important;
    z-index: 1;
}

.ck.ck-sticky-panel__content.ck-sticky-panel__content_sticky {
    top: 4.5% !important;
}

.ck.ck-button.ck-button-close.ck-off {
    float: right;
    margin: 20px 20px 10px 10px;
    background: #cccccc;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
}

.ck-button-close .ck-off:hover {
    background: #ededed;
}

#paste-buttons-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    background: #fff;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.ck.ck-powered-by,
.ck.ck-evaluation-badge {
    display: none;
}

.ck-off.ck-button_with-text {
    position: absolute;
    top: 2%;
}

.ck-paste-title {
    padding: 10px 10px 10px 20px !important;
    position: absolute !important;
    font-size: x-large !important;
    font-weight: bold !important;
}

.ck-paste-divider {
    border: none;
    height: 1px !important;
    background-color: #e0e0e0 !important;
    margin: 8px 0 !important;
    width: 97% !important;
    align-self: center !important;
}

#addTemplate:hover {
    background-color: #43ab43 !important;
    color: white !important;
}

#updateTemplate:hover {
    background-color: #f9b12d !important;
    color: white !important;
}

#deleteTemplate:hover {
    background-color: #f15252 !important;
    color: white !important;
}

#closeModal:hover {
    background-color: #f0f0f0 !important;
}

.ck-content ul.bullet-circle,
.ck-content ul.bullet-circle li {
    list-style-type: circle !important;
}

.ck-content ul.bullet-square,
.ck-content ul.bullet-square li {
    list-style-type: square !important;
}

.ck-content ul.bullet-arrow,
.ck-content ul.bullet-star,
.ck-content ul.bullet-diamond,
.ck-content ul.bullet-triangle,
.ck-content ul.custom-check,
.ck-content ul.custom-cross{
    list-style-type: none !important;
}

.ck-content ul.bullet-arrow li,
.ck-content ul.bullet-star li,
.ck-content ul.bullet-diamond li,
.ck-content ul.bullet-triangle li,
.ck-content ul.custom-check li,
.ck-content ul.custom-cross li {
    position: relative;
    list-style-type: none !important;
}

.ck-content ul.bullet-arrow li,
.ck-content ul.bullet-star li,
.ck-content ul.bullet-diamond li,
.ck-content ul.bullet-triangle li,
.ck-content ul.custom-check li,
.ck-content ul.custom-cross li {
    padding-left: 1.5em;
    text-indent: -1.5em;
}

.ck-content ul.bullet-arrow li p,
.ck-content ul.bullet-star li p,
.ck-content ul.bullet-diamond li p,
.ck-content ul.bullet-triangle li p,
.ck-content ul.custom-check li p,
.ck-content ul.custom-cross li p {
    margin: 0;
    padding: 0;
    display: inline;
}

.ck-content ul.bullet-arrow li::before {
    content: "➤";
    font-weight: bold;
    display: inline-block;
}

.ck-content ul.bullet-star li::before {
    content: "★";
    font-weight: bold;
    display: inline-block;
}

.ck-content ul.bullet-diamond li::before {
    content: "♦";
    font-weight: bold;
    display: inline-block;
}

.ck-content ul.bullet-triangle li::before {
    content: "►";
    font-weight: bold;
    display: inline-block;
}

.ck-content ul.custom-check li::before {
    content: "✓";
    font-weight: bold;
    display: inline-block;
}

.ck-content ul.custom-cross li::before {
    content: "✗";
    font-weight: bold;
    display: inline-block;
}
