/* ===== v1.0.56 note =====
 * Removed the former body.single-post typography override from this form stylesheet.
 * Blog post form typography remains scoped below to .custom-blog-submit-wrap.
 */

/* ===== Extracted from ДОБАВИТЬ ЗАПИСЬ В БЛОГ.txt: style block 2 ===== */
.custom-blog-access-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 140px);
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.custom-blog-access-box.custom-blog-submit-message.custom-blog-submit-error {
    width: auto;
    max-width: 90%;
    min-width: 200px;
    background: rgba(28, 31, 38, 0.6) !important;
    backdrop-filter: blur(4px);
    border-radius: 40px !important;
    padding: 15px 20px !important;
    border: 1px solid rgba(255, 205, 87, 0.25) !important;
    text-align: center;
    color: #DEDBB2 !important;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    pointer-events: auto;
    margin: 0 !important;
}

.custom-blog-access-box a,
.custom-blog-access-box a:link,
.custom-blog-access-box a:visited {
    color: #e8bd58;
    text-decoration: none !important;
    border-bottom: 0 solid #e8bd58;
    transition: border-bottom 0.2s ease;
    font-weight: 600;
}

.custom-blog-access-box a:hover,
.custom-blog-access-box a:focus {
    border-bottom-width: 1px;
    text-decoration: none !important;
}


/* ===== Extracted from ДОБАВИТЬ ЗАПИСЬ В БЛОГ.txt: style block 3 ===== */
.custom-blog-submit-header,
            .custom-blog-submit-header *,
            .custom-blog-submit-wrap,
            .custom-blog-submit-wrap * {
                box-sizing: border-box;
            }

            .custom-blog-submit-wrap,
            .custom-blog-submit-wrap input,
            .custom-blog-submit-wrap textarea,
            .custom-blog-submit-wrap button,
            .custom-blog-submit-wrap select {
                font-family: inherit;
            }


