/* Drawsmate V1.0.7 hotfix: keep line type, width, and color controls on one row. */
.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row.dm-unit-line-row,
.dm-btn-scope .dm-left-panel .form-item-row.dm-unit-line-row,
.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group),
.dm-btn-scope .dm-left-panel .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 0 10px !important;
    padding: 10px 12px !important;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px rgba(11, 115, 184, 0.06);
    box-sizing: border-box;
}

.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row.dm-unit-line-row > .el-form-item,
.dm-btn-scope .dm-left-panel .form-item-row.dm-unit-line-row > .el-form-item,
.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) > .el-form-item,
.dm-btn-scope .dm-left-panel .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) > .el-form-item {
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row.dm-unit-line-row > .el-form-item:first-child,
.dm-btn-scope .dm-left-panel .form-item-row.dm-unit-line-row > .el-form-item:first-child,
.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) > .el-form-item:first-child,
.dm-btn-scope .dm-left-panel .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) > .el-form-item:first-child {
    display: grid !important;
    flex: 1 1 0 !important;
    grid-template-columns: minmax(0, auto) minmax(92px, 1fr) !important;
    column-gap: 8px !important;
    align-items: center !important;
    width: auto !important;
    max-width: none !important;
}

.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row.dm-unit-line-row > .el-form-item:nth-child(2),
.dm-btn-scope .dm-left-panel .form-item-row.dm-unit-line-row > .el-form-item:nth-child(2),
.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) > .el-form-item:nth-child(2),
.dm-btn-scope .dm-left-panel .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) > .el-form-item:nth-child(2) {
    display: flex !important;
    flex: 0 0 76px !important;
    width: 76px !important;
}

.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row.dm-unit-line-row > .el-form-item:nth-child(3),
.dm-btn-scope .dm-left-panel .form-item-row.dm-unit-line-row > .el-form-item:nth-child(3),
.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) > .el-form-item:nth-child(3),
.dm-btn-scope .dm-left-panel .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) > .el-form-item:nth-child(3) {
    display: flex !important;
    flex: 0 0 42px !important;
    width: 42px !important;
}

.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row.dm-unit-line-row .el-form-item__label,
.dm-btn-scope .dm-left-panel .form-item-row.dm-unit-line-row .el-form-item__label,
.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) .el-form-item__label,
.dm-btn-scope .dm-left-panel .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) .el-form-item__label {
    min-width: 0 !important;
    width: auto !important;
    padding: 0 6px 0 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row.dm-unit-line-row .el-form-item__content,
.dm-btn-scope .dm-left-panel .form-item-row.dm-unit-line-row .el-form-item__content,
.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) .el-form-item__content,
.dm-btn-scope .dm-left-panel .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) .el-form-item__content {
    min-width: 0 !important;
    width: 100% !important;
    margin-left: 0 !important;
}

.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row.dm-unit-line-row .el-select,
.dm-btn-scope .dm-left-panel .form-item-row.dm-unit-line-row .el-select,
.dm-btn-scope .dm-draw-panel .dm-draw-param-body .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) .el-select,
.dm-btn-scope .dm-left-panel .form-item-row:has(> .el-form-item:nth-child(3) [data-dm-color-picker-reference]):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) .el-select {
    width: 100% !important;
}

/* Legacy bundle fallback: older ColorPicker markup has no data-dm-color-* markers. */
.dm-btn-scope :is(.dm-left-panel, .draw-from, .dm-draw-param-body) .form-item-row:has(> .el-form-item:nth-child(3)):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 0 10px !important;
    padding: 10px 12px !important;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px rgba(11, 115, 184, 0.06);
    box-sizing: border-box;
}

.dm-btn-scope :is(.dm-left-panel, .draw-from, .dm-draw-param-body) .form-item-row:has(> .el-form-item:nth-child(3)):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) > .el-form-item {
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

.dm-btn-scope :is(.dm-left-panel, .draw-from, .dm-draw-param-body) .form-item-row:has(> .el-form-item:nth-child(3)):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) > .el-form-item:first-child {
    display: grid !important;
    flex: 1 1 0 !important;
    grid-template-columns: minmax(0, auto) minmax(92px, 1fr) !important;
    column-gap: 8px !important;
    align-items: center !important;
    width: auto !important;
    max-width: none !important;
}

.dm-btn-scope :is(.dm-left-panel, .draw-from, .dm-draw-param-body) .form-item-row:has(> .el-form-item:nth-child(3)):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) > .el-form-item:nth-child(2) {
    display: flex !important;
    flex: 0 0 76px !important;
    width: 76px !important;
}

.dm-btn-scope :is(.dm-left-panel, .draw-from, .dm-draw-param-body) .form-item-row:has(> .el-form-item:nth-child(3)):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) > .el-form-item:nth-child(3) {
    display: flex !important;
    flex: 0 0 42px !important;
    width: 42px !important;
}

.dm-btn-scope :is(.dm-left-panel, .draw-from, .dm-draw-param-body) .form-item-row:has(> .el-form-item:nth-child(3)):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) .el-form-item__label {
    min-width: 0 !important;
    width: auto !important;
    padding: 0 6px 0 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dm-btn-scope :is(.dm-left-panel, .draw-from, .dm-draw-param-body) .form-item-row:has(> .el-form-item:nth-child(3)):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) .el-form-item__content {
    min-width: 0 !important;
    width: 100% !important;
    margin-left: 0 !important;
}

.dm-btn-scope :is(.dm-left-panel, .draw-from, .dm-draw-param-body) .form-item-row:has(> .el-form-item:nth-child(3)):has(> .el-form-item:first-child .el-select):has(> .el-form-item:nth-child(2) .el-select):not(:has(> .el-form-item:nth-child(4))):not(.dm-color-gradient-group):not(.dm-font-settings-group) .el-select {
    width: 100% !important;
}
