.theme_body {
    margin-top: -32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.theme {
    max-width: 1800px;
    width: 100%;
    background-color: #525252;
    color: #ffffff;
    position: relative;
}

.searh_body {
    width: 100%;
    max-width: 400px;
    height: 40px;
    display: flex;
    flex-direction: row;
    margin-left: auto;
    margin-bottom: 0px;
    
}

.searh_body .txt {
    width: 100%;
    max-width: 360px;
    height: 100%;
    margin-top: 1px;
}

.searh_body .txt input {
    width: 100%;
    max-width: 340px;
    color: #333333;
}

.searh_body .btns {
    width: 41px;
    height: 100%;
    background-color: #525252;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.searh_body .btns:hover {
    background-color: rgba(255,255,255,0.1);
}

.theme_caption {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: #525252;
    position: sticky;
    top: 55px;
    z-index: 999;
    max-width: 1800px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 0 3px #000000;
}

.theme_caption button {
    width: 120px;
    margin-right: 40px;
    margin-left: 0;
}

.theme_caption .caption {
    margin-left: 40px;
    margin-right: 40px;
    font-weight: 400;
    font-size: 20px;
}

.arrow_nav {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    box-shadow: 1px 1px 3px #000000;
    margin-left: 16px;
    cursor: pointer;
}

.arrow_nav svg {
    width: 32px;
    height: 32px;
}

.arrow_nav .arrow_1 {
    fill: #333333;
}

.arrow_nav .arrow_2 {
    fill: #525252;
}

.arrow_nav:hover .arrow_2 {
    fill: #4CAF50;
}

.theme_info {
    margin-right: 40px;
    margin-left: auto;
}

.theme_info p {
    margin: 0;
    font-size: 14px;
    font-style: italic;
    color: #dbdbdb;
}

.theme_info span {
    font-style: normal;
    color: #9a97c9;
}

.page_navigator {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 5px 15px;
    background-color: #333333;
}

.navigator_box {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-left: auto;
}

.page_num {
    height: 26px;
    border: solid 1px #535353;
    border-radius: 4px;
    margin-left: 4px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #4e4e4e;
    color: #b3b2b2;
}

.page_num:hover:not([disabled]) {
    background-color: rgba(255,255,255,0.1);
    color: #4CAF50;
    border-color: #4CAF50;
}

.page_num.fix {
    width: 26px;
}

.page_num:hover:not([disabled]) .svg_page_button {
     fill: #4CAF50;
}

.svg_page_button {
    width: 14px;
    height: 14px;
    fill: #b3b2b2;
}

.page_num:disabled {
    cursor: default;
    border-width: 0;
    background-color: #333333;
}

.page_num:disabled .svg_page_button {
    fill: #202020;
}

.page_num.active {
    background-color: #4CAF50;
    color: #0056b3;
}

.num_space {
    color: #b3b2b2;
    margin-left: 4px;
}

.formbox {
    display: flex;
    flex-direction: column;
    width: 600px;
    height: 250px;
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 300px;
    min-height: 200px;
    padding: 1px;
    z-index: 3000;
    background-color: #1a1a1a;
    border-radius: 6px;
    border: 1px solid #7e7e7e;
    box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
}

.formbox.hidden {
    display: none;
}

.formheader,
.formfooter {
    display: flex;
    flex-direction: row;
    justify-content: right;
    align-items: center;
    background-color: #333333;
}

.formheader {
    cursor:grab;
}

.formclose {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 3px 10px;
    padding-bottom: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: #b3b2b2;
}

.formclose:hover {
    background-color: rgba(255,255,255,0.1);
    color:#4CAF50;
    border-radius: 4px;
}

.formbody {
    flex-grow: 1;
    background-color: #4e4e4e;
    margin-top: 1px;
    margin-bottom: 1px;
}

.formresize {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: end;
    cursor: nwse-resize;
}

.svg_resize {
    width: 10px;
    height: 10px;
    margin: 2px;
    fill: #b3b2b2;
}

.formresize:hover .svg_resize   {
    fill: #4CAF50;
}

.edittools {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 3px;
    background-color: #4e4e4e;
    margin-bottom: 2px;
    box-shadow: 0 0 3px rgba(0,0,0,0.2);
}

.edittools .btn {
    width: 110px;
    margin-right: 10px;
    margin-left: auto;
    padding-top: 5px;
    padding-bottom: 5px;
}

.tool-btn {
    width: 30px;
    height: 30px;
    margin-right: 5px;
    background-color: #3a3a3a;
    border: 1px solid #5a5a5a;
    color: #e0e0e0;
    cursor: pointer;
    border-radius: 3px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-btn:hover {
    background-color: #4a4a4a;
    border-color: #4CAF50;
}

.tool-btn.active {
    background-color: #4CAF50;
    color: #000;
}

/* Специальные стили для кнопки цвета текста */
.tool-btn[data-command="foreColor"][data-value="#ff0000"] {
    color: #ff0000;
}

.tool-btn[data-command="foreColor"][data-value="#ff0000"].active {
    background-color: #ff0000;
    color: #000;
}

.editor-container {
    flex-grow: 1;
    padding: 0;
    margin-bottom: 2px;
    overflow: auto;
    background-color: #d4d4d4;
}

.editor {
    outline: none;
    background-color: #d4d4d4;
    color: #202020;
    padding: 10px;
    font-size: 14px;
    overflow-y: auto;
}

.editor img {
    max-width: 100%;
    height: auto;
}

.editor blockquote,
.topic_body blockquote {
    margin: 0;
    padding: 0 10px;
    border-left: 4px solid #4CAF50;
    background-color: #f0f0f0;
    color: #333333;
    font-style: italic;
}

.blockquote {
    font-size: 11px;
}

/* Стили для изображений в редакторе */
.image-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin: 10px 0;
    pointer-events: none;
    -webkit-user-modify: read-only;
    -moz-user-modify: read-only;
    /* user-modify: read-only; */
}

.delete-image {
    pointer-events: auto;
}

.image-container {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #3a3a3a;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.delete-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.delete-image:hover {
    background-color: rgba(255, 0, 0, 0.8);
}

.topic_body .delete-image {
    display: none;
}

/* Стили топика */

.topics {
    background-color: #525252;
    max-width: 1800px;
    width: 100%;
}

.topic {
    background-color: #d4d4d4;
    border-radius: 4px;
    margin-bottom: 4px;
    margin-left: 6px;
    margin-right: 6px;
    margin-top: 0;
    box-shadow: 0 0 6px rgb(0, 0, 0);
    color: #1a1a1a;
    overflow: hidden;
}

.topic_header {
    background-color: #202020;
    color: #b3b2b2;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px 10px;
    font-weight: 100;
    font-size: 14px;
    cursor: default;
    font-style: italic;
}

.topic_header p {
    margin: 0 3px 0 6px;
}

.topic_header span {
    margin-right: 6px;
    color: #9a97c9;
}

.topic_header .toend {
    margin-left: auto;
}

.topic_body {
    padding: 4px 6px;
    font-size: 14px;
}

.quote-block {
    background-color: #e9e9e9;
    border-radius: 8px;
    margin: 0;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    pointer-events: none;
    -webkit-user-modify: read-only;
    -moz-user-modify: read-only;
}

.quote-header {
    background-color: #4CAF50;
    color: white;
    padding: 1px 12px;
    border-radius: 8px 8px 0 0;
    font-weight: 100;
    font-style: italic;
    font-size: 13px;
}

.quote-content {
    padding: 6px;
    color: #333333;
    font-size: 13px;
}

.quote-content ul,
.quote-content ol {
    margin: 0;
    padding-left: 20px;
}

.quote-icon {
    margin-right: 8px;
    font-size: 15px;
}

.topic_footer {
    background-color: #525252;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.topic_footer button {
    border-width: 0;
    background-color: #7e7e7e;
    color: #d4d4d4;
    margin: 0 4px;
    height: 24px;
    width: 110px;
    border-radius: 3px;
}

.topic_footer button:disabled {
    background-color: #7e7e7e;
    color: #535353;
}

.topic_footer button:hover:not(:disabled) {
    background-color: #4CAF50;
    color: #ffffff;
    cursor: pointer;
}

.topic_body ul,
.topic_body ol {
    margin: 0;
}
/* Summernote modal z-index fix */
.note-modal {
    z-index: 2000 !important;
}
.note-editor .note-modal-backdrop {
    z-index: 1999 !important;
}

.note-form-label {
    position: relative;
    top: 0;
}