/* ===== Полноэкранная секция страницы "Добавить запись" ===== */
.custom-blog-submit-page.ra-bg-deep {
    --ra-text: #dad5aa;
    --ra-text-soft: #c8c099;
    --ra-muted: #9a9480;
    --ra-gold-soft: #e1b759;
    --ra-side-padding: clamp(18px, 5vw, 56px);
    --custom-blog-section-y: clamp(60px, 5.4vw, 86px);
    --custom-blog-button-bg:
        linear-gradient(180deg, rgba(255, 255, 255, 0.024) 0%, rgba(255, 244, 204, 0.015) 42%, rgba(74, 43, 7, 0.057) 100%),
        linear-gradient(180deg, #edc25f 0%, #e6b44d 34%, #e3aa3e 58%, #d68f30 80%, #bd7b22 100%);
    --custom-blog-button-hover-bg:
        linear-gradient(180deg, rgba(255, 255, 255, 0.033) 0%, rgba(255, 244, 204, 0.018) 42%, rgba(74, 43, 7, 0.045) 100%),
        linear-gradient(180deg, #f0ca69 0%, #eabd56 34%, #e5ad47 58%, #d79635 80%, #c98a2d 100%);
    --custom-blog-button-active-bg:
        linear-gradient(180deg, rgba(255, 244, 204, 0.020) 0%, rgba(70, 40, 7, 0.085) 100%),
        linear-gradient(180deg, #d29c39 0%, #c88c30 56%, #ae7121 100%);
    --lux-input-border: rgba(220, 180, 82, 0.28);

    position: relative;
    left: 50%;
    width: 100vw;
    max-width: none;
    margin: 0 0 0 -50vw;
    overflow: hidden;
    padding: var(--custom-blog-section-y) var(--ra-side-padding);
    color: var(--ra-text);
    background: var(--ra-section-bg, linear-gradient(180deg, #0b1018 0%, #101724 48%, #090e15 100%));
    box-shadow: var(--ra-section-shadow, inset 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 -1px 0 rgba(220, 180, 82, 0.14));
    isolation: isolate;
}

.custom-blog-submit-page.ra-bg-deep::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: var(--ra-section-pattern-opacity, 0.74);
    background: var(--ra-section-pattern-bg, repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.017) 0 0.8px, transparent 0.8px 10px));
    mix-blend-mode: var(--ra-section-pattern-blend-mode, normal);
    -webkit-mask-image: var(--ra-section-pattern-mask, repeating-conic-gradient(from 0deg at 50% 50%, #000 0deg 0.67deg, transparent 0.67deg 1.34deg), radial-gradient(circle at 50% 50%, transparent 0%, #000 13%, #000 80%, transparent 100%));
    mask-image: var(--ra-section-pattern-mask, repeating-conic-gradient(from 0deg at 50% 50%, #000 0deg 0.67deg, transparent 0.67deg 1.34deg), radial-gradient(circle at 50% 50%, transparent 0%, #000 13%, #000 80%, transparent 100%));
    -webkit-mask-composite: var(--ra-section-pattern-webkit-composite, source-in);
    mask-composite: var(--ra-section-pattern-composite, intersect);
}

.custom-blog-submit-page.ra-bg-deep::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 1;
    width: min(1320px, 90vw);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(220, 180, 82, 0.34), transparent);
    pointer-events: none;
}

.custom-blog-submit-page.ra-bg-deep > * {
    position: relative;
    z-index: 2;
}

            /* ===== Заголовок над формой ===== */

            .custom-blog-submit-header {
                max-width: 900px;
                width: 100%;
                text-align: center;
                margin: 0 auto 30px;
                padding: 0;
            }

            .custom-blog-submit-title {
                color: var(--ra-text, #dad5aa);
                font-size: clamp(28px, 3vw, 36px);
                line-height: 1.12;
                font-weight: 700;
                letter-spacing: 0.01em;
                margin: 0;
                padding: 0;
                text-align: center;
            }

            .custom-blog-submit-decor {
    --decor-width: 140px;
    --decor-bg: var(--ra-section-decor-bg, #0f141e);
    margin: 25px auto 0;
}

            /* ===== Каркас формы ===== */

            .custom-blog-submit-wrap {
                width: min(800px, 100%);
                margin: 0 auto !important;
                padding: 28px 30px 32px;
                border-radius: 16px;
                background: linear-gradient(180deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.006)), rgba(17, 24, 36, 0.88);
                border: 1px solid rgba(220, 180, 82, 0.28);
                color: #DEDBB2;
                box-shadow: 0 0 6px rgba(220, 180, 82, 0.075), 0 0 12px rgba(220, 180, 82, 0.055), 0 0 22px rgba(220, 180, 82, 0.032), inset 0 1px 0 rgba(255, 255, 255, 0.048), 0 0 0 1px rgba(220, 180, 82, 0.018);
                transition: border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
            }

            .custom-blog-submit-wrap:hover {
                border-color: rgba(255, 224, 141, 0.34);
                box-shadow: 0 0 6px rgba(220, 180, 82, 0.085), 0 0 12px rgba(220, 180, 82, 0.062), 0 0 22px rgba(220, 180, 82, 0.038), inset 0 1px 0 rgba(255, 255, 255, 0.054), 0 0 0 1px rgba(255, 224, 141, 0.045);
            }

            .custom-blog-submit-field {
                margin: 0 0 22px 0;
                padding: 0;
            }

            .custom-blog-submit-field > label {
                display: block;
                margin-bottom: 8px;
                font-size: 15px;
                color: #e1b759;
                font-weight: 700;
            }

            .custom-blog-submit-field input[type="text"],
            .custom-blog-submit-field textarea {
                display: block;
                width: 100%;
                max-width: 100%;
                min-width: 0;
                min-height: 44px;
                margin: 0;
                padding: 14px 18px;
                border: 1px solid rgba(220, 180, 82, 0.20);
                border-radius: 8px;
                background: linear-gradient(180deg, rgba(255, 255, 255, 0.029), rgba(255, 255, 255, 0.007)), rgba(22, 31, 48, 0.98);
                color: #e7e1be;
                caret-color: #e1b759;
                font-size: 16px;
                font-family: inherit;
                line-height: 24px;
                box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.038), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.09);
                outline: none;
                -webkit-appearance: none;
                appearance: none;
                transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
            }

.custom-blog-submit-field input,
.custom-blog-submit-field textarea {
    font-family: inherit;
}

/* Для современных браузеров */
.custom-blog-submit-field input::placeholder,
.custom-blog-submit-field textarea::placeholder {
    color: rgba(218, 213, 170, 0.51);
    opacity: 1;
}

/* Для Internet Explorer 10-11 */
.custom-blog-submit-field input:-ms-input-placeholder,
.custom-blog-submit-field textarea:-ms-input-placeholder {
    color: rgba(218, 213, 170, 0.51);
}

/* Для Microsoft Edge (старые версии) */
.custom-blog-submit-field input::-ms-input-placeholder,
.custom-blog-submit-field textarea::-ms-input-placeholder {
    color: rgba(218, 213, 170, 0.51);
}

            .custom-blog-submit-field input[type="text"]:hover,
            .custom-blog-submit-field textarea:hover {
                border-color: rgba(225, 183, 89, 0.36);
                background: linear-gradient(180deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.009)), rgba(25, 36, 53, 0.99);
                box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.042), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(225, 183, 89, 0.018);
            }

            .custom-blog-submit-field input[type="text"]:focus,
            .custom-blog-submit-field textarea:focus {
                outline: none;
                border-color: rgba(255, 224, 141, 0.68);
                background: linear-gradient(180deg, rgba(255, 255, 255, 0.039), rgba(255, 255, 255, 0.011)), rgba(27, 40, 59, 1);
                color: #f2eac4;
                box-shadow: 0 0 0 3px rgba(225, 183, 89, 0.14), 0 0 10px rgba(225, 183, 89, 0.035), inset 0 1px 0 rgba(255, 255, 255, 0.050);
            }

            .custom-blog-submit-field input[type="text"]:-webkit-autofill,
            .custom-blog-submit-field input[type="text"]:-webkit-autofill:hover,
            .custom-blog-submit-field input[type="text"]:-webkit-autofill:focus,
            .custom-blog-submit-field input[type="text"]:-webkit-autofill:active {
                -webkit-text-fill-color: #e7e1be !important;
                caret-color: #e1b759 !important;
                border-color: rgba(220, 180, 82, 0.28) !important;
                -webkit-box-shadow: 0 0 0 1000px rgba(22, 31, 48, 0.98) inset, inset 0 1px 0 rgba(255, 255, 255, 0.038), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.09) !important;
                box-shadow: 0 0 0 1000px rgba(22, 31, 48, 0.98) inset, inset 0 1px 0 rgba(255, 255, 255, 0.038), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.09) !important;
                transition: background-color 9999s ease-in-out 0s, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
            }

            .custom-blog-submit-help {
                margin: 8px 0 0 0;
                padding: 0;
                font-size: 13px;
                line-height: 1.45;
                color: rgba(218, 213, 170, 0.78);
            }

            /* ===== Загрузка изображения записи ===== */

            .custom-blog-submit-image-field .file-input-area {
                display: block;
                width: 100%;
                margin: 0;
                padding: 0;
            }

            .custom-blog-submit-image-field .file-input-area input[type="file"] {
                display: block;
                width: 100%;
                box-sizing: border-box;
                margin: 0;
                padding: 12px;
                border: 1px dashed rgba(220, 180, 82, 0.38);
                border-radius: 8px;
                background:
                    linear-gradient(
                        180deg,
                        rgba(255, 255, 255, 0.029),
                        rgba(255, 255, 255, 0.007)
                    ),
                    rgba(22, 31, 48, 0.98);
                color: #e7e1be;
                font-family: inherit;
                font-size: 15px;
                line-height: 1.45;
                cursor: pointer;
                outline: none;
                box-shadow:
                    inset 0 1px 0 rgba(255, 255, 255, 0.038),
                    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
                transition:
                    border-color 0.2s ease,
                    background 0.2s ease,
                    box-shadow 0.2s ease;
            }

            .custom-blog-submit-image-field .file-input-area input[type="file"]:hover {
                border-color: rgba(255, 224, 141, 0.62);
                background:
                    linear-gradient(
                        180deg,
                        rgba(255, 255, 255, 0.034),
                        rgba(255, 255, 255, 0.009)
                    ),
                    rgba(25, 36, 53, 0.99);
            }

            .custom-blog-submit-image-field .file-input-area input[type="file"]:focus-visible {
                outline: none;
                border-color: rgba(255, 224, 141, 0.68);
                box-shadow:
                    0 0 0 3px rgba(225, 183, 89, 0.14),
                    0 0 10px rgba(225, 183, 89, 0.035);
            }

            .custom-blog-submit-image-field .file-input-area input[type="file"]::file-selector-button,
            .custom-blog-submit-image-field .file-input-area input[type="file"]::-webkit-file-upload-button {
                margin-right: 12px;
                padding: 9px 13px;
                border: 0;
                border-radius: 8px;
                background: #DEDBB2;
                color: #1C1F26;
                font-family: inherit;
                font-weight: 400;
                cursor: pointer;
            }

