html[data-wbfd-v2-active="1"] .wbfd-v2-original-field{display:none!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-holder > .wbfd_front_tool_icon_panel,
html[data-wbfd-v2-active="1"] .wbfd-v2-holder > .wbfd_back_tool_icon_panel{display:none!important}

.wvsd_custom_textbox:has(.wbfd-v2-rich-field){position:relative}
.wbfd-v2-rich-field{box-sizing:border-box;min-height:42px;width:100%;padding:9px 11px;border:1px solid #cfcfcf;background:#fff!important;color:#222!important;font:16px/1.35 Arial,sans-serif!important;white-space:pre-wrap;overflow-wrap:anywhere;cursor:text;outline:none;direction:rtl!important;text-align:right!important}
.wbfd-v2-rich-field *{font-family:inherit!important;font-size:inherit!important;line-height:inherit!important;font-weight:400!important;font-style:normal!important;color:inherit!important;background:transparent!important;text-align:inherit!important;letter-spacing:normal!important}
.wbfd-v2-rich-field:focus{border-color:#777;box-shadow:0 0 0 2px rgba(0,0,0,.06)}
.wbfd-v2-rich-field::selection,.wbfd-v2-rich-field *::selection{background:#b9d7ff!important;color:#111!important}

/* One toolbar belongs to each field, but only the active field shows it. It floats above the field and never expands the form. */
.wbfd-v2-field-toolbar{display:none;position:absolute;z-index:100000;left:0;right:0;bottom:100%;box-sizing:border-box;direction:rtl;margin:0 0 3px;padding:6px 7px;background:#f8f8f8;border:1px solid #cfcfcf;border-radius:5px;box-shadow:none;font:12px/1.2 Arial,sans-serif;color:#333}
.wbfd-v2-field-toolbar:has(+ .wbfd-v2-original-field + .wbfd-v2-rich-field:focus),
.wbfd-v2-field-toolbar.wbfd-v2-toolbar-active{display:block}
.wbfd-v2-field-toolbar .v2-row{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.wbfd-v2-field-toolbar .v2-row+.v2-row{margin-top:5px;padding-top:5px;border-top:1px solid #e2e2e2}
.wbfd-v2-field-toolbar select,.wbfd-v2-field-toolbar input[type=number],.wbfd-v2-field-toolbar button{box-sizing:border-box;height:28px;border:1px solid #c9c9c9;border-radius:3px;background:#fff;color:#333;font:12px Arial,sans-serif}
.wbfd-v2-field-toolbar select{min-width:105px;max-width:145px;flex:1}.wbfd-v2-field-toolbar input[type=number]{width:46px;padding:0 4px;text-align:center}.wbfd-v2-field-toolbar button{min-width:28px;padding:0 6px;cursor:pointer}.wbfd-v2-field-toolbar button:hover{background:#eee}
.wbfd-v2-field-toolbar .v2-size,.wbfd-v2-field-toolbar .v2-align,.wbfd-v2-field-toolbar label{display:flex;align-items:center;gap:3px}.wbfd-v2-field-toolbar .v2-size button{min-width:24px;padding:0 4px}.wbfd-v2-field-toolbar .wbfd-v2-color span{font-size:11px}.wbfd-v2-field-toolbar input[type=color]{box-sizing:border-box;width:27px;height:27px;padding:2px;border:1px solid #c9c9c9;border-radius:3px;background:#fff;cursor:pointer}.wbfd-v2-field-toolbar .v2-line input{width:44px}

/* Phase 3J: the +/- buttons are the steppers; hide the browser's duplicate number spinners. */
.wbfd-v2-field-toolbar input[type=number]{-moz-appearance:textfield;appearance:textfield}
.wbfd-v2-field-toolbar input[type=number]::-webkit-inner-spin-button,
.wbfd-v2-field-toolbar input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.wbfd-v2-field-toolbar button[data-act=rtl],
.wbfd-v2-field-toolbar button[data-act=ltr]{font-size:15px;min-width:34px}

/* Phase 3M: font picker readability */
.wbfd-v2-field-toolbar select[data-v2="font"]{height:30px;line-height:28px;padding:0 28px 0 8px;text-align:right;text-align-last:right;font-size:13px;vertical-align:middle}
.wbfd-v2-field-toolbar select[data-v2="font"] option{font-size:20px;line-height:1.65;min-height:34px;padding:6px 8px;text-align:right;direction:rtl}
.wbfd-v2-field-toolbar select[data-v2="font"] option[value=""]{font-family:Arial,sans-serif!important;font-size:13px;text-align:right}

/* Phase 3N: clearer font-size control group */
.wbfd-v2-field-toolbar .v2-stepper{display:flex;align-items:center;gap:3px}
.wbfd-v2-field-toolbar .v2-stepper>span{font-size:11px;white-space:nowrap}
.wbfd-v2-field-toolbar .v2-font-size{padding:2px 4px;border:1px solid #ddd5c8;border-radius:4px;background:#f1eee8}
.wbfd-v2-field-toolbar .v2-font-size>span{font-weight:600;color:#554d43;margin-left:2px}
.wbfd-v2-field-toolbar .v2-font-size button,.wbfd-v2-field-toolbar .v2-font-size input{background:#fff}

/* Phase 3O: brand-colored active states that follow the current selection. */
.wbfd-v2-field-toolbar button.is-active{background:#d6c8a47a!important;border-color:#cbbd98!important;color:#2f2a22!important}
.wbfd-v2-field-toolbar button.is-active:hover{background:#d6c8a49c!important}
.wbfd-v2-field-toolbar button.is-mixed{background:linear-gradient(135deg,#fff 0 50%,#d6c8a43d 50% 100%)}

/* Phase 3P: highlight must behave like a text marker, never like a box overlay. */
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > span {
    position: relative;
    z-index: 0;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
[data-wbfd-v2-rendered="1"] .wbfd-v2-ot-unit {
    position: relative;
    z-index: 1;
    background: transparent !important;
}

/* Phase 3Q: marker highlight + complete toolbar state from the range model.
   A narrow em-relative band stays behind glyphs even when line-height is very tight. */
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > span[style*="--wbfd-v2-highlight"] {
    background-color: transparent !important;
    background-image: linear-gradient(to bottom,
        transparent 14%,
        var(--wbfd-v2-highlight) 14%,
        var(--wbfd-v2-highlight) 86%,
        transparent 86%) !important;
    background-repeat: no-repeat !important;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* Phase 3R: isolate highlight paint from line-height.
   The highlight is a fixed em-height marker strip, centered on the glyph run.
   It no longer uses the inline box's full painted height, so tight/negative
   line spacing cannot make one line's highlight cover the next line's text. */
[data-wbfd-v2-rendered="1"] .wbfd-v2-line {
    position: relative;
    z-index: 0;
}
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > span[style*="--wbfd-v2-highlight"] {
    background-color: transparent !important;
    background-image: linear-gradient(var(--wbfd-v2-highlight),var(--wbfd-v2-highlight)) !important;
    background-size: 100% .68em !important;
    background-position: 0 58% !important;
    background-repeat: no-repeat !important;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > span,
[data-wbfd-v2-rendered="1"] .wbfd-v2-ot-unit {
    text-shadow: none;
}

/* Phase 3S: Illustrator-like highlight geometry controls.
   The text run itself keeps the proven 3R paint behavior; an isolated ::before
   expands the painted area without changing text metrics or line spacing. */
.wbfd-v2-field-toolbar .v2-row-highlight{align-items:center}
.wbfd-v2-field-toolbar .v2-highlight-title{font-size:11px;font-weight:600;white-space:nowrap;color:#554d43}
.wbfd-v2-field-toolbar .v2-row-highlight input[type=number]{width:40px}
.wbfd-v2-field-toolbar .v2-corners{display:flex;align-items:center;gap:3px}
.wbfd-v2-field-toolbar .v2-corners button{font-size:16px;min-width:30px;padding:0 5px}

[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-highlight-run{
    --wbfd-v2-highlight-pad-x:0px;
    --wbfd-v2-highlight-pad-y:0px;
    --wbfd-v2-highlight-corner-size:8px;
    position:relative;
    z-index:0;
    isolation:isolate;
}
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-highlight-run::before{
    content:"";
    position:absolute;
    z-index:-1;
    left:calc(-1 * var(--wbfd-v2-highlight-pad-x));
    right:calc(-1 * var(--wbfd-v2-highlight-pad-x));
    top:50%;
    height:calc(.68em + (2 * var(--wbfd-v2-highlight-pad-y)));
    transform:translateY(-42%);
    background:var(--wbfd-v2-highlight);
    pointer-events:none;
}
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-corner-square::before{border-radius:0}
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-corner-round::before{border-radius:var(--wbfd-v2-highlight-corner-size)}
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-corner-chamfer::before{
    clip-path:polygon(var(--wbfd-v2-highlight-corner-size) 0,calc(100% - var(--wbfd-v2-highlight-corner-size)) 0,100% var(--wbfd-v2-highlight-corner-size),100% calc(100% - var(--wbfd-v2-highlight-corner-size)),calc(100% - var(--wbfd-v2-highlight-corner-size)) 100%,var(--wbfd-v2-highlight-corner-size) 100%,0 calc(100% - var(--wbfd-v2-highlight-corner-size)),0 var(--wbfd-v2-highlight-corner-size));
}
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-corner-inset::before{
    --c:var(--wbfd-v2-highlight-corner-size);
    clip-path:polygon(var(--c) 0,calc(100% - var(--c)) 0,calc(100% - var(--c)) var(--c),100% var(--c),100% calc(100% - var(--c)),calc(100% - var(--c)) calc(100% - var(--c)),calc(100% - var(--c)) 100%,var(--c) 100%,var(--c) calc(100% - var(--c)),0 calc(100% - var(--c)),0 var(--c),var(--c) var(--c));
}

/* Phase 3T: background controls are one visually distinct group. */
.wbfd-v2-field-toolbar .v2-row-highlight{
    margin:6px -7px -6px !important;
    padding:7px !important;
    border-top:1px solid #d7c9a5 !important;
    border-radius:0 0 5px 5px;
    background:#eee7d6 !important;
}
.wbfd-v2-field-toolbar .v2-row-highlight .v2-highlight-title{
    font-weight:700;
    color:#4b4337;
}
.wbfd-v2-field-toolbar .v2-row-highlight .wbfd-v2-bg-color{
    padding:2px 4px;
    border:1px solid #d2c39e;
    border-radius:4px;
    background:#fff8;
}

/* Phase 3T: the active toolbar participates in document flow.
   It opens between fields instead of floating over the previous field. */
.wbfd-v2-field-toolbar{
    position:static !important;
    left:auto !important;
    right:auto !important;
    bottom:auto !important;
    width:100%;
    margin:0 0 6px !important;
}


/* Phase 3U: explicit toolbar close control. */
.wbfd-v2-field-toolbar .v2-toolbar-head{
    display:flex;
    justify-content:flex-start;
    align-items:center;
    height:22px;
    margin:-3px 0 3px;
}
.wbfd-v2-field-toolbar .v2-toolbar-close{
    width:24px;
    min-width:24px;
    height:22px;
    padding:0;
    border:0;
    background:transparent;
    font-size:20px;
    line-height:20px;
    color:#6a6258;
}
.wbfd-v2-field-toolbar .v2-toolbar-close:hover{background:#d6c8a47a}

/* Phase 3V: toolbar layout follows the approved mockup. */
.wbfd-v2-field-toolbar .v2-section-label{font-weight:700;font-size:12px;white-space:nowrap}
.wbfd-v2-field-toolbar .v2-row-main select[data-v2="font"]{flex:1;min-width:120px}
.wbfd-v2-field-toolbar .v2-row-format,.wbfd-v2-field-toolbar .v2-row-spacing{justify-content:flex-start}
.wbfd-v2-field-toolbar .v2-row-actions{justify-content:flex-start}
.wbfd-v2-field-toolbar .v2-row-actions .v2-toolbar-close{border:1px solid #c9c9c9;background:#fff;font-size:18px;line-height:26px;width:28px;height:28px;min-width:28px;margin:0}
.wbfd-v2-field-toolbar .v2-row-actions .v2-toolbar-close:hover{background:#d6c8a47a}
.wbfd-v2-field-toolbar .v2-toolbar-head{display:none!important}

/* Real alignment glyphs: right / center / left, not justify. */
.wbfd-v2-field-toolbar .v2-align-btn{display:flex!important;flex-direction:column;justify-content:center;gap:2px;padding:0 5px!important}
.wbfd-v2-field-toolbar .v2-align-btn i{display:block;height:1.5px;background:currentColor;border-radius:1px}
.wbfd-v2-field-toolbar .v2-align-btn i:nth-child(1){width:16px}
.wbfd-v2-field-toolbar .v2-align-btn i:nth-child(2){width:11px}
.wbfd-v2-field-toolbar .v2-align-btn i:nth-child(3){width:14px}
.wbfd-v2-field-toolbar .v2-align-right i{align-self:flex-end}
.wbfd-v2-field-toolbar .v2-align-center i{align-self:center}
.wbfd-v2-field-toolbar .v2-align-left i{align-self:flex-start}

/* Compact spacing icons instead of the words שורות / אותיות. */
.wbfd-v2-field-toolbar .v2-spacing-icon{width:28px;height:28px;box-sizing:border-box;border:1px solid #c9c9c9;border-radius:3px;background:#fff;display:inline-flex!important;align-items:center;justify-content:center;font-size:10px!important;color:#333}
.wbfd-v2-field-toolbar .v2-line-icon{position:relative;flex-direction:column;gap:3px;padding-right:8px}
.wbfd-v2-field-toolbar .v2-line-icon i{display:block;width:12px;height:1.5px;background:#333}
.wbfd-v2-field-toolbar .v2-line-icon:before{content:'↕';position:absolute;right:2px;top:5px;font-size:13px;line-height:16px}
.wbfd-v2-field-toolbar .v2-letter-icon{font-size:9px!important;letter-spacing:-.4px}

/* Phase 3W: compact text-color/align group + label-only spacing icons. */
.wbfd-v2-field-toolbar .v2-text-color-only{gap:0}
.wbfd-v2-field-toolbar .v2-row-format .v2-text-color-only + .v2-align{margin:0}
.wbfd-v2-field-toolbar .v2-spacing-icon{
  border:0!important;
  background:transparent!important;
  border-radius:0!important;
  box-shadow:none!important;
}

/* Phase 3X: alignment icon geometry correction under RTL.
 * The toolbar itself is RTL, so flex-start/flex-end are visually reversed
 * on the horizontal cross axis. Keep button actions unchanged; swap only glyph alignment. */
.wbfd-v2-field-toolbar .v2-align-right i{align-self:flex-start}
.wbfd-v2-field-toolbar .v2-align-left i{align-self:flex-end}


/* Phase 3Y: final close control + curve/admin parity. */
.wbfd-v2-field-toolbar .v2-row-actions{direction:rtl}
.wbfd-v2-field-toolbar .v2-row-actions .v2-toolbar-close{
  margin-inline-start:auto!important;
  background:#c93636!important;
  border-color:#b52d2d!important;
  color:#fff!important;
  font-weight:700;
}
.wbfd-v2-field-toolbar .v2-row-actions .v2-toolbar-close:hover{background:#a92525!important;color:#fff!important}
/* Curve keeps the same toolbar/UI, while its renderer remains the legacy SVG textPath. */
.wbfd-v2-curve-field{min-height:38px}

/* Phase 3AA: curve text keeps the proven legacy controls, but visually matches V2.
 * CSS only: no curve/SVG/textPath behaviour is changed. */
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) > .wbfd_front_tool_icon_panel,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) > .wbfd_back_tool_icon_panel{
    direction:rtl;
    box-sizing:border-box;
    width:100%;
    padding:7px;
    margin:0 0 6px;
    border:1px solid #dedede;
    border-radius:5px;
    background:#fff;
    box-shadow:none!important;
    display:flex!important;
    flex-wrap:wrap;
    align-items:center;
    gap:5px;
}
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) > .wbfd_front_tool_icon_panel > div,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) > .wbfd_back_tool_icon_panel > div{
    float:none!important;
    margin:0!important;
}
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .wvsd_custom_font_size_field,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .wvsd_custom_line_height_field,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .wvsd_custom_arch_diameter_field{
    width:62px!important;
    max-width:62px!important;
    height:28px!important;
}
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .product_font_size,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .product_line_height,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .product_arch_diameter,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) select.font_family{
    box-sizing:border-box!important;
    height:28px!important;
    min-height:28px!important;
    padding:0 6px!important;
    border:1px solid #c9c9c9!important;
    border-radius:3px!important;
    background-color:#fff;
    color:#333;
    font:12px Arial,sans-serif;
}
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .wvsd_font_family{
    flex:1 1 120px;
    min-width:120px;
}
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) select.font_family{
    width:100%!important;
    max-width:145px;
    text-align:right;
    text-align-last:right;
}
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .wbfd_text_color input{
    box-sizing:border-box!important;
    width:55px!important;
    height:28px!important;
    margin:0!important;
    padding:2px 4px!important;
    border:1px solid #c9c9c9!important;
    border-radius:3px!important;
    text-align:center;
}
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .text_align_left,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .text_align_center,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .text_align_right,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .text_align_left_selected,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .text_align_center_selected,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .text_align_right_selected{
    box-sizing:border-box;
    width:28px!important;
    height:28px!important;
    min-width:28px;
    margin:0!important;
    border:1px solid #c9c9c9;
    border-radius:3px;
    background-color:#fff;
    background-position:center!important;
    background-size:15px auto!important;
    cursor:pointer;
}
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .text_align_left_selected,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .text_align_center_selected,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .text_align_right_selected{
    background-color:#d6c8a47a!important;
    border-color:#cbbd98!important;
}
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .textbox_clone_icon,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .textbox_remove_icon{
    box-sizing:border-box;
    width:28px!important;
    height:28px!important;
    margin:0!important;
    border:1px solid #c9c9c9;
    border-radius:3px;
    background-position:center!important;
    background-size:16px!important;
    cursor:pointer;
}
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .wvsd_clear{display:none!important}
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .wvsd_custom_textbox textarea,
.wbfd-v2-enabled .wvsd_textbox_container:has(.wvsd_custom_text.text_curve) .wvsd_custom_textbox input.wvsd_custom_text{
    box-sizing:border-box;
    width:100%;
    border:1px solid #d8d8d8;
    border-radius:3px;
}

/* Phase 3AB: visual-only skin for the proven legacy curve toolbar.
   JS adds stable classes after detecting the real SVG/textPath curve, so this
   does not depend on legacy DOM :has() assumptions. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar{
  direction:rtl!important;box-sizing:border-box!important;width:100%!important;
  padding:7px!important;margin:0 0 6px!important;border:1px solid #dedede!important;
  border-radius:5px!important;background:#fff!important;box-shadow:none!important;
  display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:5px!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > div{float:none!important;margin:0!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar input,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar select{
  box-sizing:border-box!important;height:28px!important;min-height:28px!important;
  border:1px solid #c9c9c9!important;border-radius:3px!important;background:#fff;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_font_size,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_line_height,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_arch_diameter{width:58px!important;padding:0 5px!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar select.font_family{height:28px!important;max-width:145px!important;padding:0 6px!important;text-align:right!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .text_align_left,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .text_align_center,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .text_align_right,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .text_align_left_selected,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .text_align_center_selected,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .text_align_right_selected,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .textbox_clone_icon,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .textbox_remove_icon{
  box-sizing:border-box!important;width:28px!important;height:28px!important;min-width:28px!important;
  margin:0!important;border:1px solid #c9c9c9!important;border-radius:3px!important;background-position:center!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .text_align_left_selected,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .text_align_center_selected,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .text_align_right_selected{background-color:#d6c8a47a!important;border-color:#cbbd98!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-close-row{order:9999!important;flex:0 0 100%!important;display:flex!important;justify-content:flex-start!important;padding-top:3px!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-close{
  width:28px!important;height:28px!important;min-width:28px!important;padding:0!important;margin:0!important;
  border:1px solid #a92525!important;border-radius:3px!important;background:#c93434!important;color:#fff!important;
  font:700 20px/26px Arial,sans-serif!important;cursor:pointer!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-close:hover{background:#a92525!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar.wbfd-v2-curve-toolbar-closed{display:none!important}


/* Phase 3AC: final curve toolbar polish. Visual only; legacy curve logic stays intact. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .wbfd-v2-curve-close-row{
  order:9999!important;
  flex:0 0 auto!important;
  width:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  margin:0!important;
  margin-inline-start:auto!important;
}
/* Physical left edge in the RTL toolbar, on the existing second/control row. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .wbfd-v2-curve-close{
  margin:0!important;
}
/* Make the legacy curve text field visually match the V2 rich fields. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-holder input.wvsd_custom_text.text_curve,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-holder textarea.wvsd_custom_text.text_curve,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-holder .wvsd_custom_textbox input.wvsd_custom_text.text_curve,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-holder .wvsd_custom_textbox textarea.wvsd_custom_text.text_curve{
  display:block!important;
  box-sizing:border-box!important;
  width:calc(100% - 20px)!important;
  min-height:42px!important;
  height:42px!important;
  margin:8px 10px!important;
  padding:8px 12px!important;
  border:1px solid #c9c9c9!important;
  border-radius:5px!important;
  background:#fff!important;
  box-shadow:none!important;
  color:#222!important;
  font-size:16px!important;
  line-height:24px!important;
  text-align:right!important;
  direction:rtl!important;
  outline:none!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-holder input.wvsd_custom_text.text_curve:focus,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-holder textarea.wvsd_custom_text.text_curve:focus{
  border-color:#222!important;
  box-shadow:0 0 0 1px #222 inset!important;
}


/* Phase 3AD: curve UI parity fixes only. Keep legacy curve behaviour untouched. */
/* 1) Restore the three legacy control icons. Earlier generic background:#fff
      replaced the original background-image shorthand. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_font_size{
  background-color:#fff!important;
  background-image:url(/wp-content/themes/hello-elementor-child/images/font-size.svg)!important;
  background-repeat:no-repeat!important;background-position:6px center!important;background-size:14px!important;
  background-origin:content-box!important;padding-left:24px!important;text-align:right!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_line_height{
  background-color:#fff!important;
  background-image:url(/wp-content/themes/hello-elementor-child/images/line-spacing.svg)!important;
  background-repeat:no-repeat!important;background-position:6px center!important;background-size:14px!important;
  background-origin:content-box!important;padding-left:24px!important;text-align:right!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_arch_diameter{
  background-color:#fff!important;
  background-image:url(/wp-content/themes/hello-elementor-child/images/arch-size.svg)!important;
  background-repeat:no-repeat!important;background-position:6px center!important;background-size:14px!important;
  background-origin:content-box!important;padding-left:24px!important;text-align:right!important;
}

/* 2) The curve input uses exactly the same visual box metrics as .wbfd-v2-rich-field. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-holder .wvsd_custom_textbox{
  box-sizing:border-box!important;width:100%!important;margin:0!important;padding:0!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-holder input.wvsd_custom_text.text_curve,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-holder textarea.wvsd_custom_text.text_curve,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-holder .wvsd_custom_textbox input.wvsd_custom_text.text_curve,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-holder .wvsd_custom_textbox textarea.wvsd_custom_text.text_curve{
  box-sizing:border-box!important;width:100%!important;min-height:42px!important;height:42px!important;
  margin:0!important;padding:9px 11px!important;border:1px solid #cfcfcf!important;border-radius:0!important;
  background:#fff!important;color:#222!important;font:16px/1.35 Arial,sans-serif!important;
  text-align:right!important;direction:rtl!important;box-shadow:none!important;outline:none!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-holder input.wvsd_custom_text.text_curve:focus,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-holder textarea.wvsd_custom_text.text_curve:focus{
  border-color:#777!important;box-shadow:0 0 0 2px rgba(0,0,0,.06)!important;
}

/* Phase 3AF: SAFE curve-toolbar layout.
 * IMPORTANT: CSS-only, based on Phase 3AD. No legacy nodes are moved/reordered
 * in the DOM, and no V2 field-editor lifecycle code is changed. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar{
  direction:ltr!important;
  display:grid!important;
  grid-template-columns:28px 28px 28px minmax(58px,1fr) minmax(58px,1fr) minmax(58px,1fr)!important;
  grid-auto-rows:30px!important;
  align-items:center!important;
  justify-items:stretch!important;
  gap:5px!important;
  padding:7px!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > div{
  direction:rtl!important;
  width:auto!important;min-width:0!important;height:28px!important;
  padding:0!important;margin:0!important;float:none!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
}
/* Hide legacy +/- size icons and clearfix: the numeric controls remain functional. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_size_small,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_size_large,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_clear,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_font_family1{display:none!important}

/* Row 1 — three alignments + the three curve numeric controls. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_left,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_left_selected{grid-row:1!important;grid-column:1!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_center,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_center_selected{grid-row:1!important;grid-column:2!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_right,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_right_selected{grid-row:1!important;grid-column:3!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_arch_diameter_field{grid-row:1!important;grid-column:4!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_line_height_field{grid-row:1!important;grid-column:5!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_font_size_field{grid-row:1!important;grid-column:6!important}

/* Put the icon in the control wrapper, never over the numeric text. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_font_size_field,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_line_height_field,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_arch_diameter_field{
  position:relative!important;border:1px solid #c9c9c9!important;border-radius:3px!important;background:#fff!important;
  padding-left:20px!important;box-sizing:border-box!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_font_size_field:before,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_line_height_field:before,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_arch_diameter_field:before{
  content:""!important;position:absolute!important;left:5px!important;top:50%!important;transform:translateY(-50%)!important;
  width:14px!important;height:14px!important;background-repeat:no-repeat!important;background-position:center!important;background-size:contain!important;
  pointer-events:none!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_font_size_field:before{background-image:url(/wp-content/themes/hello-elementor-child/images/font-size.svg)!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_line_height_field:before{background-image:url(/wp-content/themes/hello-elementor-child/images/line-spacing.svg)!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_arch_diameter_field:before{background-image:url(/wp-content/themes/hello-elementor-child/images/arch-size.svg)!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_font_size,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_line_height,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_arch_diameter{
  width:100%!important;height:26px!important;min-height:26px!important;padding:0 3px!important;margin:0!important;
  border:0!important;background:#fff!important;background-image:none!important;box-shadow:none!important;text-align:center!important;
}

/* Row 2 — X is physically far-left; font stays on the right. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wbfd-v2-curve-close-row{grid-row:2!important;grid-column:1!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .textbox_remove_icon{grid-row:2!important;grid-column:2!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .textbox_clone_icon{grid-row:2!important;grid-column:3!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wbfd_text_color{grid-row:2!important;grid-column:4!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_font_family{grid-row:2!important;grid-column:5 / 7!important;justify-content:stretch!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar select.font_family{width:100%!important;max-width:none!important;height:28px!important;margin:0!important}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wbfd-v2-curve-close-row{
  width:28px!important;height:28px!important;padding:0!important;margin:0!important;display:flex!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .wbfd-v2-curve-close{width:28px!important;height:28px!important;margin:0!important}


/* Phase 3AG: keep only the legacy curve icons; no duplicate decorative icons. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_font_size_field,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_line_height_field,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_arch_diameter_field{
  padding-left:0!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_font_size_field:before,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_line_height_field:before,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_arch_diameter_field:before{
  content:none!important;display:none!important;background-image:none!important;
}

/* Phase 3AH: remove ONLY the extra wrapper pseudo-icons from 3AF/3AG,
 * while restoring the original legacy icons inside the three numeric controls. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_font_size_field:before,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_line_height_field:before,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_arch_diameter_field:before{
  content:none!important;
  display:none!important;
  background-image:none!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_font_size{
  background-color:#fff!important;
  background-image:url(/wp-content/themes/hello-elementor-child/images/font-size.svg)!important;
  background-repeat:no-repeat!important;
  background-position:6px center!important;
  background-size:14px!important;
  background-origin:content-box!important;
  padding-left:24px!important;
  text-align:right!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_line_height{
  background-color:#fff!important;
  background-image:url(/wp-content/themes/hello-elementor-child/images/line-spacing.svg)!important;
  background-repeat:no-repeat!important;
  background-position:6px center!important;
  background-size:14px!important;
  background-origin:content-box!important;
  padding-left:24px!important;
  text-align:right!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_arch_diameter{
  background-color:#fff!important;
  background-image:url(/wp-content/themes/hello-elementor-child/images/arch-size.svg)!important;
  background-repeat:no-repeat!important;
  background-position:6px center!important;
  background-size:14px!important;
  background-origin:content-box!important;
  padding-left:24px!important;
  text-align:right!important;
}

/* Phase 3AI: curve icon cleanup only.
 * Keep the legacy child icons, remove the oversized wrapper background layer,
 * and anchor the three numeric-field icons to the left edge of the input. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_left,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_left_selected,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_center,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_center_selected,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_right,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_right_selected,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .textbox_remove_icon,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .textbox_clone_icon,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_left:hover,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_left_selected:hover,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_center:hover,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_center_selected:hover,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_right:hover,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_right_selected:hover,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .textbox_remove_icon:hover,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .textbox_clone_icon:hover{
  background-image:none!important;
  background-repeat:no-repeat!important;
  background-size:auto!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_font_size,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_line_height,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_arch_diameter{
  background-origin:border-box!important;
  background-clip:padding-box!important;
  background-position:6px center!important;
  background-size:14px 14px!important;
  padding:0 5px 0 25px!important;
  text-align:right!important;
}

/* Phase 3AJ: curve toolbar finishing — wider arch value + code-drawn icons. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar{
  grid-template-columns:28px 28px 28px minmax(72px,1.35fr) minmax(56px,1fr) 54px!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_arch_diameter{
  padding-left:25px!important;padding-right:7px!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_font_size{
  padding-left:23px!important;padding-right:4px!important;
}
/* Icons below are inline SVG inserted by V2 JS — never image/background assets. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .wbfd-v2-inline-icon{
  width:18px!important;height:18px!important;display:block!important;pointer-events:none!important;
  stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_left,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_left_selected,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_center,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_center_selected,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_right,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .text_align_right_selected,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .textbox_remove_icon,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .textbox_clone_icon{
  color:#555!important;
}

/* Phase 3AK: curve toolbar — line-height is not applicable to curved text.
 * Hide only that legacy control and reuse its grid space for font size. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_line_height_field{
  display:none!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_arch_diameter_field{
  grid-row:1!important;
  grid-column:4 / 6!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_font_size_field{
  grid-row:1!important;
  grid-column:6!important;
  min-width:66px!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_font_size{
  width:100%!important;
  padding-left:23px!important;
  padding-right:7px!important;
  box-sizing:border-box!important;
}

/* Phase 3AL: curve toolbar final spacing + V2 toolbar surface.
 * Keep all curve behavior untouched; layout/style only. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  overflow:hidden!important;
  background:#f8f8f8!important;
  border:1px solid #cfcfcf!important;
  border-radius:5px!important;
  grid-template-columns:28px 28px 28px minmax(54px,1fr) minmax(54px,1fr) 72px!important;
}
/* The arch control gets the two flexible middle columns; font size gets a real
 * 72px column, so it no longer pushes/escapes past the right edge. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_arch_diameter_field{
  grid-row:1!important;
  grid-column:4 / 6!important;
  min-width:0!important;
  width:100%!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_font_size_field{
  grid-row:1!important;
  grid-column:6!important;
  min-width:0!important;
  width:100%!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_arch_diameter,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_font_size{
  min-width:0!important;
  width:100%!important;
  box-sizing:border-box!important;
}
/* Keep the second row on the same V2 surface. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_font_family{
  grid-row:2!important;
  grid-column:5 / 7!important;
  min-width:0!important;
}


/* Phase 3AM: background group wording/order follows approved compact layout. */
.wbfd-v2-field-toolbar .v2-row-highlight{
    display:block !important;
    direction:rtl;
}
.wbfd-v2-field-toolbar .v2-bg-head,
.wbfd-v2-field-toolbar .v2-bg-metrics{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:5px;
    flex-wrap:wrap;
}
.wbfd-v2-field-toolbar .v2-bg-head{margin-bottom:5px}
.wbfd-v2-field-toolbar .v2-bg-metrics{row-gap:5px}
.wbfd-v2-field-toolbar .v2-highlight-title{font-size:12px !important}
.wbfd-v2-field-toolbar .v2-bg-metric-label{
    font-size:12px !important;
    font-weight:600;
    color:#4b4337;
    margin-left:2px;
}
.wbfd-v2-field-toolbar .v2-bg-corner-size{flex-basis:100%;width:max-content}
.wbfd-v2-field-toolbar .v2-bg-corner-size.v2-stepper{justify-content:flex-start}
/* Phase 3AU admin-only: explicit delete control. */
body.wp-admin .wbfd-v2-field-toolbar .v2-admin-remove{font-size:0;position:relative}
body.wp-admin .wbfd-v2-field-toolbar .v2-admin-remove:after{content:'🗑';font-size:15px;line-height:1}

/* Phase 3BD: preserve intentional empty lines (\n\n) in the rendered design.
   Generated content creates a real line box but never enters textContent/model,
   so save/refresh keeps the exact newline count without inserting fake characters. */
[data-wbfd-v2-rendered="1"] .wbfd-v2-line.wbfd-v2-empty-line::before {
    content: "\00a0";
    display: inline;
    visibility: hidden;
    pointer-events: none;
}

/* Phase 3BF: restore the customer-side field delete action. */
body:not(.wp-admin) .wbfd-v2-field-toolbar .v2-client-remove{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
\n\n/* Phase 3BK: export-safe text background.
   html2canvas must receive a real DOM paint node, not only a ::before pseudo-element.
   The node is empty/aria-hidden so it never changes V2 text offsets or persistence. */
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-highlight-run::before{
    display:none !important;
}
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-highlight-run > .wbfd-v2-highlight-paint{
    display:block;
    position:absolute;
    z-index:-1;
    left:calc(-1 * var(--wbfd-v2-highlight-pad-x));
    right:calc(-1 * var(--wbfd-v2-highlight-pad-x));
    top:50%;
    height:calc(.68em + (2 * var(--wbfd-v2-highlight-pad-y)));
    transform:translateY(-42%);
    background:var(--wbfd-v2-highlight);
    pointer-events:none;
}
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-corner-square > .wbfd-v2-highlight-paint{border-radius:0}
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-corner-round > .wbfd-v2-highlight-paint{border-radius:var(--wbfd-v2-highlight-corner-size)}
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-corner-chamfer > .wbfd-v2-highlight-paint{
    clip-path:polygon(var(--wbfd-v2-highlight-corner-size) 0,calc(100% - var(--wbfd-v2-highlight-corner-size)) 0,100% var(--wbfd-v2-highlight-corner-size),100% calc(100% - var(--wbfd-v2-highlight-corner-size)),calc(100% - var(--wbfd-v2-highlight-corner-size)) 100%,var(--wbfd-v2-highlight-corner-size) 100%,0 calc(100% - var(--wbfd-v2-highlight-corner-size)),0 var(--wbfd-v2-highlight-corner-size));
}
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-corner-inset > .wbfd-v2-highlight-paint{
    --c:var(--wbfd-v2-highlight-corner-size);
    clip-path:polygon(var(--c) 0,calc(100% - var(--c)) 0,calc(100% - var(--c)) var(--c),100% var(--c),100% calc(100% - var(--c)),calc(100% - var(--c)) calc(100% - var(--c)),calc(100% - var(--c)) 100%,var(--c) 100%,var(--c) calc(100% - var(--c)),0 calc(100% - var(--c)),0 var(--c),var(--c) var(--c));
}


/* Phase 3BL: keep the real highlight paint in the same stacking context as the glyphs.
   A negative z-index can disappear behind the draggable/capture surface in html2canvas. */
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-highlight-run{
    position:relative;
    z-index:0;
}
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-highlight-run > .wbfd-v2-highlight-paint{
    z-index:0 !important;
}
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-highlight-run > .wbfd-v2-highlight-text{
    position:relative;
    z-index:1 !important;
}
/* Phase 3BQ: non-round corner shapes are painted as native CSS gradients.
   Do not force background-image:none here: the inline V2 renderer owns it. */

/* Phase 3BV: one native paint path for preview and html2canvas export.
   Disable the historical pseudo-element and paint-node renderers. */
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-highlight-run::before,
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-highlight-run > .wbfd-v2-highlight-paint {
  display: none !important;
  content: none !important;
}
[data-wbfd-v2-rendered="1"] .wbfd-v2-line > .wbfd-v2-highlight-run {
  position: relative;
  z-index: 0;
  /* Native background-image and padding are set by directBackgroundCss inline. */
}

/* Phase 3BW: prevent background-bearing fields from covering adjacent text.
   The highlighted field retains its internal text-over-background stacking. */
.wvsd_design_container .front_new_text:not(.wbfd-v2-background-behind),
.wvsd_design_container .back_new_text:not(.wbfd-v2-background-behind) { z-index: 2; }

/* Phase 3CQ: full-width, labelled tracking control; preserve Phase 3CP handlers. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .wbfd-v2-curve-tracking{
  box-sizing:border-box!important;display:flex!important;flex:0 0 100%!important;
  width:100%!important;min-width:0!important;align-items:center!important;
  justify-content:space-between!important;gap:8px!important;direction:rtl!important;
  padding:6px 8px!important;margin:4px 0 0!important;
  background:#f7f7f7!important;border:1px solid #e1e1e1!important;border-radius:5px!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .wbfd-v2-curve-tracking .v2-curve-tracking-label{
  display:inline-flex!important;align-items:center!important;gap:6px!important;
  min-width:0!important;white-space:nowrap!important;font:12px Arial,sans-serif!important;
  color:#333!important;padding:0!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .wbfd-v2-curve-tracking .v2-curve-tracking-label svg{
  display:block!important;flex-shrink:0!important;color:#555!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .wbfd-v2-curve-tracking .v2-curve-tracking-controls{
  display:inline-flex!important;align-items:center!important;gap:3px!important;
  direction:ltr!important;padding:0!important;flex-shrink:0!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .wbfd-v2-curve-tracking input{
  box-sizing:border-box!important;width:49px!important;min-width:49px!important;
  height:28px!important;min-height:28px!important;margin:0!important;
  text-align:center!important;padding:0 2px!important;
  border:1px solid #c9c9c9!important;border-radius:3px!important;
  background:#fff!important;color:#333!important;font:12px Arial,sans-serif!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .wbfd-v2-curve-tracking button{
  box-sizing:border-box!important;width:28px!important;min-width:28px!important;
  height:28px!important;min-height:28px!important;margin:0!important;padding:0!important;
  border:1px solid #c9c9c9!important;background:#fff!important;color:#333!important;
  border-radius:3px!important;cursor:pointer!important;font:17px Arial,sans-serif!important;
  line-height:26px!important;text-align:center!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .wbfd-v2-curve-tracking button:hover{
  background:#eee!important;
}

/* Phase 3CR: tracking is a complete third GRID ROW, not an auto-placed cell.
   The previous auto-placement clipped the RTL controls at the left edge. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wbfd-v2-curve-tracking {
  grid-row:3 !important;
  grid-column:1 / -1 !important;
  justify-self:stretch !important;
  align-self:stretch !important;
  width:auto !important;
  max-width:none !important;
  min-width:0 !important;
  margin:2px 4px 4px !important;
  direction:rtl !important;
  overflow:visible !important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wbfd-v2-curve-tracking > .v2-curve-tracking-label {
  flex:1 1 auto !important;
  justify-content:flex-start !important;
  direction:rtl !important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wbfd-v2-curve-tracking > .v2-curve-tracking-controls {
  flex:0 0 auto !important;
  direction:ltr !important;
}

/* Phase 3CS: compact curve tracking, matching native curve numeric controls. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar{position:relative!important;}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wbfd-v2-curve-tracking{
  position:absolute!important;top:7px!important;left:7px!important;right:auto!important;
  width:76px!important;max-width:76px!important;min-width:76px!important;
  height:28px!important;min-height:28px!important;box-sizing:border-box!important;
  display:flex!important;flex-direction:row!important;align-items:center!important;
  gap:0!important;padding:0!important;margin:0!important;
  border:1px solid #c9c9c9!important;border-radius:3px!important;
  background:#fff!important;direction:ltr!important;overflow:hidden!important;
  grid-row:auto!important;grid-column:auto!important;box-shadow:none!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wbfd-v2-curve-tracking > .v2-spacing-icon.v2-letter-icon{
  display:inline-flex!important;position:static!important;flex:0 0 28px!important;
  width:28px!important;height:26px!important;min-height:26px!important;
  justify-content:center!important;align-items:center!important;
  border:0!important;background:transparent!important;box-shadow:none!important;
  color:#333!important;font:9px Arial,sans-serif!important;letter-spacing:-.4px!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wbfd-v2-curve-tracking > input[type="number"]{
  position:static!important;display:block!important;flex:1 1 0!important;
  width:45px!important;min-width:0!important;max-width:none!important;
  height:26px!important;min-height:26px!important;padding:0 1px!important;
  margin:0!important;border:0!important;border-radius:0!important;
  outline-offset:-2px!important;background:transparent!important;color:#222!important;
  font:13px Arial,sans-serif!important;text-align:right!important;direction:ltr!important;
  appearance:auto!important;-moz-appearance:auto!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wbfd-v2-curve-tracking > input::-webkit-inner-spin-button{
  -webkit-appearance:auto!important;opacity:1!important;
}

/* Phase 3CT: fit tracking and arch size into existing first toolbar row.
   Use the actual grid tracks rather than an absolute-positioned overlay. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar{
  grid-template-columns:28px 28px 28px 76px minmax(72px,1fr) 72px!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wbfd-v2-curve-tracking{
  position:relative!important;inset:auto!important;top:auto!important;left:auto!important;right:auto!important;
  grid-row:1!important;grid-column:4!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:28px!important;margin:0!important;padding:0!important;
  justify-self:stretch!important;align-self:center!important;
  overflow:hidden!important;z-index:auto!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_arch_diameter_field{
  grid-row:1!important;grid-column:5!important;
  min-width:0!important;width:100%!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_font_size_field{
  grid-row:1!important;grid-column:6!important;
  min-width:0!important;width:100%!important;
}

/* Phase 3CU: preserve the toolbar's original width; fit six controls inside. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar{
  grid-template-columns:repeat(3,28px) repeat(3,minmax(0,58px))!important;
  column-gap:4px!important;row-gap:5px!important;padding:6px!important;
  min-width:0!important;box-sizing:border-box!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wbfd-v2-curve-tracking{
  width:100%!important;max-width:100%!important;min-width:0!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wbfd-v2-curve-tracking > .v2-spacing-icon.v2-letter-icon{
  flex:0 0 19px!important;width:19px!important;font-size:8px!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wbfd-v2-curve-tracking > input[type="number"]{
  width:0!important;min-width:0!important;flex:1 1 0!important;font-size:12px!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_arch_diameter_field,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_font_size_field{
  padding-left:17px!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_arch_diameter_field:before,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar > .wvsd_custom_font_size_field:before{
  left:3px!important;width:12px!important;height:12px!important;
}
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_arch_diameter,
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar .product_font_size{
  min-width:0!important;font-size:12px!important;padding:0 1px!important;
}

/* Phase 3CW: keep 3CU's exact two-row grid, use its unused right-side space.
   Flexible last three columns fill the EXISTING toolbar width; no flex override. */
html[data-wbfd-v2-active="1"] .wbfd-v2-curve-toolbar{
  grid-template-columns:repeat(3,28px) repeat(3,minmax(0,1fr))!important;
  width:100%!important;max-width:100%!important;
}

/* Phase 3CY: SVG corner icons and compact outline controls. */
.wbfd-v2-field-toolbar .v2-bg-head{flex-wrap:nowrap!important;gap:3px!important}
.wbfd-v2-field-toolbar .v2-bg-head .v2-highlight-title{font-size:10px!important;white-space:nowrap!important}
.wbfd-v2-field-toolbar .v2-bg-head .wbfd-v2-bg-color{padding:1px 2px!important;flex-shrink:0!important}
.wbfd-v2-field-toolbar .v2-corners{gap:2px!important;flex-shrink:0!important}
.wbfd-v2-field-toolbar .v2-corners button{font-size:0!important;width:27px!important;min-width:27px!important;height:27px!important;padding:3px!important;background-position:center!important;background-repeat:no-repeat!important;background-size:18px 18px!important}
.wbfd-v2-field-toolbar .v2-corners [data-corner=square]{background-image:url('../images/v2-corner-square.svg')!important}
.wbfd-v2-field-toolbar .v2-corners [data-corner=round]{background-image:url('../images/v2-corner-round.svg')!important}
.wbfd-v2-field-toolbar .v2-corners [data-corner=inset]{background-image:url('../images/v2-corner-inset.svg')!important}
.wbfd-v2-field-toolbar .v2-corners [data-corner=chamfer]{background-image:url('../images/v2-corner-chamfer.svg')!important}
.wbfd-v2-field-toolbar .v2-fill-modes{display:inline-flex;gap:2px;flex-shrink:0;align-items:center}
.wbfd-v2-field-toolbar .v2-fill-modes button{width:25px;min-width:25px;height:27px;padding:0;font-size:15px;line-height:1;border:1px solid #d0c6b2;border-radius:3px;background:#fff;color:#292929;cursor:pointer}
.wbfd-v2-field-toolbar .v2-fill-modes button.is-active{background:#e1d5b9;border-color:#b6a47c}
.wbfd-v2-field-toolbar .v2-bg-metrics{gap:3px!important}
.wbfd-v2-field-toolbar .v2-bg-metrics .v2-stepper{gap:2px!important}
.wbfd-v2-field-toolbar .v2-bg-metrics .v2-stepper button{width:23px!important;min-width:23px!important;padding:0!important}
.wbfd-v2-field-toolbar .v2-bg-metrics input[type=number]{width:35px!important;min-width:35px!important;padding:1px!important}
.wbfd-v2-field-toolbar .v2-outline-width input[type=number]{width:40px!important}
.wbfd-v2-field-toolbar .v2-bg-corner-size{flex-basis:auto!important;width:auto!important}

/* Phase 3CZ: compact original layout, color adjacent to fill toggles. */
.wbfd-v2-field-toolbar .v2-bg-head{gap:2px!important}
.wbfd-v2-field-toolbar .v2-bg-head .v2-highlight-title{font-size:10px!important;margin-left:2px!important}
.wbfd-v2-field-toolbar .v2-bg-head .wbfd-v2-bg-color{margin:0!important;padding:1px!important}
.wbfd-v2-field-toolbar .v2-bg-head .v2-fill-modes{order:0!important;gap:1px!important;margin:0!important}
.wbfd-v2-field-toolbar .v2-bg-head .v2-fill-modes button{width:22px!important;min-width:22px!important;height:26px!important}
.wbfd-v2-field-toolbar .v2-bg-head .v2-corners{margin-right:auto!important;gap:1px!important}
.wbfd-v2-field-toolbar .v2-bg-head .v2-corners button{width:26px!important;min-width:26px!important}
.wbfd-v2-field-toolbar .v2-bg-metrics .v2-outline-width input[type=number]{width:31px!important;min-width:31px!important}
.wbfd-v2-field-toolbar .v2-bg-metrics .v2-outline-width button{width:19px!important;min-width:19px!important}
