/**
 * Authoritative TinyMCE UI — text-checker, fullscreen, checkout, ugc.
 * Load last in footer.
 */

/* ── Page layout (text-checker only) ── */
html body.page-template-page-text-checker #main.site-main,
html body.page-template-page-text-checker-php #main.site-main {
    padding-top: 24px !important;
}

html body.page-template-page-text-checker .text-checker-container,
html body.page-template-page-text-checker-php .text-checker-container {
    gap: 6px !important;
}

html body.page-template-page-text-checker header.text-checker-header,
html body.page-template-page-text-checker-php header.text-checker-header {
    margin: 0 0 4px !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

html body.page-template-page-text-checker .text-checker-title,
html body.page-template-page-text-checker-php .text-checker-title {
    margin-top: 0 !important;
    margin-bottom: 4px !important;
}

html body.page-template-page-text-checker .text-checker-editor-wrapper #wp-ugc_content-wrap.wp-editor-wrap,
html body.page-template-page-text-checker-php .text-checker-editor-wrapper #wp-ugc_content-wrap.wp-editor-wrap,
html body.page-template-page-text-checker .text-checker-editor-wrapper .wp-editor-wrap,
html body.page-template-page-text-checker-php .text-checker-editor-wrapper .wp-editor-wrap {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Char counter below editor */
html body.page-template-page-text-checker .text-checker-char-counter,
html body.page-template-page-text-checker-php .text-checker-char-counter {
    border-top: 1px solid rgba(16, 24, 40, 0.06) !important;
    border-bottom: 0 !important;
    background: #fff !important;
}

/* Hide element path */
html body .text-checker-editor-wrapper .mce-statusbar .mce-path,
html body .mce-tinymce.mce-fullscreen .mce-statusbar .mce-path {
    display: none !important;
}

html body .text-checker-editor-wrapper .mce-statusbar,
html body .mce-tinymce.mce-fullscreen .mce-statusbar {
    min-height: 0 !important;
    border-top: 0 !important;
    background: transparent !important;
}

/* ── Shared editor scopes ── */
html body .text-checker-editor-wrapper .mce-tinymce,
html body .mce-tinymce.mce-fullscreen,
html body.woocommerce-checkout #wp-ugc_content-wrap .mce-tinymce,
html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-tinymce,
html body[class*="ugc"] #wp-ugc_content-wrap .mce-tinymce,
html body .ugc-edit-form #wp-ugc_content-wrap .mce-tinymce,
html body .ugc-publisher #wp-ugc_content-wrap .mce-tinymce,
html body .ugc-post-edit-form #wp-ugc_content-wrap .mce-tinymce {
    --n9-tc-btn-bg: rgba(16, 24, 40, 0.04);
    --n9-tc-btn-hover-bg: rgba(16, 24, 40, 0.08);
    --n9-tc-btn-icon: #475467;
    --n9-tc-btn-icon-hover: #344054;
    --n9-tc-btn-active-bg: #344054;
    --n9-tc-btn-active-icon: #f3f4f6;
}

/* Toolbar shell */
html body .text-checker-editor-wrapper .mce-toolbar-grp,
html body .mce-tinymce.mce-fullscreen .mce-toolbar-grp,
html body.woocommerce-checkout .mce-toolbar-grp,
html body[class*="ugc"] .mce-toolbar-grp,
html body .ugc-edit-form .mce-toolbar-grp,
html body .ugc-publisher .mce-toolbar-grp,
html body .ugc-post-edit-form .mce-toolbar-grp {
    border-bottom: 1px solid rgba(16, 24, 40, 0.06) !important;
    background: #f9fafb !important;
    box-shadow: none !important;
}

/* No group separators */
html body .text-checker-editor-wrapper .mce-flow-layout-item,
html body .text-checker-editor-wrapper .mce-btn-group,
html body .mce-tinymce.mce-fullscreen .mce-flow-layout-item,
html body .mce-tinymce.mce-fullscreen .mce-btn-group,
html body.woocommerce-checkout .mce-flow-layout-item,
html body.woocommerce-checkout .mce-btn-group,
html body[class*="ugc"] .mce-flow-layout-item,
html body[class*="ugc"] .mce-btn-group,
html body .ugc-edit-form .mce-flow-layout-item,
html body .ugc-edit-form .mce-btn-group {
    border: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
    margin-right: 2px !important;
    padding-right: 0 !important;
}

/* Icon buttons — neutral hover, inverted active */
html body .text-checker-editor-wrapper .mce-btn,
html body .mce-tinymce.mce-fullscreen .mce-btn,
html body.woocommerce-checkout .mce-btn,
html body[class*="ugc"] .mce-btn,
html body .ugc-edit-form .mce-btn,
html body .ugc-publisher .mce-btn,
html body .ugc-post-edit-form .mce-btn {
    border: 0 !important;
    background: var(--n9-tc-btn-bg, rgba(16, 24, 40, 0.04)) !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    color: var(--n9-tc-btn-icon, #475467) !important;
}

html body .text-checker-editor-wrapper .mce-btn button,
html body .text-checker-editor-wrapper .mce-btn i,
html body .mce-tinymce.mce-fullscreen .mce-btn button,
html body .mce-tinymce.mce-fullscreen .mce-btn i,
html body.woocommerce-checkout .mce-btn button,
html body.woocommerce-checkout .mce-btn i,
html body[class*="ugc"] .mce-btn button,
html body[class*="ugc"] .mce-btn i,
html body .ugc-edit-form .mce-btn button,
html body .ugc-edit-form .mce-btn i {
    color: var(--n9-tc-btn-icon, #475467) !important;
}

html body .text-checker-editor-wrapper .mce-btn:hover:not(.mce-active):not(.mce-listbox),
html body .mce-tinymce.mce-fullscreen .mce-btn:hover:not(.mce-active):not(.mce-listbox),
html body.woocommerce-checkout .mce-btn:hover:not(.mce-active):not(.mce-listbox),
html body[class*="ugc"] .mce-btn:hover:not(.mce-active):not(.mce-listbox),
html body .ugc-edit-form .mce-btn:hover:not(.mce-active):not(.mce-listbox),
html body .ugc-publisher .mce-btn:hover:not(.mce-active):not(.mce-listbox),
html body .ugc-post-edit-form .mce-btn:hover:not(.mce-active):not(.mce-listbox) {
    background: var(--n9-tc-btn-hover-bg, rgba(16, 24, 40, 0.08)) !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--n9-tc-btn-icon-hover, #344054) !important;
}

html body .text-checker-editor-wrapper .mce-btn:hover:not(.mce-active):not(.mce-listbox) button,
html body .text-checker-editor-wrapper .mce-btn:hover:not(.mce-active):not(.mce-listbox) i,
html body .mce-tinymce.mce-fullscreen .mce-btn:hover:not(.mce-active):not(.mce-listbox) button,
html body .mce-tinymce.mce-fullscreen .mce-btn:hover:not(.mce-active):not(.mce-listbox) i,
html body.woocommerce-checkout .mce-btn:hover:not(.mce-active):not(.mce-listbox) button,
html body.woocommerce-checkout .mce-btn:hover:not(.mce-active):not(.mce-listbox) i,
html body[class*="ugc"] .mce-btn:hover:not(.mce-active):not(.mce-listbox) button,
html body[class*="ugc"] .mce-btn:hover:not(.mce-active):not(.mce-listbox) i,
html body .ugc-edit-form .mce-btn:hover:not(.mce-active):not(.mce-listbox) button,
html body .ugc-edit-form .mce-btn:hover:not(.mce-active):not(.mce-listbox) i {
    color: var(--n9-tc-btn-icon-hover, #344054) !important;
}

html body .text-checker-editor-wrapper .mce-btn.mce-active:not(.mce-listbox),
html body .text-checker-editor-wrapper .mce-btn.mce-active:not(.mce-listbox):hover,
html body .mce-tinymce.mce-fullscreen .mce-btn.mce-active:not(.mce-listbox),
html body .mce-tinymce.mce-fullscreen .mce-btn.mce-active:not(.mce-listbox):hover,
html body.woocommerce-checkout .mce-btn.mce-active:not(.mce-listbox),
html body.woocommerce-checkout .mce-btn.mce-active:not(.mce-listbox):hover,
html body[class*="ugc"] .mce-btn.mce-active:not(.mce-listbox),
html body[class*="ugc"] .mce-btn.mce-active:not(.mce-listbox):hover,
html body .ugc-edit-form .mce-btn.mce-active:not(.mce-listbox),
html body .ugc-edit-form .mce-btn.mce-active:not(.mce-listbox):hover,
html body .ugc-publisher .mce-btn.mce-active:not(.mce-listbox),
html body .ugc-post-edit-form .mce-btn.mce-active:not(.mce-listbox) {
    background: var(--n9-tc-btn-active-bg, #344054) !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--n9-tc-btn-active-icon, #f3f4f6) !important;
}

html body .text-checker-editor-wrapper .mce-btn.mce-active:not(.mce-listbox) button,
html body .text-checker-editor-wrapper .mce-btn.mce-active:not(.mce-listbox) i,
html body .text-checker-editor-wrapper .mce-btn.mce-active:not(.mce-listbox):hover button,
html body .text-checker-editor-wrapper .mce-btn.mce-active:not(.mce-listbox):hover i,
html body .mce-tinymce.mce-fullscreen .mce-btn.mce-active:not(.mce-listbox) button,
html body .mce-tinymce.mce-fullscreen .mce-btn.mce-active:not(.mce-listbox) i,
html body.woocommerce-checkout .mce-btn.mce-active:not(.mce-listbox) button,
html body.woocommerce-checkout .mce-btn.mce-active:not(.mce-listbox) i,
html body[class*="ugc"] .mce-btn.mce-active:not(.mce-listbox) button,
html body[class*="ugc"] .mce-btn.mce-active:not(.mce-listbox) i,
html body .ugc-edit-form .mce-btn.mce-active:not(.mce-listbox) button,
html body .ugc-edit-form .mce-btn.mce-active:not(.mce-listbox) i {
    color: var(--n9-tc-btn-active-icon, #f3f4f6) !important;
}

/* Heading selector — never use inverted icon-button active styles */
html body.page-template-page-text-checker .text-checker-editor-wrapper .mce-listbox,
html body.page-template-page-text-checker-php .text-checker-editor-wrapper .mce-listbox,
html body .text-checker-editor-wrapper .mce-listbox,
html body .mce-tinymce.mce-fullscreen .mce-listbox,
html body.woocommerce-checkout .mce-listbox,
html body[class*="ugc"] .mce-listbox,
html body .ugc-edit-form .mce-listbox {
    position: relative !important;
    border: 0 !important;
    background: var(--n9-tc-btn-bg, rgba(16, 24, 40, 0.04)) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    min-width: 132px !important;
}

html body .text-checker-editor-wrapper .mce-listbox button,
html body .mce-tinymce.mce-fullscreen .mce-listbox button,
html body.woocommerce-checkout .mce-listbox button,
html body[class*="ugc"] .mce-listbox button,
html body .ugc-edit-form .mce-listbox button {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #475467 !important;
    padding: 5px 22px 5px 8px !important;
    text-align: left !important;
}

html body .text-checker-editor-wrapper .mce-listbox .mce-txt,
html body .mce-tinymce.mce-fullscreen .mce-listbox .mce-txt,
html body.woocommerce-checkout .mce-listbox .mce-txt,
html body[class*="ugc"] .mce-listbox .mce-txt,
html body .ugc-edit-form .mce-listbox .mce-txt {
    color: #475467 !important;
}

html body .text-checker-editor-wrapper .mce-listbox .mce-caret,
html body .mce-tinymce.mce-fullscreen .mce-listbox .mce-caret,
html body.woocommerce-checkout .mce-listbox .mce-caret,
html body[class*="ugc"] .mce-listbox .mce-caret,
html body .ugc-edit-form .mce-listbox .mce-caret {
    position: absolute !important;
    right: 6px !important;
    top: 50% !important;
    margin-top: -2px !important;
    border-top-color: #475467 !important;
}

html body .text-checker-editor-wrapper .mce-listbox:hover,
html body .mce-tinymce.mce-fullscreen .mce-listbox:hover,
html body.woocommerce-checkout .mce-listbox:hover,
html body[class*="ugc"] .mce-listbox:hover,
html body .ugc-edit-form .mce-listbox:hover {
    background: var(--n9-tc-btn-hover-bg, rgba(16, 24, 40, 0.08)) !important;
    border: 0 !important;
}

html body.page-template-page-text-checker .text-checker-editor-wrapper .mce-listbox.mce-active,
html body.page-template-page-text-checker-php .text-checker-editor-wrapper .mce-listbox.mce-active,
html body.page-template-page-text-checker .text-checker-editor-wrapper .mce-listbox.mce-active:hover,
html body.page-template-page-text-checker-php .text-checker-editor-wrapper .mce-listbox.mce-active:hover,
html body .text-checker-editor-wrapper .mce-listbox.mce-active,
html body .mce-tinymce.mce-fullscreen .mce-listbox.mce-active,
html body.woocommerce-checkout .mce-listbox.mce-active,
html body[class*="ugc"] .mce-listbox.mce-active,
html body .ugc-edit-form .mce-listbox.mce-active {
    background: rgba(16, 24, 40, 0.08) !important;
    border: 0 !important;
    color: #475467 !important;
}

html body.page-template-page-text-checker .text-checker-editor-wrapper .mce-listbox.mce-active button,
html body.page-template-page-text-checker-php .text-checker-editor-wrapper .mce-listbox.mce-active button,
html body.page-template-page-text-checker .text-checker-editor-wrapper .mce-listbox.mce-active .mce-txt,
html body.page-template-page-text-checker-php .text-checker-editor-wrapper .mce-listbox.mce-active .mce-txt,
html body.page-template-page-text-checker .text-checker-editor-wrapper .mce-listbox.mce-active:hover button,
html body.page-template-page-text-checker-php .text-checker-editor-wrapper .mce-listbox.mce-active:hover button,
html body.page-template-page-text-checker .text-checker-editor-wrapper .mce-listbox.mce-active:hover .mce-txt,
html body.page-template-page-text-checker-php .text-checker-editor-wrapper .mce-listbox.mce-active:hover .mce-txt,
html body .text-checker-editor-wrapper .mce-listbox.mce-active button,
html body .text-checker-editor-wrapper .mce-listbox.mce-active .mce-txt,
html body .mce-tinymce.mce-fullscreen .mce-listbox.mce-active button,
html body .mce-tinymce.mce-fullscreen .mce-listbox.mce-active .mce-txt,
html body.woocommerce-checkout .mce-listbox.mce-active button,
html body.woocommerce-checkout .mce-listbox.mce-active .mce-txt,
html body[class*="ugc"] .mce-listbox.mce-active button,
html body[class*="ugc"] .mce-listbox.mce-active .mce-txt,
html body .ugc-edit-form .mce-listbox.mce-active button,
html body .ugc-edit-form .mce-listbox.mce-active .mce-txt {
    color: #475467 !important;
}

html body.page-template-page-text-checker .text-checker-editor-wrapper .mce-listbox.mce-active:hover button,
html body.page-template-page-text-checker-php .text-checker-editor-wrapper .mce-listbox.mce-active:hover button,
html body.page-template-page-text-checker .text-checker-editor-wrapper .mce-listbox.mce-active:hover .mce-txt,
html body.page-template-page-text-checker-php .text-checker-editor-wrapper .mce-listbox.mce-active:hover .mce-txt,
html body .text-checker-editor-wrapper .mce-listbox.mce-active:hover button,
html body .text-checker-editor-wrapper .mce-listbox.mce-active:hover .mce-txt,
html body .mce-tinymce.mce-fullscreen .mce-listbox.mce-active:hover button,
html body .mce-tinymce.mce-fullscreen .mce-listbox.mce-active:hover .mce-txt {
    color: #344054 !important;
}

/* Neutral hover — beats any accent/orange overrides in style.css */
html body.page-template-page-text-checker .text-checker-editor-wrapper .mce-btn:hover:not(.mce-active):not(.mce-listbox),
html body.page-template-page-text-checker-php .text-checker-editor-wrapper .mce-btn:hover:not(.mce-active):not(.mce-listbox),
html body.page-template-page-text-checker .mce-btn:hover:not(.mce-active):not(.mce-listbox),
html body.page-template-page-text-checker-php .mce-btn:hover:not(.mce-active):not(.mce-listbox),
html body .text-checker-editor-wrapper .mce-btn:hover:not(.mce-active):not(.mce-listbox),
html body .mce-tinymce.mce-fullscreen .mce-btn:hover:not(.mce-active):not(.mce-listbox),
html body.woocommerce-checkout .mce-btn:hover:not(.mce-active):not(.mce-listbox),
html body[class*="ugc"] .mce-btn:hover:not(.mce-active):not(.mce-listbox) {
    background: rgba(16, 24, 40, 0.08) !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #344054 !important;
}

html body.page-template-page-text-checker .text-checker-editor-wrapper .mce-btn:hover:not(.mce-active):not(.mce-listbox) button,
html body.page-template-page-text-checker-php .text-checker-editor-wrapper .mce-btn:hover:not(.mce-active):not(.mce-listbox) button,
html body.page-template-page-text-checker .text-checker-editor-wrapper .mce-btn:hover:not(.mce-active):not(.mce-listbox) i,
html body.page-template-page-text-checker-php .text-checker-editor-wrapper .mce-btn:hover:not(.mce-active):not(.mce-listbox) i,
html body .text-checker-editor-wrapper .mce-btn:hover:not(.mce-active) button,
html body .text-checker-editor-wrapper .mce-btn:hover:not(.mce-active) i,
html body .mce-tinymce.mce-fullscreen .mce-btn:hover:not(.mce-active) button,
html body .mce-tinymce.mce-fullscreen .mce-btn:hover:not(.mce-active) i {
    color: #344054 !important;
}

html body .text-checker-editor-wrapper .mce-btn:focus-visible,
html body .mce-tinymce.mce-fullscreen .mce-btn:focus-visible,
html body.woocommerce-checkout .mce-btn:focus-visible,
html body[class*="ugc"] .mce-btn:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.45) !important;
    outline-offset: 2px !important;
}

/* Fullscreen toolbar layout */
html body .mce-tinymce.mce-fullscreen .mce-toolbar-grp {
    padding: 8px 12px !important;
}

html body .mce-tinymce.mce-fullscreen .mce-top-part {
    background: #f9fafb !important;
    border-bottom: 1px solid rgba(16, 24, 40, 0.06) !important;
    box-shadow: none !important;
}

/* Panel + misc */
html body.page-template-page-text-checker .kitchor-text-checker-panel,
html body.page-template-page-text-checker-php .kitchor-text-checker-panel {
    border-color: rgba(16, 24, 40, 0.08) !important;
    box-shadow: 0 14px 36px rgba(16, 24, 40, 0.04) !important;
}

html body.page-template-page-text-checker .kitchor-text-checker-panel__header,
html body.page-template-page-text-checker-php .kitchor-text-checker-panel__header {
    background: #f9fafb !important;
    border-bottom: 1px solid rgba(16, 24, 40, 0.06) !important;
}

html body.page-template-page-text-checker .kitchor-text-checker-panel__controls,
html body.page-template-page-text-checker-php .kitchor-text-checker-panel__controls {
    border-bottom: 1px solid rgba(16, 24, 40, 0.06) !important;
    background: #fff !important;
}

html body.page-template-page-text-checker .kitchor-text-checker-panel__action,
html body.page-template-page-text-checker-php .kitchor-text-checker-panel__action,
html body.woocommerce-checkout .kitchor-text-checker-panel__action,
html body .ugc-edit-container .kitchor-text-checker-panel__action {
    border-color: rgba(16, 24, 40, 0.08) !important;
    background: #fff !important;
    color: #475467 !important;
}

html body.page-template-page-text-checker .kitchor-text-checker-panel__action:hover,
html body.page-template-page-text-checker-php .kitchor-text-checker-panel__action:hover,
html body.woocommerce-checkout .kitchor-text-checker-panel__action:hover,
html body .ugc-edit-container .kitchor-text-checker-panel__action:hover {
    border-color: rgba(16, 24, 40, 0.14) !important;
    background: #f3f4f6 !important;
    color: #111827 !important;
}

html body.page-template-page-text-checker .kitchor-text-checker-category__header,
html body.page-template-page-text-checker-php .kitchor-text-checker-category__header,
html body .kitchor-text-checker-category__header {
    border-bottom: 1px solid rgba(16, 24, 40, 0.05) !important;
}

html body.page-template-page-text-checker .kitchor-text-checker-category__header:hover,
html body.page-template-page-text-checker-php .kitchor-text-checker-category__header:hover,
html body .kitchor-text-checker-category__header:hover {
    background: #f3f4f6 !important;
}

html body.page-template-page-text-checker .text-checker-result-errors-wrapper .kitchor-text-checker-error:hover,
html body.page-template-page-text-checker-php .text-checker-result-errors-wrapper .kitchor-text-checker-error:hover,
html body .text-checker-result-errors-wrapper .kitchor-text-checker-error:hover {
    background-color: #f3f4f6 !important;
}

html body.page-template-page-text-checker .text-checker-new-check-btn:hover,
html body.page-template-page-text-checker-php .text-checker-new-check-btn:hover {
    background-color: color-mix(in srgb, var(--e-global-color-primary, #F7A984) 14%, #ffffff 86%) !important;
    color: #172033 !important;
    border-color: var(--e-global-color-primary, #F7A984) !important;
    box-shadow: 0 10px 26px rgba(247, 169, 132, 0.16) !important;
    transform: none !important;
}

/* Unified shell + mobile authority */
html body.page-template-page-text-checker .text-checker-editor-wrapper,
html body.page-template-page-text-checker-php .text-checker-editor-wrapper,
html body.page-template-page-text-checker .text-checker-results-container,
html body.page-template-page-text-checker-php .text-checker-results-container,
html body.woocommerce-checkout #wp-custom_field_4-wrap.wp-editor-wrap,
html body[class*="ugc"] #wp-ugc_content-wrap.wp-editor-wrap,
html body .ugc-edit-form #wp-ugc_content-wrap.wp-editor-wrap,
html body .ugc-post-edit-form #wp-ugc_content-wrap.wp-editor-wrap,
html body .ugc-publisher #wp-ugc_content-wrap.wp-editor-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

html body .text-checker-editor-wrapper .wp-editor-wrap,
html body .text-checker-editor-wrapper .wp-editor-container,
html body .text-checker-editor-wrapper .mce-tinymce,
html body.woocommerce-checkout #wp-custom_field_4-wrap.wp-editor-wrap,
html body.woocommerce-checkout #wp-custom_field_4-wrap .wp-editor-container,
html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-tinymce,
html body[class*="ugc"] #wp-ugc_content-wrap.wp-editor-wrap,
html body[class*="ugc"] #wp-ugc_content-wrap .wp-editor-container,
html body[class*="ugc"] #wp-ugc_content-wrap .mce-tinymce {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
}

html body .text-checker-editor-wrapper .wp-editor-wrap,
html body.woocommerce-checkout #wp-custom_field_4-wrap.wp-editor-wrap,
html body[class*="ugc"] #wp-ugc_content-wrap.wp-editor-wrap {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html body .text-checker-editor-wrapper .wp-editor-container,
html body .text-checker-editor-wrapper .mce-tinymce,
html body.woocommerce-checkout #wp-custom_field_4-wrap .wp-editor-container,
html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-tinymce,
html body[class*="ugc"] #wp-ugc_content-wrap .wp-editor-container,
html body[class*="ugc"] #wp-ugc_content-wrap .mce-tinymce {
    border: 1px solid rgba(16, 24, 40, 0.08) !important;
    background: #fff !important;
    box-shadow: 0 14px 36px rgba(16, 24, 40, 0.04) !important;
}

html body .text-checker-editor-wrapper .mce-container-body,
html body .text-checker-editor-wrapper .mce-edit-area,
html body .text-checker-editor-wrapper .mce-edit-area iframe,
html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-container-body,
html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-edit-area,
html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-edit-area iframe,
html body[class*="ugc"] #wp-ugc_content-wrap .mce-container-body,
html body[class*="ugc"] #wp-ugc_content-wrap .mce-edit-area,
html body[class*="ugc"] #wp-ugc_content-wrap .mce-edit-area iframe {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

html body .text-checker-editor-wrapper .mce-edit-area,
html body .text-checker-editor-wrapper .mce-edit-area iframe,
html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-edit-area,
html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-edit-area iframe,
html body[class*="ugc"] #wp-ugc_content-wrap .mce-edit-area,
html body[class*="ugc"] #wp-ugc_content-wrap .mce-edit-area iframe {
    min-height: clamp(260px, 46vh, 560px) !important;
}

html body .mce-floatpanel {
    max-width: min(360px, calc(100vw - 16px)) !important;
    z-index: 100001 !important;
}

html body .mce-floatpanel .mce-menu-item {
    white-space: normal !important;
}

@media (max-width: 767px) {
    html body.page-template-page-text-checker #main.site-main,
    html body.page-template-page-text-checker-php #main.site-main {
        width: calc(100vw - 30px) !important;
        max-width: calc(100vw - 30px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 16px 0 44px !important;
        box-sizing: border-box !important;
    }

    html body.page-template-page-text-checker .text-checker-container,
    html body.page-template-page-text-checker-php .text-checker-container,
    html body .text-checker-editor-wrapper,
    html body .text-checker-results-container,
    html body.woocommerce-checkout #wp-custom_field_4-wrap.wp-editor-wrap,
    html body[class*="ugc"] #wp-ugc_content-wrap.wp-editor-wrap {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    html body .text-checker-editor-wrapper .mce-toolbar-grp,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-toolbar-grp,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-toolbar-grp {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 54px !important;
        height: auto !important;
        overflow: visible !important;
        padding: 7px !important;
    }

    html body .text-checker-editor-wrapper .mce-toolbar-grp::-webkit-scrollbar,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-toolbar-grp::-webkit-scrollbar,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-toolbar-grp::-webkit-scrollbar {
        display: none !important;
    }

    html body .text-checker-editor-wrapper .mce-toolbar-grp .mce-container-body,
    html body .text-checker-editor-wrapper .mce-toolbar,
    html body .text-checker-editor-wrapper .mce-flow-layout,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-toolbar-grp .mce-container-body,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-toolbar,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-flow-layout,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-toolbar-grp .mce-container-body,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-toolbar,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-flow-layout {
        display: grid !important;
        grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
        grid-auto-flow: row dense !important;
        align-items: stretch !important;
        align-content: start !important;
        row-gap: 6px !important;
        column-gap: 4px !important;
        width: 100% !important;
        min-width: 100% !important;
    }

    html body .text-checker-editor-wrapper .mce-flow-layout-item,
    html body .text-checker-editor-wrapper .mce-btn-group,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-flow-layout-item,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-btn-group,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-flow-layout-item,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-btn-group {
        margin: 0 !important;
        width: auto !important;
        display: contents !important;
    }

    html body .text-checker-editor-wrapper .mce-toolbar .mce-btn-group.n9-tc-format-group,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-toolbar .mce-btn-group.n9-tc-format-group,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-toolbar .mce-btn-group.n9-tc-format-group {
        width: auto !important;
    }

    html body .text-checker-editor-wrapper .mce-toolbar .mce-btn-group.n9-tc-utility-group,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-toolbar .mce-btn-group.n9-tc-utility-group,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-toolbar .mce-btn-group.n9-tc-utility-group {
        margin-left: auto !important;
    }

    html body .text-checker-editor-wrapper .mce-toolbar .n9-tc-fullscreen-button,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-toolbar .n9-tc-fullscreen-button,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-toolbar .n9-tc-fullscreen-button {
        display: none !important;
    }

    html body .text-checker-editor-wrapper .mce-listbox,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-listbox,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-listbox {
        grid-column: span 2 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    html body .text-checker-editor-wrapper .mce-listbox button,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-listbox button,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-listbox button {
        min-height: 40px !important;
        padding-right: 28px !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
    }

    html body .text-checker-editor-wrapper .mce-btn,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-btn,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-btn {
        min-width: 40px !important;
        min-height: 40px !important;
        margin: 0 1px 1px 0 !important;
    }

    html body .text-checker-editor-wrapper .mce-btn button,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-btn button,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-btn button {
        min-width: 40px !important;
        min-height: 40px !important;
        padding: 0 8px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    html body .text-checker-editor-wrapper .mce-listbox .mce-caret,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-listbox .mce-caret,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-listbox .mce-caret {
        right: 8px !important;
    }

    html body .text-checker-editor-wrapper .mce-edit-area,
    html body .text-checker-editor-wrapper .mce-edit-area iframe,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-edit-area,
    html body.woocommerce-checkout #wp-custom_field_4-wrap .mce-edit-area iframe,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-edit-area,
    html body[class*="ugc"] #wp-ugc_content-wrap .mce-edit-area iframe {
        min-height: clamp(240px, 42vh, 420px) !important;
    }
}