/* ===== Рубрики ===== */

.custom-blog-submit-categories {
    display: table;           /* ширина под контент */
    margin: 0 auto;           /* центрируем блок */
    padding: 10px 20px;
    border: 1px solid rgba(255, 205, 87, 0.3);
    border-radius: 40px;
    background-color: #232630;
    text-align: center;       /* чтобы inline-block элементы располагались по центру */
}

.custom-blog-submit-category {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 40px;
    border: 1px solid rgba(255, 205, 87, 0.3);
    cursor: pointer;
    font-size: 14px;
    background-color: #DEDBB2;
    transition: background 0.2s, border-color 0.2s;
    margin: 5px; /* равные отступы между карточками */
}

.custom-blog-submit-category:hover {
    background-color: #c9c587;
    border-color: rgba(255, 205, 87, 0.3);
}

.custom-blog-submit-category input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #e8bd58;
}

            /* ===== Редактор WordPress ===== */

/* ===== Верхняя панель редактора ===== */

.custom-blog-submit-wrap .wp-editor-tools {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 10px !important;

    width: 100% !important;
    min-height: 36px;

    margin: 0 0 8px 0 !important;
    padding: 0 !important;

    position: relative !important;
    z-index: 20 !important;
}

/* ===== Контейнер кнопки "Добавить медиафайл" ===== */

.custom-blog-submit-wrap .wp-media-buttons {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    width: auto !important;
    max-width: max-content !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 20 !important;
    box-shadow: none !important;
}

/* ===== Кнопка "Добавить медиафайл" в стиле исходника ===== */

