/* Shared description chrome; content sizing and HTML policy belong to the bridge. */
.tv-html-editor,
.tv-editor-popup {
  --tv-editor-ink:#081944;
  --tv-editor-blue:#1768cf;
  --tv-editor-muted:#546981;
  --tv-editor-edge:#d7e2ee;
  --tv-editor-surface:#f6f9fd;
  --tv-editor-focus:#80b3f5;
  --tv-editor-active:#fff0a8;
  --tv-editor-actions-space:0;
  --jd-font-default:inherit;
  --jd-font-size-default:14px;
  --jd-border-radius-default:8px;
  --jd-color-text:var(--tv-editor-ink);
  --jd-color-text-icons:var(--tv-editor-ink);
  --jd-color-icon:var(--tv-editor-ink);
  --jd-color-label:var(--tv-editor-muted);
  --jd-color-border:var(--tv-editor-edge);
  --jd-color-panel:var(--tv-editor-surface);
  --jd-color-background-default:#fff;
  --jd-color-button-background-hover:#e8f1fd;
  --jd-color-button-background-hover-opacity40:var(--tv-editor-active);
  --jd-color-button-background-hover-opacity60:#ffe57c;
  --jd-input-height:44px;
  --jd-button-size:44px;
  --jd-focus-input-box-shadow:0 0 0 3px #80b3f540;
  color:var(--tv-editor-ink);
  font-family:inherit;
}

