.nested-block-modal { --designer-pink: #e81683; --designer-ink: #142033; --designer-line: #dfe4ea; }
.nested-block-modal .modal-dialog { max-width: min(1180px, calc(100vw - 32px)); }
.nested-block-modal .modal-content { overflow: hidden; border: 0; border-top: 4px solid var(--designer-pink); border-radius: 8px; box-shadow: 0 28px 80px rgba(20, 32, 51, .24); }
.nested-block-modal .modal-header { align-items: flex-start; padding: 22px 26px 18px; border-bottom-color: var(--designer-line); }
.nested-block-modal .modal-header h2 { margin: 3px 0 4px; color: var(--designer-ink); font-size: 24px; font-weight: 650; }
.nested-block-modal .modal-header p { margin: 0; color: #687386; font-size: 14px; }
.nested-block-modal .modal-body { padding: 0; background: #f6f7f9; }
.nested-block-modal .modal-footer { min-height: 72px; gap: 10px; padding: 14px 26px; border-top-color: var(--designer-line); }
.nested-designer-grid { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(280px, 1fr) minmax(360px, 1.35fr); min-height: 520px; }
.nested-designer-pane, .nested-designer-preview { min-width: 0; padding: 24px; background: #fff; }
.nested-designer-pane + .nested-designer-pane, .nested-designer-preview { border-left: 1px solid var(--designer-line); }
.nested-designer-pane h3, .nested-designer-preview h3 { display: inline; margin: 0 0 18px 8px; color: var(--designer-ink); font-size: 15px; font-weight: 700; }
.nested-designer-pane > label { display: block; margin: 22px 0 7px; color: #687386; font-size: 12px; font-weight: 650; }
.nested-designer-step { display: inline-grid; width: 24px; height: 24px; place-items: center; color: #fff; background: var(--designer-pink); border-radius: 50%; font-size: 11px; font-weight: 750; }
.nested-block-options { display: grid; gap: 8px; margin-top: 18px; }
.nested-block-option { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; align-items: start; padding: 10px 10px 10px calc(10px + var(--block-depth, 0) * 16px); border: 1px solid var(--designer-line); border-radius: 6px; background: #fff; }
.nested-block-option:has(input:checked) { border-color: #dc8bb8; background: #fff7fb; }
.nested-block-option input { margin-top: 2px; accent-color: var(--designer-pink); }
.nested-block-option strong, .nested-block-option span { display: block; overflow-wrap: anywhere; }
.nested-block-option strong { color: var(--designer-ink); font-size: 12px; }
.nested-block-option span { margin-top: 2px; color: #7b8493; font-size: 10px; }
.nested-field-groups { display: grid; gap: 14px; margin-top: 20px; }
.nested-field-group { padding-left: calc(var(--block-depth, 0) * 14px); }
.nested-field-group legend { width: auto; margin: 0 0 7px; color: var(--designer-ink); font-size: 12px; font-weight: 700; }
.nested-field-group legend span { color: #9aa2ae; font-size: 10px; font-weight: 500; }
.nested-field-list { display: flex; flex-wrap: wrap; gap: 6px; }
.nested-field-choice { position: relative; }
.nested-field-choice input { position: absolute; opacity: 0; pointer-events: none; }
.nested-field-choice span { display: block; max-width: 180px; overflow: hidden; padding: 6px 9px; color: #596476; background: #f6f7f9; border: 1px solid #dfe4ea; border-radius: 999px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.nested-field-choice input:checked + span { color: #9f0c5d; background: #fff1f8; border-color: #d982b3; }
.nested-field-choice input:focus-visible + span { outline: 3px solid rgba(232, 22, 131, .18); outline-offset: 1px; }
.nested-designer-preview { background: #f9fafb; }
.nested-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nested-preview-heading > span { color: #8a93a1; font-size: 10px; font-weight: 650; }
.nested-table-preview { margin-top: 20px; }
.nested-preview-block { overflow: hidden; background: #fff; border: 1px solid #ced5df; border-radius: 7px; box-shadow: 0 8px 24px rgba(24, 37, 57, .07); }
.nested-preview-block .nested-preview-block { margin: 12px; border-color: #e49ac2; box-shadow: none; }
.nested-preview-block .nested-preview-block .nested-preview-block { border-color: #8fb4dc; }
.nested-preview-block__label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; color: #fff; background: #263449; font-size: 10px; font-weight: 700; }
.nested-preview-block .nested-preview-block > .nested-preview-block__label { background: #b51470; }
.nested-preview-block .nested-preview-block .nested-preview-block > .nested-preview-block__label { background: #356f9f; }
.nested-preview-block__label span { opacity: .72; font-weight: 500; }
.nested-preview-table { width: 100%; table-layout: fixed; }
.nested-preview-table th, .nested-preview-table td { padding: 8px; border-right: 1px solid #e4e8ed; border-bottom: 1px solid #e4e8ed; font-size: 9px; overflow-wrap: anywhere; }
.nested-preview-table th:last-child, .nested-preview-table td:last-child { border-right: 0; }
.nested-preview-table th { color: #4f5a6c; background: #f3f5f7; font-weight: 700; }
.nested-preview-table td { color: #a70f62; font-family: "Cascadia Code", Consolas, monospace; }
.nested-preview-children { padding: 0 0 1px; background: repeating-linear-gradient(135deg, #fafbfd, #fafbfd 8px, #f6f8fa 8px, #f6f8fa 16px); }
.nested-designer-summary { margin-right: auto; color: #687386; font-size: 11px; }
.nested-designer-apply { min-width: 168px; padding: 9px 18px; border: 0; border-radius: 999px; background: #e81683; font-weight: 650; }
.nested-designer-apply:hover, .nested-designer-apply:focus-visible { background: #bd116d; }
.nested-designer-apply:disabled { background: #aeb5bf; }

@media (max-width: 900px) {
    .nested-designer-grid { grid-template-columns: 1fr; }
    .nested-designer-pane + .nested-designer-pane, .nested-designer-preview { border-top: 1px solid var(--designer-line); border-left: 0; }
}