.custom-blog-submit-wrap .wp-media-buttons .button.insert-media,
.custom-blog-submit-wrap .wp-media-buttons button.insert-media,
.custom-blog-submit-wrap #insert-media-button {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: auto !important;
    min-width: auto !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 4px solid #232630 !important;
    border-radius: 12px !important;
    background: var(--custom-blog-button-bg) !important;
    color: #2a2114 !important;
    -webkit-text-fill-color: #2a2114 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0.12px !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    box-shadow: 0 0 0 1px rgba(255, 205, 87, 0.18) !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
}

.custom-blog-submit-wrap .wp-media-buttons .button.insert-media:hover,
.custom-blog-submit-wrap .wp-media-buttons button.insert-media:hover,
.custom-blog-submit-wrap #insert-media-button:hover,
.custom-blog-submit-wrap .wp-media-buttons .button.insert-media:focus,
.custom-blog-submit-wrap .wp-media-buttons button.insert-media:focus,
.custom-blog-submit-wrap #insert-media-button:focus,
.custom-blog-submit-wrap .wp-media-buttons .button.insert-media:active,
.custom-blog-submit-wrap .wp-media-buttons button.insert-media:active,
.custom-blog-submit-wrap #insert-media-button:active {
    background: var(--custom-blog-button-bg) !important;
    color: #2a2114 !important;
    -webkit-text-fill-color: #2a2114 !important;
    border: 4px solid #232630 !important;
    outline: none !important;
    box-shadow: 0 0 0 1px rgba(255, 205, 87, 0.18) !important;
    transform: none !important;
    filter: none !important;
}

.custom-blog-submit-wrap .wp-media-buttons .button.insert-media .wp-media-buttons-icon,
.custom-blog-submit-wrap #insert-media-button .wp-media-buttons-icon {
    color: inherit !important;
    margin: 0 4px 0 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    line-height: 1 !important;
}

/* ===== Переключатель "Редактор / Код" в стиле исходника ===== */

.custom-blog-submit-wrap .wp-editor-tabs {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    width: auto !important;
    max-width: max-content !important;
    margin: 0 0 0 auto !important;
    padding: 4px !important;
    background: #232630 !important;
    border: 1px solid rgba(255, 205, 87, 0.18) !important;
    border-radius: 12px !important;
    float: none !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 20 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02) !important;
}

.custom-blog-submit-wrap .wp-switch-editor {
    flex: 0 0 auto !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: auto !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 13px !important;
    border: 1px solid transparent !important;
    border-radius: 9px !important;
    box-sizing: border-box !important;
    background: transparent !important;
    color: #b9b28d !important;
    -webkit-text-fill-color: #b9b28d !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: 0.2px !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, -webkit-text-fill-color 0.18s ease !important;
}


.custom-blog-submit-wrap .switch-tmce {
    font-size: 0 !important;
}

.custom-blog-submit-wrap .switch-tmce::after {
    content: "Редактор";
    font-size: 14px !important;
    line-height: 1 !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px !important;
}

.custom-blog-submit-wrap .wp-switch-editor:hover,
.custom-blog-submit-wrap .wp-switch-editor:focus {
    background: linear-gradient(rgba(255, 232, 164, 0.06), rgba(226, 161, 61, 0.02)), rgba(217, 151, 50, 0.063) !important;
    border-color: var(--lux-input-border, rgba(220, 180, 82, 0.28)) !important;
    color: #e7dfb4 !important;
    -webkit-text-fill-color: #e7dfb4 !important;
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
}

.custom-blog-submit-wrap .tmce-active .switch-tmce,
.custom-blog-submit-wrap .html-active .switch-html {
    background: var(--custom-blog-button-bg) !important;
    border: 0 !important;
    color: #2a2114 !important;
    -webkit-text-fill-color: #2a2114 !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
}

.custom-blog-submit-wrap .tmce-active .switch-tmce:hover,
.custom-blog-submit-wrap .tmce-active .switch-tmce:focus,
.custom-blog-submit-wrap .html-active .switch-html:hover,
.custom-blog-submit-wrap .html-active .switch-html:focus {
    background: var(--custom-blog-button-bg) !important;
    border: 0 !important;
    color: #2a2114 !important;
    -webkit-text-fill-color: #2a2114 !important;
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
}

.custom-blog-submit-wrap .wp-switch-editor:active,
.custom-blog-submit-wrap .tmce-active .switch-tmce:active,
.custom-blog-submit-wrap .html-active .switch-html:active {
    background: var(--custom-blog-button-bg) !important;
    border: 0 !important;
    color: #2a2114 !important;
    -webkit-text-fill-color: #2a2114 !important;
    outline: none !important;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
}

.custom-blog-submit-wrap .wp-switch-editor.is-switching-gold,
.custom-blog-submit-wrap .wp-switch-editor.is-switching-gold:hover,
.custom-blog-submit-wrap .wp-switch-editor.is-switching-gold:focus,
.custom-blog-submit-wrap .wp-switch-editor.is-switching-gold:active {
    background: var(--custom-blog-button-bg) !important;
    border: 0 !important;
    color: #2a2114 !important;
    -webkit-text-fill-color: #2a2114 !important;
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
}

