html, body, .dx-theme-compact {
    font-family: "Assistant", sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: white;
}

svg {
    display: block;
    width: 100vw;
    height: 100vh;
    
}

#menu-container {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

#toolbar {
    position: fixed;
    top: 20px;
    left: 20px;
    width: calc(100% - 40px);
    z-index: 10;
}

.toolbar-separator {
    color: #DDD;
    margin: 10px;
    cursor: default;
}

#bottom-toolbar {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: calc(100% - 40px);
    z-index: 10;
}

#chat-popup {
    display: flex;
    justify-content: center;
}

.handle {
    fill: white;
    stroke: #4039d7;
    stroke-width: 1px;
    pointer-events: all;
    opacity: 0;
}

.handle.top-left {
    cursor: nwse-resize;
    width: 8px;
    height: 8px;
    rx: 2px;
    ry: 2px;
}

.handle.top-right {
    cursor: nesw-resize;
    width: 8px;
    height: 8px;
    rx: 2px;
    ry: 2px;
}

.handle.bottom-left {
    cursor: nesw-resize;
    width: 8px;
    height: 8px;
    rx: 2px;
    ry: 2px;
}

.handle.bottom-right {
    cursor: nwse-resize;
    width: 8px;
    height: 8px;
    rx: 2px;
    ry: 2px;
}

.handle.move {
    fill: transparent;
    cursor: move;
}

line.handle.move {
    stroke: transparent;
    stroke-width: 12px;
    fill: none;
}

.handle.tip {
    fill: white;
    stroke: #4039d7;
    stroke-width: 1.5px;
    cursor: crosshair;
}

.handle.rotation {
    opacity: 1;
    fill: #ffffff;
    stroke: #4039d7;
    stroke-width: 1.5px;
    rx: 2px;
    ry: 2px;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 512 512'%3E%3Cdefs%3E%3Cfilter id='shadow' x='-25%25' y='-25%25' width='160%25' height='160%25'%3E%3CfeDropShadow dx='0' dy='18' stdDeviation='12' flood-color='%23000' flood-opacity='0.45'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23shadow)'%3E%3Cpath d='M142.9 142.9c-17.5 17.5-30.1 38-37.8 59.8c-5.9 16.7-24.2 25.4-40.8 19.5s-25.4-24.2-19.5-40.8C55.6 150.7 73.2 122 97.6 97.6c87.2-87.2 228.3-87.5 315.8-1L455 55c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2l0 128c0 13.3-10.7 24-24 24l-8.4 0c0 0 0 0 0 0L344 224c-9.7 0-18.5-5.8-22.2-14.8s-1.7-19.3 5.2-26.2l41.1-41.1c-62.6-61.5-163.1-61.2-225.3 1zM16 312c0-13.3 10.7-24 24-24l7.6 0 .7 0L168 288c9.7 0 18.5 5.8 22.2 14.8s1.7 19.3-5.2 26.2l-41.1 41.1c62.6 61.5 163.1 61.2 225.3-1c17.5-17.5 30.1-38 37.8-59.8c5.9-16.7 24.2-25.4 40.8-19.5s25.4 24.2 19.5 40.8c-10.8 30.6-28.4 59.3-52.9 83.8c-87.2 87.2-228.3 87.5-315.8 1L57 457c-6.9 6.9-17.2 8.9-26.2 5.2S16 449.7 16 440l0-119.6 0-.7 0-7.6z' fill='none' stroke='%23fff' stroke-width='64' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M142.9 142.9c-17.5 17.5-30.1 38-37.8 59.8c-5.9 16.7-24.2 25.4-40.8 19.5s-25.4-24.2-19.5-40.8C55.6 150.7 73.2 122 97.6 97.6c87.2-87.2 228.3-87.5 315.8-1L455 55c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2l0 128c0 13.3-10.7 24-24 24l-8.4 0c0 0 0 0 0 0L344 224c-9.7 0-18.5-5.8-22.2-14.8s-1.7-19.3 5.2-26.2l41.1-41.1c-62.6-61.5-163.1-61.2-225.3 1zM16 312c0-13.3 10.7-24 24-24l7.6 0 .7 0L168 288c9.7 0 18.5 5.8 22.2 14.8s1.7 19.3-5.2 26.2l-41.1 41.1c62.6 61.5 163.1 61.2 225.3-1c17.5-17.5 30.1-38 37.8-59.8c5.9-16.7 24.2-25.4 40.8-19.5s25.4 24.2 19.5 40.8c-10.8 30.6-28.4 59.3-52.9 83.8c-87.2 87.2-228.3 87.5-315.8 1L57 457c-6.9 6.9-17.2 8.9-26.2 5.2S16 449.7 16 440l0-119.6 0-.7 0-7.6z' fill='%23000'/%3E%3C/g%3E%3C/svg%3E") 8 8, crosshair;
}

