.sc-message.sc-message--customized {
    background: #fff6e8;
    border-left: 4px solid #ff9800;
}

.sc-message .sc-custom-version-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #ffe0b2;
    color: #8a4f00;
}

.sc-message .sc-customizer-open-btn {
    margin-top: 8px;
    margin-right: 6px;
    padding: 4px 10px;
    border: 1px solid #d97706;
    border-radius: 6px;
    background: #fff7ed;
    color: #92400e;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s ease, color 0.2s ease;
}

.sc-message .sc-customizer-open-btn:hover,
.sc-message .sc-customizer-open-btn:focus {
    background: #fdba74;
    color: #612500;
}

.sc-trc-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    z-index: 99999;
}

.sc-trc-modal.is-visible {
    display: flex;
}

.sc-trc-modal__dialog {
    width: 90vw;
    max-width: 90vw;
    height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 80px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

.sc-trc-modal__header,
.sc-trc-modal__footer {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.sc-trc-modal__footer {
    border-top: 1px solid #e2e8f0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.sc-trc-modal__body {
    flex: 1;
    padding: 16px 20px 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 0;
    overflow: hidden;
}

.sc-trc-editor-wrapper {
    display: flex;
    flex-direction: column;
    min-height: calc(90vh - 220px);
    height: calc(90vh - 220px);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.sc-trc-editor-wrapper .wp-editor-wrap,
.sc-trc-editor-wrapper .wp-editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100% !important;
}

.sc-trc-editor-wrapper .wp-editor-container textarea,
.sc-trc-editor-wrapper .wp-editor-container iframe,
.sc-trc-editor-wrapper .wp-editor-area {
    flex: 1;
    min-height: 0;
    height: 100% !important;
}

.sc-trc-editor-wrapper .mce-tinymce,
.sc-trc-editor-wrapper .quicktags-toolbar {
    width: 100% !important;
}

.sc-trc-editor-wrapper .mce-tinymce,
.sc-trc-editor-wrapper .mce-container-body,
.sc-trc-editor-wrapper .mce-edit-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100% !important;
}

.sc-trc-editor-wrapper .mce-edit-area iframe {
    flex: 1;
    min-height: 0;
    height: 100% !important;
}

.sc-trc-editor-wrapper .wp-editor-container iframe {
    width: 100% !important;
    height: 100% !important;
}

.sc-trc-editor-wrapper .wp-editor-container textarea {
    resize: none;
}

.sc-trc-editor-wrapper .wp-editor-tabs,
.sc-trc-editor-wrapper .wp-switch-editor {
    display: none !important;
}

.sc-trc-editor-wrapper .mce-panel,
.sc-trc-editor-wrapper .wp-editor-tools,
.sc-trc-editor-wrapper .wp-editor-container {
    width: 100%;
}

.sc-trc-editor-wrapper .wp-editor-tools {
    flex: 1 1 auto !important;
    flex-grow: 1 !important;
}

.sc-trc-modal__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.sc-trc-modal__close {
    appearance: none;
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #475569;
}

.sc-trc-version-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.sc-trc-toolbar-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5f5;
    background: #eff6ff;
    color: #1d4ed8;
    cursor: pointer;
    font-size: 13px;
}

.sc-trc-toolbar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sc-trc-feedback {
    margin-top: 4px;
    font-size: 12px;
    color: #0f172a;
    min-height: 16px;
    visibility: hidden;
}

.sc-trc-modal__footer .button {
    flex: 1;
    text-align: center;
}

.sc-trc-modal__footer .button.sc-trc-save {
    background: #0ea5e9;
    border: 1px solid #0284c7;
    color: #fff;
}

.sc-trc-modal__footer .button.sc-trc-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sc-trc-modal__footer .button.sc-trc-close-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5f5;
    color: #0f172a;
}

body.sc-trc-modal-open {
    overflow: hidden;
}