.custom-blog-submit-wrap .tmce-active .switch-tmce,
.custom-blog-submit-wrap .tmce-active .switch-tmce:hover,
.custom-blog-submit-wrap .tmce-active .switch-tmce:focus,
.custom-blog-submit-wrap .tmce-active .switch-tmce:active,
.custom-blog-submit-wrap .html-active .switch-html,
.custom-blog-submit-wrap .html-active .switch-html:hover,
.custom-blog-submit-wrap .html-active .switch-html:focus,
.custom-blog-submit-wrap .html-active .switch-html:active {
    border: 0 !important;
    outline: none !important;
}

.custom-blog-submit-wrap .mce-statusbar,
.custom-blog-submit-wrap .mce-path,
.custom-blog-submit-wrap .mce-resizehandle,
.custom-blog-submit-wrap .mce-ico.mce-i-resize {
    pointer-events: auto !important;
}

.custom-blog-submit-wrap .mce-resizehandle,
.custom-blog-submit-wrap .mce-ico.mce-i-resize {
    cursor: se-resize !important;
}


.custom-blog-submit-wrap .wp-editor-container {
    clear: both;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 205, 87, 0.3);
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.custom-blog-submit-wrap .wp-editor-wrap.tmce-active .wp-editor-container {
    min-height: var(--custom-blog-editor-height, 320px);
    background: #ffffff;
}

.custom-blog-submit-wrap .wp-editor-wrap.tmce-active .mce-tinymce {
    width: 100% !important;
}

.custom-blog-submit-wrap .wp-editor-wrap.tmce-active .mce-edit-area {
    min-height: var(--custom-blog-editor-height, 320px);
    background: #ffffff;
}

.custom-blog-submit-wrap .wp-editor-wrap.tmce-active .mce-edit-area iframe {
    min-height: var(--custom-blog-editor-height, 320px);
    background: #ffffff;
}


.custom-blog-submit-wrap .mce-tinymce,
.custom-blog-submit-wrap .mce-container,
.custom-blog-submit-wrap .mce-panel {
    max-width: 100%;
    box-shadow: none;
}

.custom-blog-submit-wrap textarea#custom_blog_content.wp-editor-area {
    width: 100%;
    min-height: var(--custom-blog-editor-height, 320px);
    height: var(--custom-blog-editor-height, 320px);
    max-height: none;
    margin: 0;
    padding: 14px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    color: #111111;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    box-shadow: none;
}

.custom-blog-submit-wrap .tmce-active textarea#custom_blog_content.wp-editor-area {
    display: none;
}

.custom-blog-submit-wrap .html-active textarea#custom_blog_content.wp-editor-area {
    display: block;
}