.tv-html-editor {width:100%;min-width:0;scroll-margin-top:90px}
.tv-html-editor>label {display:block;margin-bottom:8px}
.tv-html-editor .jodit-container {
  max-width:100%;min-width:0;border:1px solid var(--tv-editor-edge);border-radius:16px;
  background:#fff;color:var(--tv-editor-ink);font-family:inherit;box-shadow:0 3px 14px #08194404;
}
.tv-html-editor .jodit-container:focus-within {border-color:var(--tv-editor-blue);box-shadow:0 0 0 3px #1768cf12}
.tv-html-editor .jodit-toolbar__box {
  max-width:100%;padding:6px;overflow:visible;border-bottom:1px solid var(--tv-editor-edge);
  border-radius:15px 15px 0 0;background:var(--tv-editor-surface);
}
.tv-html-editor .jodit-toolbar-editor-collection,
.tv-html-editor .jodit-toolbar-collection,
.tv-html-editor .jodit-ui-group {box-sizing:border-box;max-width:100%;min-width:0;flex-wrap:wrap;background-image:none}
.tv-html-editor .jodit-ui-group {gap:2px}
.tv-html-editor .jodit-ui-group_separated_true:not(:last-child)::after {margin:7px 4px;border-right-color:var(--tv-editor-edge)}
.tv-html-editor .jodit-toolbar-button {box-sizing:border-box;min-width:44px;height:44px;min-height:44px;border:0;border-radius:9px}
.tv-html-editor .jodit-toolbar-button__button,
.tv-html-editor .jodit-toolbar-button__trigger {
  box-sizing:border-box;min-width:44px;width:auto;height:44px;min-height:44px;margin:0;padding:0 10px;
  border:0;border-radius:8px;background:transparent;color:var(--tv-editor-ink);font:inherit;font-size:14px;
  line-height:1.4;box-shadow:none;touch-action:manipulation;
}
.tv-html-editor .jodit-toolbar-button__trigger {flex:0 0 44px;width:44px;padding:0 12px;opacity:.75}
.tv-html-editor .jodit-toolbar-button__button:hover:not([disabled]),
.tv-html-editor .jodit-toolbar-button__trigger:hover:not([disabled]) {background:#e8f1fd;color:var(--tv-editor-ink)}
.tv-html-editor .jodit-toolbar-button_active .jodit-toolbar-button__button,
.tv-account-dashboard .pa-dashboard .tv-html-editor .jodit-container .jodit-toolbar-button_active .jodit-toolbar-button__button {
  background:var(--tv-editor-active);color:var(--tv-editor-ink);
}
.tv-html-editor .jodit-toolbar-button__button:focus-visible,
.tv-html-editor .jodit-toolbar-button__trigger:focus-visible {outline:3px solid var(--tv-editor-focus);outline-offset:-3px}
.tv-html-editor .jodit-toolbar-button__button[disabled],
.tv-html-editor .jodit-toolbar-button_disabled .jodit-toolbar-button__button {opacity:.4;cursor:default}
.tv-html-editor .jodit-toolbar-button__icon {flex-shrink:0}
.tv-html-editor .jodit-toolbar-button__icon svg {width:17px;height:17px}
.tv-html-editor .jodit-workplace {min-width:0;min-height:160px!important;background:#fff}
.tv-html-editor iframe {display:block;width:100%;max-width:100%;min-height:160px!important;border:0}
.tv-html-editor .jodit-status-bar {
  min-height:22px;padding:2px 10px;border-top:1px solid var(--tv-editor-edge);border-radius:0 0 15px 15px;
  background:var(--tv-editor-surface);color:var(--tv-editor-muted);font-size:11px;
}
.tv-html-editor .jodit-source__mirror {color:var(--tv-editor-ink);font:14px/1.6 ui-monospace,Consolas,monospace}

/* Empty action slot: no button, reserved blank area, or service dependency. */
.tv-html-editor .tv-editor-actions {
  display:flex;flex:0 1 var(--tv-editor-actions-space);flex-wrap:wrap;align-items:center;
  gap:var(--tv-editor-actions-gap,8px);min-width:0;
}
.tv-html-editor .tv-editor-actions:empty {width:var(--tv-editor-actions-space);padding:0;margin:0;pointer-events:none}
.tv-html-editor .tv-editor-actions:not(:empty) {margin-left:auto}

.tv-html-notice,
.tv-html-load-error {
  margin:0 0 12px;padding:12px 14px;border:1px solid #e7d89a;border-radius:12px;background:#fff9e8;
  color:#68551e;font-size:13px;line-height:1.65;overflow-wrap:anywhere;
}
.tv-html-load-error {border-color:#efc5cb;background:#fff1f3;color:#93263b}
.tv-html-original {margin-bottom:12px;font-size:13px;line-height:1.65}
.tv-html-original summary {width:fit-content;max-width:100%;min-height:44px;padding:10px 0;color:#1768cf;cursor:pointer}
.tv-html-original summary:focus-visible {outline:3px solid #80b3f5;outline-offset:3px;border-radius:4px}
.tv-html-original pre {
  max-height:220px;margin:6px 0 12px;padding:12px;overflow:auto;border:1px solid #d7e2ee;border-radius:10px;
  background:#f6f9fd;color:#263d59;font:12px/1.65 ui-monospace,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;
}
.tv-html-notice[hidden],.tv-html-original[hidden],.tv-html-load-error[hidden] {display:none!important}

/* The shared config marks only its own detached popup/dialog roots. */
.tv-editor-popup.jodit-popup,
.tv-editor-popup.jodit-context-menu {
  box-sizing:border-box;max-width:calc(100vw - 24px);border:1px solid var(--tv-editor-edge);border-radius:12px;
  background:#fff;box-shadow:0 10px 32px #0819441a;
}
.tv-editor-popup .jodit-popup__content,
.tv-editor-popup .jodit-context-menu__content {
  box-sizing:border-box;max-width:100%;min-width:0;padding:10px;border-radius:11px;background:#fff;
  color:var(--tv-editor-ink);font-family:inherit;font-size:14px;line-height:1.5;
}
.tv-editor-popup .jodit-ui-list,.tv-editor-popup .jodit-ui-group,.tv-editor-popup .jodit-form,
.tv-editor-popup .jodit-form__container,.tv-editor-popup .jodit-form__group {box-sizing:border-box;max-width:100%;min-width:0}
.tv-editor-popup .jodit-toolbar-button,.tv-editor-popup .jodit-ui-button,
.tv-editor-popup .jodit-toolbar-button__button,.tv-editor-popup .jodit-dialog__header-button {
  box-sizing:border-box;min-width:44px;min-height:44px;height:auto;padding:10px 12px;border-radius:8px;
  color:var(--tv-editor-ink);font:inherit;font-size:14px;line-height:1.5;box-shadow:none;touch-action:manipulation;
}
.tv-editor-popup .jodit-toolbar-button {padding:0}
.tv-editor-popup .jodit-toolbar-button__button {width:100%;text-align:left}
.tv-editor-popup .jodit-toolbar-button__text {min-width:0;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
.tv-editor-popup .jodit-toolbar-button__button:hover:not([disabled]),
.tv-editor-popup .jodit-ui-button:hover:not([disabled]),
.tv-editor-popup .jodit-dialog__header-button:hover:not([disabled]) {background:#e8f1fd}
.tv-editor-popup .jodit-toolbar-button_active .jodit-toolbar-button__button {background:var(--tv-editor-active);color:var(--tv-editor-ink)}
.tv-editor-popup .jodit-ui-button_variant_primary {border:1px solid #ffcf00;background:#ffcf00;color:var(--tv-editor-ink);font-weight:700}
.tv-editor-popup .jodit-ui-button_variant_primary:hover:not([disabled]) {border-color:#efbd00;background:#f6c600}
.tv-editor-popup .jodit-ui-button_variant_primary svg {fill:var(--tv-editor-ink);stroke:var(--tv-editor-ink)}
.tv-editor-popup .jodit-ui-input__label,.tv-editor-popup .jodit-ui-select__label,
.tv-editor-popup .jodit-ui-text-area__label {margin-bottom:6px;color:var(--tv-editor-muted);font-size:12px;line-height:1.5}
.tv-editor-popup .jodit-ui-input__wrapper,.tv-editor-popup .jodit-ui-select__wrapper {max-width:100%;min-width:0;border:0;background:transparent}
.tv-editor-popup .jodit-ui-input__input,.tv-editor-popup .jodit-ui-select__input,.tv-editor-popup .jodit-ui-text-area__input {
  box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:44px;padding:10px 12px;
  border:1px solid #c5d3e4;border-radius:8px;background:#fff;color:var(--tv-editor-ink);font:inherit;font-size:14px;line-height:1.5;
}
.tv-editor-popup .jodit-ui-checkbox {min-height:44px;align-items:center}
.tv-editor-popup .jodit-ui-checkbox__label {color:var(--tv-editor-ink);font-size:13px;line-height:1.5}
.tv-editor-popup :is(button,input,select,textarea,[tabindex]):focus-visible {outline:3px solid var(--tv-editor-focus);outline-offset:2px}
.tv-editor-popup.jodit-dialog .jodit-dialog__panel {
  box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);
  overflow:auto;border:1px solid var(--tv-editor-edge);border-radius:16px;background:#fff;box-shadow:0 18px 56px #08194426;
}
.tv-editor-popup .jodit-dialog__header {padding:8px 12px;border-bottom:1px solid var(--tv-editor-edge);background:var(--tv-editor-surface)}
.tv-editor-popup .jodit-dialog__header-title {color:var(--tv-editor-ink);font:inherit;font-weight:700}
.tv-editor-popup .jodit-dialog__content {padding:16px}
.tv-editor-popup .jodit-dialog__footer {display:flex;flex-wrap:wrap;gap:8px;padding:12px 16px;border-top:1px solid var(--tv-editor-edge)}

/* Fullscreen is viewport-sized; the bridge supplies the normal content height. */
.tv-html-editor .jodit-container.jodit_fullsize,
.tv-html-editor .jodit-container.jodit-container_fullsize {
  display:flex;flex-direction:column;max-height:none!important;border-radius:0;
}
.tv-html-editor .jodit-container.jodit_fullsize .jodit-workplace,
.tv-html-editor .jodit-container.jodit-container_fullsize .jodit-workplace {flex:1 1 auto;max-height:none!important}
.tv-html-editor .jodit-container.jodit_fullsize iframe,
.tv-html-editor .jodit-container.jodit-container_fullsize iframe {flex:1 1 auto;max-height:none!important}

@media(max-width:560px) {
  .tv-html-editor .jodit-toolbar__box {padding:4px;overflow:visible}
  .tv-html-editor .jodit-ui-group {gap:1px}
  .tv-html-editor .jodit-ui-group_separated_true:not(:last-child)::after {margin-right:2px;margin-left:2px}
  .tv-editor-popup .jodit-popup__content {max-height:min(70vh,420px)}
  .tv-editor-popup .jodit-dialog__content {padding:12px}
}