.handle.origin {
    rx: 4px;
    ry: 4px;
    cursor: move;
}

.handle.splitter {
    rx: 4px;
    ry: 4px;
    cursor: ns-resize;
}

.handle.radius {
    transform: translate(-4px, -4px);
    rx: 4px;
    ry: 4px;
    cursor: nwse-resize;
}

.rotation-handle {
    fill: white;
    stroke: #4039d7;
    cursor: pointer;
    rx: 5px;
    ry: 5px;
}

.resize-handle {
    fill: white;
    stroke: #4039d7;
    cursor: pointer;
    rx: 1px;
    ry: 1px;
}

.rotation-handle {
    fill: white;
    stroke: #4039d7;
    cursor: pointer;
    rx: 5px;
    ry: 5px;
}

.bounding-box {
    stroke: #4039d7;
    stroke-dasharray: 1;
    fill: transparent;
    cursor: move;
}

.hover-outline {
    stroke: #4039d7;
    stroke-dasharray: 3 2;
    fill: transparent;
    pointer-events: none;
}

.selected-outline {
    stroke: #4039d7;
    fill: transparent;
    pointer-events: none;
}

svg.pan-available {
    cursor: grab;
}

svg:active.pan-available {
    cursor: grabbing;
}

.minimap-container {
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 150px;
    height: 150px;
}

.minimap-image {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(128, 128, 128, 0.8);
    background-color: rgba(255, 255, 255, 0.8);
}

.minimap-viewport {
    position: absolute;
    border: 1px solid rgba(50, 50, 50, 0.2);
    background-color: rgba(200, 200, 200, 0.1);
}