/* Явный цвет текста TinyMCE, чтобы dropdown не наследовал прозрачность/gradient text. */
.custom-blog-submit-wrap .mce-btn .mce-txt,
.custom-blog-submit-wrap .mce-listbox .mce-txt,
.mce-menu .mce-text,
.mce-menu .mce-menu-item .mce-text {
    color: #222222 !important;
    -webkit-text-fill-color: #222222 !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
}

            /* ===== Кнопка публикации ===== */

            .custom-blog-submit-actions {
                display: flex;
                justify-content: flex-end;
                align-items: center;
                margin: 24px 0 0 0;
                padding: 0 4px 0 0;
            }

            .custom-blog-submit-button,
            .custom-blog-submit-button:visited {
                position: relative !important;
                display: inline-flex !important;
                align-items: center !important;
                justify-content: center !important;
                width: fit-content !important;
                max-width: 100% !important;
                min-width: 0 !important;
                height: 40px !important;
                min-height: 40px !important;
                box-sizing: border-box !important;
                padding: 0 22px !important;
                border: 0 !important;
                border-radius: 10px !important;
                background: var(--custom-blog-button-bg) !important;
                color: #2a2114 !important;
                -webkit-text-fill-color: #2a2114 !important;
                font-family: Inter, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
                font-size: 16px !important;
                line-height: 1 !important;
                font-weight: 700 !important;
                letter-spacing: 0.12px !important;
                text-align: center !important;
                text-transform: none !important;
                white-space: nowrap !important;
                cursor: pointer !important;
                box-shadow: none !important;
                transform: none !important;
                filter: none !important;
                text-decoration: none !important;
                transition: color 0.20s ease, -webkit-text-fill-color 0.20s ease, background 0.22s ease, box-shadow 0.24s ease, transform 0.18s cubic-bezier(.16, 1, .3, 1), filter 0.20s ease !important;
            }

            .custom-blog-submit-button:hover,
            .custom-blog-submit-button:focus-visible {
                background: var(--custom-blog-button-hover-bg) !important;
                color: #2a2114 !important;
                -webkit-text-fill-color: #2a2114 !important;
                transform: translateY(-1px) !important;
                filter: brightness(1.026) saturate(1.018) !important;
                box-shadow: 0 0 0 4px rgba(232, 181, 75, 0.090), 0 0 14px rgba(232, 181, 75, 0.105), 0 6px 18px rgba(190, 125, 34, 0.070) !important;
                text-decoration: none !important;
                outline: none !important;
            }

            .custom-blog-submit-button:active {
                background: var(--custom-blog-button-active-bg) !important;
                transform: translateY(0) scale(0.997) !important;
                box-shadow: inset 0 0 0 999px rgba(45, 28, 6, 0.055) !important;
            }

            .custom-blog-submit-button:disabled {
                cursor: wait !important;
                opacity: 0.78;
            }


            .custom-blog-submit-button .spinner {
                display: inline-block;
                width: 16px;
                height: 16px;
                margin-left: 8px;
                border: 2px solid rgba(28, 31, 38, 0.3);
                border-top-color: #1C1F26;
                border-radius: 50%;
                vertical-align: middle;
                animation: customBlogSpin 0.6s linear infinite;
            }

            .custom-blog-submit-button.is-submitting {
                opacity: 0.78;
            }

            @keyframes customBlogSpin {
                to { transform: rotate(360deg); }
            }

            .custom-blog-submit-button i,
            .custom-blog-submit-button svg {
                pointer-events: none;
            }

            @media (max-width: 640px) {
                .custom-blog-submit-header {
                    margin-bottom: 30px;
                }

                .custom-blog-submit-title {
                    font-size: clamp(25px, 7vw, 30px);
                }

                .custom-blog-submit-wrap {
                    width: 100%;
                    padding: 22px 18px 24px;
                    border-radius: 16px;
                }

                .custom-blog-submit-wrap .wp-editor-tools {
                    display: block;
                }

                .custom-blog-submit-wrap .wp-media-buttons {
                    margin-bottom: 8px;
                }

                .custom-blog-submit-wrap .wp-editor-tabs {
    margin-left: auto !important;
    margin-right: 0 !important;
                }

                .custom-blog-submit-category {
                    flex-basis: 100%;
                    max-width: 100%;
                    justify-content: flex-start;
                }

                .custom-blog-submit-category span {
                    white-space: normal;
                }
            }

			/* ===== Редактор WordPress / TinyMCE ===== */

.custom-blog-submit-wrap .wp-editor-wrap {
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 10px;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.custom-blog-submit-wrap .wp-editor-tools {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 10px !important;

    width: 100% !important;
    min-height: 36px;

    margin: 0 0 8px 0 !important;
    padding: 0 !important;

    position: relative !important;
    z-index: 20 !important;
}

.custom-blog-submit-wrap .wp-media-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.custom-blog-submit-wrap .wp-editor-container {
    clear: both;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 205, 87, 0.3);
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
}

.custom-blog-submit-wrap .mce-tinymce,
.custom-blog-submit-wrap .mce-container,
.custom-blog-submit-wrap .mce-panel {
    max-width: 100%;
    box-shadow: none;
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
}

.custom-blog-submit-wrap .mce-edit-area {
    min-height: var(--custom-blog-editor-height, 320px);
    background: #ffffff !important;
    position: relative !important;
    z-index: 10 !important;
    pointer-events: auto !important;
}

.custom-blog-submit-wrap .mce-edit-area iframe,
#custom_blog_content_ifr {
    display: block !important;
    width: 100% !important;
    min-height: var(--custom-blog-editor-height, 320px);
    background: #ffffff !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
    pointer-events: auto !important;
}

/* Режим "Код" */
.custom-blog-submit-wrap textarea#custom_blog_content.wp-editor-area {
    width: 100%;
    min-height: var(--custom-blog-editor-height, 320px);
    height: var(--custom-blog-editor-height, 320px);
    max-height: none;
    margin: 0;
    padding: 14px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    color: #111111;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    box-shadow: none;
}

/* Когда активен TinyMCE — обычный textarea скрыт */
.custom-blog-submit-wrap .tmce-active textarea#custom_blog_content.wp-editor-area {
    display: none;
}

/* Когда активен режим "Код" — textarea показан */
.custom-blog-submit-wrap .html-active textarea#custom_blog_content.wp-editor-area {
    display: block;
}

/* ===== Полностью убираем кнопку Super Duper Shortcode ===== */

.custom-blog-submit-wrap .sd-lable-shortcode-inserter,
.custom-blog-submit-wrap span.sd-lable-shortcode-inserter,
.custom-blog-submit-wrap .wp-media-buttons .sd-lable-shortcode-inserter,
.custom-blog-submit-wrap .wp-media-buttons span.sd-lable-shortcode-inserter,
.custom-blog-submit-wrap .super-duper-content-open,
.custom-blog-submit-wrap a.super-duper-content-open,
.custom-blog-submit-wrap a.thickbox.button.super-duper-content-open,
.custom-blog-submit-wrap a[href*="super-duper-content-ajaxed"],
.custom-blog-submit-wrap #super-duper-content-ajaxed {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;

    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;

    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}


@media (max-width: 760px) {
    .custom-blog-submit-page.ra-bg-deep {
        --custom-blog-section-y: 46px;
        --ra-side-padding: 16px;
    }
}


/* ============================================================
   Финальная полировка: toast, inline image spinner, TinyMCE toolbar
   ============================================================ */
.custom-blog-submit-wrap .custom-blog-inline-media-source[hidden] {
    display: none !important;
}

.custom-blog-submit-wrap .custom-blog-inline-image-button:disabled,
.custom-blog-submit-wrap .custom-blog-inline-image-button.is-uploading {
    opacity: 1 !important;
    cursor: wait !important;
    pointer-events: none !important;
}

.custom-blog-submit-wrap .custom-blog-inline-image-button .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 7px;
    border: 2px solid rgba(42, 33, 20, 0.28);
    border-top-color: #2a2114;
    border-radius: 50%;
    vertical-align: middle;
    animation: customBlogSpin 0.6s linear infinite;
}

.custom-blog-submit-page > .custom-blog-submit-message {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    z-index: 2147483000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: max-content !important;
    max-width: calc(100vw - 32px) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 14px 16px !important;
    border: 1px solid rgba(62, 201, 114, 0.35) !important;
    border-radius: 16px !important;
    background: rgba(16, 25, 19, 0.94) !important;
    color: #d8f8df !important;
    box-shadow: none !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(12px) !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease !important;
}

.custom-blog-submit-page > .custom-blog-submit-message.is-show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.custom-blog-submit-page > .custom-blog-submit-message.is-hiding {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(12px) !important;
    pointer-events: none !important;
}

.custom-blog-submit-page > .custom-blog-submit-message::before {
    content: "✓";
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 24px !important;
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    border-radius: 50% !important;
    background: rgba(62, 201, 114, 0.18) !important;
    color: #7af08c !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    align-self: center !important;
}

.custom-blog-submit-page > .custom-blog-submit-message.custom-blog-submit-error {
    border-color: rgba(255, 107, 107, 0.38) !important;
    background: rgba(35, 15, 18, 0.95) !important;
    color: #ffd4d4 !important;
}

.custom-blog-submit-page > .custom-blog-submit-message.custom-blog-submit-error::before {
    content: "✕" !important;
    background: rgba(255, 107, 107, 0.16) !important;
    color: #ff8a8a !important;
}

.custom-blog-submit-page > .custom-blog-submit-message .custom-blog-toast-text {
    display: block !important;
    min-width: 0 !important;
}

.custom-blog-submit-page > .custom-blog-submit-message .custom-blog-toast-line {
    display: block !important;
    white-space: nowrap !important;
}

.custom-blog-submit-page > .custom-blog-submit-message a,
.custom-blog-submit-page > .custom-blog-submit-message a:visited {
    color: #e1b759 !important;
    -webkit-text-fill-color: #e1b759 !important;
    text-decoration: none !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    transition: color 0.18s ease, -webkit-text-fill-color 0.18s ease !important;
}

.custom-blog-submit-page > .custom-blog-submit-message a:hover,
.custom-blog-submit-page > .custom-blog-submit-message a:focus-visible {
    color: #f0d985 !important;
    -webkit-text-fill-color: #f0d985 !important;
    text-decoration: none !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.custom-blog-submit-wrap .mce-toolbar .mce-btn:hover button,
.custom-blog-submit-wrap .mce-toolbar .mce-btn:focus button,
.custom-blog-submit-wrap .mce-toolbar .mce-btn.mce-active button,
.custom-blog-submit-wrap .mce-toolbar .mce-btn.mce-active:hover button,
.custom-blog-submit-wrap .mce-toolbar .mce-btn.mce-active:focus button {
    background: #ffa70066 !important;
    border-radius: 5px !important;
    box-shadow: none !important;
}

/* ============================================================
   v1.0.283–v1.0.284 — Помощник редактора и менеджер шаблонов
   ============================================================ */
.custom-blog-editor-assistant {
    margin: 0 0 24px;
    padding: 18px;
    border: 1px solid rgba(220, 180, 82, 0.28);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.006)),
        rgba(24, 33, 49, 0.96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.custom-blog-editor-assistant__intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 0.55fr);
    gap: 18px;
    align-items: start;
}