@font-face {
    font-family: "LatinModernMath";
    src: url("ibraries/css/font/latinmodern-math.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "KatexMainRegular";
    src: url("libraries/css/font/KaTeX_Main-Regular.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Katex_Main";
    src: url("libraries/css/font/KaTeX_Main-Regular.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "KatexMainItalic";
    src: url("libraries/css/font/KaTeX_Main-Italic.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Katex_Math";
    src: url("libraries/css/fonts/KaTeX_Math-Italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: "Katex_Math";
    src: url("libraries/css/fonts/KaTeX_Math-BoldItalic.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
}


.dx-toolbar-after,
.dx-toolbar-before,
.dx-toolbar-center {
    top: 0;
    display: table;
    height: 100%;
    background-color: #fff;
    border-radius: 4px;
    padding-left: 10px;
    padding-right: 10px;
    box-shadow: rgba(0,0,0,.12) 0 2px 7.2px 0,rgba(0,0,0,.14) 0 8px 16px 0;
}

.dx-popup-title .dx-toolbar-after,
.dx-popup-title .dx-toolbar-before,
.dx-popup-title .dx-toolbar-center {
    box-shadow: none;
    background-color: transparent;
}

.dx-popup-bottom .dx-toolbar-after,
.dx-popup-bottom .dx-toolbar-before,
.dx-popup-bottom .dx-toolbar-center {
    box-shadow: none;
    background-color: transparent;
}

.dx-chat .dx-toolbar-after,
.dx-chat .dx-toolbar-before,
.dx-chat .dx-toolbar-center {
    box-shadow: none;
    background-color: transparent;
}

body.read-only #toolbar-container,
body.read-only #context-menu {
    display: none;
}

.shape-context-toolbar {
    position: fixed;
    z-index: 9999;
    display: none;
    padding: 4px 6px;
    border-radius: 8px;
    background: transparent;
    width: max-content;
}

.shape-context-toolbar.visible {
    display: block;
}

.shape-context-toolbar .dx-toolbar {
    background: transparent;
    box-shadow: none;
    padding: 0;
    width: auto;
    display: inline-block;
}

.shape-context-toolbar .dx-toolbar-items-container {
    gap: 4px;
    overflow: visible;
}

.vector-term-toolbar-item {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 130px;
}

.vector-term-toolbar-label {
    font-size: 11px;
    color: #666;
    flex: 0 0 auto;
}

.vector-term-toolbar-item .term-packed-control {
    flex: 1 1 auto;
    min-width: 0;
}

.thumbnail-dropzone {
    display: grid;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    background: #f7f9fb;
    cursor: pointer;
    position: relative;
}

.thumbnail-preview {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #fff;
}

.thumbnail-preview:not([src]),
.thumbnail-preview[src=""] {
    display: none;
}

.thumbnail-hint {
    font-size: 0.9rem;
    color: #6b7280;
}

.thumbnail-uploader {
    display: none;
}

.thumbnail-remove-button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.thumbnail-remove-button .trash,
.shape-image-dropzone__remove .trash {
    font-weight: 300;
    color: red;
}

.thumbnail-remove-button:hover .trash,
.shape-image-dropzone__remove:hover .trash {
    display: none;
}

.thumbnail-remove-button:hover .trash-hover,
.shape-image-dropzone__remove:hover .trash-hover {
    display: inline-block;
    font-weight: 900;
    color: red;
}

.shape-image-dropzone {
    display: grid;
    place-items: center;
    min-height: 120px;
    padding: 12px;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    background: #f7f9fb;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    position: relative;
}

.shape-image-dropzone.drag-over {
    border-color: #4039d7;
    background: #eef0ff;
}

.shape-image-dropzone__hint {
    font-size: 0.9rem;
    color: #6b7280;
    text-align: center;
}

.shape-image-dropzone__preview {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #fff;
}

.shape-image-dropzone__preview:not([src]),
.shape-image-dropzone__preview[src=""] {
    display: none;
}

.shape-image-dropzone__uploader {
    display: none;
}

.shape-image-dropzone__remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.dx-datagrid .dx-header-row .dx-datagrid-text-content {
    font-family: "Times New Roman";
    font-size: 18.4px;
    font-style: italic !important;
    font-weight: normal;
}

.dxc-legend .dxc-item {
    font-family: "Times New Roman" !important;
    font-size: 18.4px !important;
    font-style: italic;
    font-weight: normal;
    color: #242424 !important;
}

.dx-htmleditor {
    border: none !important;
    box-shadow: none !important;
}

.dx-htmleditor .dx-htmleditor-content {
    cursor: inherit;
}

.dx-button .trash {
    font-weight: 300;
    color: red;
    transition: opacity 0.2s ease-in-out;
}

.dx-button:hover .trash {
    display: none;
}

.dx-button:hover .trash-hover {
    display: inline-block;
    font-weight: 900;
    color: red;
}

.shape-terms-list .shape-term-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    color: #666;
}

.shape-terms-list .shape-term-drag-handle:active {
    cursor: grabbing;
}

.shape-terms-list .shape-term-drag-handle .dx-icon {
    font-size: 16px;
}

.shape-terms-list .dx-list-reorder-handle-container,
.shape-terms-list .dx-list-reorder-handle {
    display: none !important;
}

.shape-terms-list .dx-list-item-content {
    padding-left: 0;
}

.dx-numberbox .dx-texteditor-input {
    text-align: right;
}

.dx-datagrid .dx-revert-button {
    display: none !important;
}

.mdl-preloaded-data-grid .dx-header-row .dx-datagrid-text-content {
    font-family: "KaTeX_Math";
    font-size: 16px;
    font-style: italic;
    font-weight: normal;
}

.mdl-preloaded-data-grid .dx-data-row td {
    font-family: "KaTeX_Main";
    font-size: 12px;
}

.dx-slider-tooltip-position-top {
    padding-top: 0 !important;
}

.tooltip {
    text-wrap-mode: wrap; 
}

.trash-hover {
    display: none;
}

math-field::part(menu-toggle) {
    display: none;
}

math-field::part(virtual-keyboard-toggle) {
    display: none;
}

math-field::part(placeholder) {
    color: #000;
}

math-field:focus-within {
    outline: none;
}

math-field {
    border: 1px solid transparent;
    width: 100%;
    height: 100%;
    display: block;
    background-color: transparent;
    --placeholder-color: #000;
    --placeholder-opacity: 0.5;
    font-size: 16px;
}

.form-math-field::part(container) {
    pointer-events: none;
}

.mdl-small-icon .dx-icon {
    font-size: 10px !important;
}

.mdl-small-icon .dx-button-content {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mdl-button-text {
    font-size: 11px;
    line-height: 1;
}

.mdl-math-input .dx-texteditor-input {
    font-family: 'KaTeX_Math', serif;
    font-size: 16px;
}

.mdl-pill-group {
    position: relative;
    padding: 3px;
    border-radius: 10px;
}

.mdl-pill-group .mdl-pill {
    position: absolute;
    top: 3px;
    height: calc(100% - 6px);
    background: white;
    border-radius: 7px;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: left 0.22s cubic-bezier(0.34, 1.3, 0.64, 1),
                width 0.22s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.mdl-pill-group .dx-icon,
.mdl-display-group .dx-icon {
    font-weight: 300;
}

.mdl-pill-group .dx-item-selected .dx-icon,
.mdl-display-group .dx-item-selected .dx-icon {
    font-weight: 400;
}

.mdl-parent-field {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    height: 100%;
    overflow: hidden;
}

.mdl-parent-field .dx-icon {
    flex-shrink: 0;
}

.mdl-parent-field span,
.mdl-parent-field .dx-textbox {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.mdl-parent-tree .dx-treeview-item {
    padding-top: 3px;
    padding-bottom: 3px;
    min-height: 0;
}

.mdl-parent-tree .dx-treeview-node {
    padding-bottom: 0;
}
@keyframes iconpop {
    0%   { transform: scale(1); }
    40%  { transform: scale(0.7) rotate(-8deg); }
    100% { transform: scale(1.3); }
}

@keyframes mdlWandSpin {
    0%   { transform: rotate(0deg) scale(1); }
    25%  { transform: rotate(-15deg) scale(1.2); }
    75%  { transform: rotate(15deg) scale(1.2); }
    100% { transform: rotate(0deg) scale(1); }
}

.mdl-wand-loading .dx-icon {
    animation: mdlWandSpin 0.6s ease-in-out infinite;
    opacity: 0.7;
}

.dx-button.dx-item-selected .dx-icon {
    animation: iconpop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.mdl-shortcuts .dx-button {
    height: auto;
}

.mdl-shortcuts .dx-button-content {
    display: flex;
    align-items: center;
    height: auto;
    padding: 6px 10px;
}

.mdl-shortcuts .form-math-field {
    display: inline-flex;
    align-items: center;
    height: auto;
}

.mdl-display-options-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
    padding: 0 4px;
    min-width: 16px;
}

.mdl-display-option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    white-space: nowrap;
}

.mdl-display-options-panel {
    position: fixed;
    z-index: 9999;
    display: none;
    background: var(--dx-color-main-bg, #fff);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    padding: 4px;
}

.mdl-display-options-panel.visible {
    display: block;
}

.mdl-variable-selector {
    font-family: "Katex_Math" !important;
    font-size: 16px;   
    font-weight: 400;
    font-style: italic;
}

.case-select {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.case-select__label {
    font-size: 12px;
    line-height: 1;
}

.case-select__icon {
    font-size: 14px;
    margin-right: 6px;
}

.case-select__input {
    padding-left: 30px !important;
}

.shape-term-term {
    width: 100%;
    min-width: 0;
}

.shape-term-secondary {
    width: 100%;
    min-width: 0;
}

.shape-term-color {
    width: 100%;
    min-width: 0;
}

.shape-term-secondary-dropdown .dx-button {
    width: 100%;
    min-height: 32px;
    padding: 0;
    background: #f5f5f5;
}

.shape-term-secondary-dropdown .dx-button-content {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shape-term-secondary-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shape-term-secondary-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shape-term-secondary-icon.case-select__icon {
    margin: 0;
}

.character-shape-picker .dx-buttongroup-item {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: 50px !important;
    min-height: 50px !important;
}

.character-shape-picker .dx-buttongroup-wrapper {
    align-items: stretch;
}

.character-shape-picker .dx-item {
    height: 50px !important;
    min-height: 50px !important;
}

.character-shape-picker .dx-item-content {
    height: 50px !important;
    min-height: 50px !important;
    padding: 0 !important;
}

.character-shape-picker .dx-buttongroup-item .dx-button {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: 50px !important;
    min-height: 50px !important;
    padding: 0 !important;
}

.character-shape-picker .dx-buttongroup-item .dx-button-content {
    width: 50px !important;
    height: 50px !important;
    min-height: 50px !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.character-shape-picker .dx-buttongroup-item .dx-button-content img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    display: block;
}

.character-shape-picker .dx-buttongroup-item .dx-button-content .dx-icon {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    background-size: contain !important;
    background-position: center;
}

.term-packed-control {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
}

.term-packed-control__button {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    margin: 0;
    padding: 0;
    flex: 0 0 34px;
}

.term-packed-control__select {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.term-packed-checkbox {
    margin: 0;
    padding: 0;
    width: 34px;
    min-width: 34px;
    height: 32px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    background-color: #f5f5f5;
}

.term-packed-checkbox .dx-checkbox-container {
    width: 34px;
    height: 32px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.term-packed-checkbox .dx-checkbox-icon {
    width: 34px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.term-packed-checkbox.dx-state-focused .dx-checkbox-icon,
.term-packed-checkbox.dx-state-hover .dx-checkbox-icon,
.term-packed-checkbox.dx-checkbox-checked .dx-checkbox-icon,
.term-packed-checkbox.dx-checkbox-checked.dx-state-focused .dx-checkbox-icon,
.term-packed-checkbox.dx-checkbox-checked.dx-state-hover .dx-checkbox-icon,
.term-packed-checkbox.dx-checkbox-checked.dx-state-active .dx-checkbox-icon {
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.term-packed-checkbox .dx-checkbox-icon::before,
.term-packed-checkbox .dx-checkbox-icon::after {
    display: none;
}

.term-packed-checkbox .term-packed-checkbox-icon {
    font-size: 14px !important;
    line-height: 1;
    color: #4d4d4d !important;
}

.term-packed-control__select .dx-texteditor {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin: 0;
}

.term-packed-control--no-visibility .term-packed-control__select .dx-texteditor {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.term-packed-control__select .dx-field-item-content {
    padding: 0;
    margin: 0;
}

.term-packed-terms-control,
.term-packed-terms-list {
    width: 100%;
}

.term-packed-terms-list .dx-list-item,
.term-packed-terms-list .dx-list-item-content {
    padding: 0;
}

.term-packed-terms-list .dx-scrollview-content {
    padding: 0;
}

.name-packed-control {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
}

.name-packed-control__button {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    margin: 0;
    padding: 0;
    flex: 0 0 34px;
}

.name-packed-control__color {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    margin: 0;
    padding: 0;
    flex: 0 0 34px;
}

.name-packed-control__input {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.name-packed-control__color .mdl-color-picker {
    width: 100%;
}

.name-packed-control__color .dx-button {
    min-height: 34px;
    border-radius: 0;
}

.name-packed-control__input .dx-texteditor {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin: 0;
}

.name-packed-control__input .dx-field-item-content {
    padding: 0;
    margin: 0;
}

.shape-name-label {
    font-family: "Segoe UI", sans-serif;
    font-size: 10px;
    dominant-baseline: auto;
    pointer-events: none;
}

.shape-term-case-icon-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shape-term-case-icon {
    font-size: 9px;
    line-height: 1;
}

.shape-term-label {
    font-family: "Katex_Math";
    font-size: 10px;
    dominant-baseline: hanging;
    pointer-events: none;
}

.dx-texteditor-input-container .case-select__icon {
    margin-right: 0;
    margin-left: 8px;
}

.mdl-color-picker .dx-button {
    width: 100%;
    min-height: 32px;
    padding: 0;
    background: #f5f5f5;
}

.mdl-color-picker .dx-button-content {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mdl-color-picker-button-template {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mdl-color-picker-button-icon {
    font-size: 18px;
    line-height: 1;
}

.mdl-color-picker-menu .dx-popup-content {
    padding: 6px;
}

.mdl-color-picker-tileview {
    width: auto;
    height: auto;
}

.mdl-color-picker-menu .dx-tile,
.mdl-color-picker-menu .dx-tile-content {
    padding: 0;
}

.mdl-color-picker-menu .dx-tileview-wrapper,
.mdl-color-picker-menu .dx-scrollable-content {
    margin: 0;
    padding: 0;
}

.mdl-color-picker-menu .dx-tile {
    background: transparent;
    border: none;
    box-shadow: none;
}

.mdl-color-picker-item {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.mdl-color-picker-item-icon {
    font-size: 16px;
    line-height: 1;
}

.mdl-color-picker-menu .dx-tile.dx-state-hover .mdl-color-picker-item,
.mdl-color-picker-menu .dx-tile.dx-state-active .mdl-color-picker-item {
    background: #e8e8e8;
}

.mdl-character-picker .dx-button {
    width: 100%;
    min-height: 32px;
    padding: 0;
    background: #f5f5f5;
}

.mdl-character-picker .dx-button-content {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mdl-character-picker-button-template {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mdl-character-picker-button-template img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.mdl-character-picker-button-icon {
    font-size: 18px;
    line-height: 1;
}

.mdl-character-picker-menu .dx-popup-content {
    padding: 6px;
}

.mdl-character-picker-menu .dx-tile,
.mdl-character-picker-menu .dx-tile-content {
    padding: 0;
}

.mdl-character-picker-menu .dx-tileview-wrapper,
.mdl-character-picker-menu .dx-scrollable-content {
    margin: 0;
    padding: 0;
}

.mdl-character-picker-menu .dx-tile {
    background: transparent;
    border: none;
    box-shadow: none;
}

.mdl-character-picker-item {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.mdl-character-picker-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mdl-character-picker-item .fa-ban {
    font-size: 24px;
    color: #aaa;
}

.mdl-character-picker-menu .dx-tile.dx-state-hover .mdl-character-picker-item,
.mdl-character-picker-menu .dx-tile.dx-state-active .mdl-character-picker-item {
    background: #e8e8e8;
}

.shape-svg-chart {
    width: 100%;
    height: 100%;
}

.shape-svg-chart svg {
    display: block;
}

.value-shape-editor {
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.value-shape-editor .dx-texteditor,
.value-shape-editor .dx-numberbox,
.value-shape-editor .dx-texteditor-container,
.value-shape-editor .dx-texteditor-input-container {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    outline: none !important;
    padding: 0 !important;
}

.value-shape-editor .dx-texteditor-input {
    font-family: "Katex_Main";
    font-size: 14px;
    text-align: left;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    line-height: 1;
}

.value-shape-editor .dx-numberbox-spin-container {
    display: none !important;
}

/* Pulse animation for play/pause button when holding space */
@keyframes mdl-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(64,57,215,0.30); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(64,57,215,0.0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(64,57,215,0.0); }
}

#playPauseButton.pulsing,
#playPauseButton.pulsing .dx-button-content {
    animation: mdl-pulse 1s ease-in-out infinite;
}

.referential-axis-line {
    opacity: 0.6;
}

.referential-grid-line {
    opacity: 0.2;
    stroke-dasharray: 2 2;
}


.referential-tick-label {
    font-family: "Katex_Main";
    font-size: 8px;
    opacity: 0.6;
    user-select: none;
    -webkit-user-select: none;
}

.shape-tick-label {
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.chart-tick-handle-x {
    cursor: ew-resize;
}

.chart-tick-handle-y {
    cursor: ns-resize;
}