.custom-blog-editor-assistant__eyebrow {
    display: block;
    margin-bottom: 4px;
    color: rgba(232, 189, 88, 0.82);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.custom-blog-editor-assistant__title {
    margin: 0 0 7px;
    color: #f0e9c2;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.custom-blog-editor-assistant__description {
    margin: 0;
    color: rgba(231, 225, 190, 0.76);
    font-size: 14px;
    line-height: 1.55;
}

.custom-blog-editor-assistant__guide {
    border: 1px solid rgba(220, 180, 82, 0.2);
    border-radius: 10px;
    background: rgba(15, 22, 35, 0.48);
}

.custom-blog-editor-assistant__guide summary {
    padding: 11px 13px;
    color: #ded8b4;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.custom-blog-editor-assistant__guide-body {
    padding: 0 13px 13px;
    color: rgba(231, 225, 190, 0.73);
    font-size: 13px;
    line-height: 1.5;
}

.custom-blog-editor-assistant__guide-body ul {
    margin: 0;
    padding-left: 19px;
}

.custom-blog-editor-assistant__guide-body li + li {
    margin-top: 5px;
}

.custom-blog-editor-assistant__guide-body code {
    color: #f0d98a;
    background: rgba(0, 0, 0, 0.2);
}

.custom-blog-editor-assistant__controls {
    display: grid;
    grid-template-columns: minmax(210px, 0.7fr) minmax(0, 1.3fr);
    gap: 9px 14px;
    align-items: end;
    margin-top: 18px;
}

.custom-blog-editor-assistant__controls > label {
    grid-column: 1 / -1;
    margin: 0;
    color: #ded8b4;
    font-size: 14px;
    font-weight: 600;
}

.custom-blog-editor-assistant__controls select {
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 9px 34px 9px 12px;
    border: 1px solid rgba(220, 180, 82, 0.32);
    border-radius: 9px;
    background: #171f2e;
    color: #eee8c5;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.custom-blog-editor-assistant__controls select:focus-visible {
    border-color: rgba(232, 189, 88, 0.72);
    box-shadow: 0 0 0 3px rgba(232, 189, 88, 0.12);
}

.custom-blog-editor-assistant__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
}

.custom-blog-editor-assistant__button {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid rgba(232, 189, 88, 0.32);
    border-radius: 9px;
    background: var(--custom-blog-button-bg);
    color: #2a2114;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.custom-blog-editor-assistant__button--secondary {
    background: rgba(222, 219, 178, 0.07);
    color: #e7e1be;
}

.custom-blog-editor-assistant__button:hover,
.custom-blog-editor-assistant__button:focus-visible {
    filter: brightness(1.035);
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 189, 88, 0.1);
}

.custom-blog-editor-assistant__button:disabled {
    opacity: 0.44;
    cursor: not-allowed;
    filter: none;
    box-shadow: none;
}

.custom-blog-editor-assistant__template-preview {
    margin-top: 14px;
    padding: 14px 15px;
    border: 1px solid rgba(220, 180, 82, 0.2);
    border-radius: 11px;
    background:
        linear-gradient(135deg, rgba(232, 189, 88, 0.055), transparent 62%),
        rgba(8, 13, 22, 0.34);
}

.custom-blog-editor-assistant__template-preview-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}

.custom-blog-editor-assistant__template-label {
    color: rgba(232, 189, 88, 0.78);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.custom-blog-editor-assistant__template-kind {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border: 1px solid rgba(232, 189, 88, 0.2);
    border-radius: 999px;
    background: rgba(232, 189, 88, 0.08);
    color: #e8cf83;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.custom-blog-editor-assistant__template-kind[data-has-template="0"] {
    border-color: rgba(215, 218, 195, 0.16);
    background: rgba(215, 218, 195, 0.055);
    color: rgba(231, 225, 190, 0.68);
}

.custom-blog-editor-assistant__template-title {
    margin: 0 0 5px;
    color: #f0e9c2;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.custom-blog-editor-assistant__template-description {
    margin: 0;
    color: rgba(231, 225, 190, 0.76);
    font-size: 13px;
    line-height: 1.55;
}


.custom-blog-editor-assistant__results {
    margin-top: 12px;
    padding: 12px 13px;
    border: 1px solid rgba(220, 180, 82, 0.18);
    border-radius: 10px;
    background: rgba(8, 13, 22, 0.34);
}

.custom-blog-editor-assistant__checklist {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.custom-blog-editor-assistant__check {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 7px;
    align-items: start;
    color: rgba(235, 229, 197, 0.8);
    font-size: 13px;
    line-height: 1.4;
}

.custom-blog-editor-assistant__check-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
}

.custom-blog-editor-assistant__check--ok .custom-blog-editor-assistant__check-mark {
    background: rgba(111, 169, 97, 0.18);
    color: #b9d8a8;
}

.custom-blog-editor-assistant__check--warning .custom-blog-editor-assistant__check-mark {
    background: rgba(232, 189, 88, 0.16);
    color: #e9c879;
}

.custom-blog-editor-assistant__check--error .custom-blog-editor-assistant__check-mark {
    background: rgba(214, 91, 79, 0.17);
    color: #f0a59b;
}

@media (max-width: 760px) {
    .custom-blog-editor-assistant__intro,
    .custom-blog-editor-assistant__controls {
        grid-template-columns: 1fr;
    }

    .custom-blog-editor-assistant__actions,
    .custom-blog-editor-assistant__button {
        width: 100%;
    }
}

