.brushtool-dialog {
  width: 500px;
  height: 430px;
  position: absolute;
  background-color: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

/* --- 頭部 (44px) --- */
.brushtool-dialog .panel-header {
  height: 44px;
  background-color: #555555;
  color: #fff;
  display: flex;
  align-items: center;
  padding-left: 15px;
  /* font-size: 18px; */
  letter-spacing: 1px;
  font-weight: 700;
}

/* --- 中間主體 (342px) --- */
.brushtool-dialog .panel-body {
  height: 342px;
  background-color: #111;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.6fr 1.2fr;
  padding: 10px 15px 10px 10px;
  gap: 10px;
}

/* 區域 1: 左側 (預覽 + 顏色) */
.brushtool-dialog .section-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brushtool-dialog .preview-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.brushtool-dialog .brush-preview {
  width: 190px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brushtool-dialog  .mode-toggles {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #ccc;
  font-size: 12px;
  width: 55px;
}

.brushtool-dialog .mode-item {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.brushtool-dialog .checkbox-square {
  width: 14px;
  height: 14px;
  border: 1px solid #666;
  display: inline-block;
}

.brushtool-dialog .mode-item.active .checkbox-square {
  background-color: #d32f2f;
  /* 紅色實心 */
  border-color: #d32f2f;
}

.brushtool-dialog .mode-item.hollow .checkbox-square {
  background-color: transparent;
}

/* 顏色網格 */
.brushtool-dialog .color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 8px;
  height: 100%;
}

.brushtool-dialog .color-btn {
  width: 100%;
  height: 100%;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}

.brushtool-dialog .color-btn:hover {
  transform: scale(1.1);
}

.brushtool-dialog .c01 {
  background: #BF0000;
}

.brushtool-dialog .c02 {
  background: #FF0000;
}

.brushtool-dialog .c03 {
  background: #E92FEA;
}

.brushtool-dialog .c04 {
  background: #FFBF00;
}

.brushtool-dialog .c05 {
  background: #FFFF00;
}

.brushtool-dialog .c06 {
  background: #91CF4F;
}

.brushtool-dialog .c07 {
  background: #00AF4F;
}

.brushtool-dialog .c08 {
  background: #00AFEF;
}

.brushtool-dialog .c09 {
  background: #006FBF;
}

.brushtool-dialog .c10 {
  background: #001F5F;
}

.brushtool-dialog .c11 {
  background: #FFFFFF;
}

.brushtool-dialog .c12 {
  background: #B1B1B1;
}

.brushtool-dialog .c13 {
  background: #585656;
}

.brushtool-dialog .c14 {
  background: #000000;
}

.brushtool-dialog .c15 {
  background: #653200;
}

.brushtool-dialog .c16 {
  background: #C3874B;
}

.brushtool-dialog .c17 {
  background: #FF8F00;
}

.brushtool-dialog .c18 {
  background: #388E3C;
}

.brushtool-dialog .c19 {
  background: #A9745B;
}

.brushtool-dialog .c20 {
  background: #6A1B9A;
}

/* 區域 2 & 3: 工具欄 (圖形與線條) */
.brushtool-dialog .toolbar-column {
  /* width: 50px; */
  background-color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding: 5px 0;
}

.brushtool-dialog .tool-btn {
  width: 52px;
  height: 52px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  border-radius: 4px;
}

.brushtool-dialog .tool-btn:hover {
  background-color: #444;
  width: 52px;
  height: 52px;

}

.brushtool-dialog .tool-btn.active {
  background-color: #d84315;
  background-size: 70%;
  width: 52px;
  height: 52px;
}

/* 橘色選中狀態 */
/* CSS 形狀繪製 */
.brushtool-dialog .shape-square {
  width: 30px;
  height: 30px;
  background: #fff;
  flex: 0 0 30px;
}

.brushtool-dialog .shape-oval {
  width: 30px;
  height: 30px;
  background: #fff;
  border-radius: 50%;
  flex: 0 0 30px;
}

.brushtool-dialog .shape-circle {
  width: 30px;
  height: 25px;
  background: #fff;
  border-radius: 50%;
  flex: 0 0 30px;
}

.brushtool-dialog .shape-triangle {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 22px solid #fff;
}

.brushtool-dialog .shape-right-triangle {
  width: 0;
  height: 0;
  border-bottom: 18px solid #fff;
  border-right: 18px solid transparent;
}

.brushtool-dialog .shape-star {
  color: #fff;
  font-size: 30px;
  /* 使用 unicode 星星 */
}

.brushtool-dialog .shape-line {
 
  background: url(../img/brush/shape_line.svg) no-repeat center center;
  background-size: 70%;
}

.brushtool-dialog .shape-dot {
 
  background: url(../img/brush/shape_dot.svg) no-repeat center center;
  background-size:70%;
}

.brushtool-dialog .shape-uparrow {
 
  background: url(../img/brush/shape_uparrow.svg) no-repeat center center;
  background-size: 70%;
}

.brushtool-dialog .shape_directionarrow {
  background: url(../img/brush/shape_directionarrow.svg) no-repeat center center;
  background-size: 70%;
}

.brushtool-dialog .shape-Curve {
  background: url(../img/brush/shape_Curve.svg) no-repeat center center;
  background-size: 70%;
}

.brushtool-dialog .shape-Dashed {
  background: url(../img/brush/shape_Dashed.svg) no-repeat center center;
  background-size: 60%;
}


/* 區域 4: 滑桿區 */
.brushtool-dialog .section-sliders {
  width: 90px;
  display: flex;
  justify-content: space-evenly;
  padding: 0 20px 0 5px;
}

.brushtool-dialog .slider-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0;
}

.brushtool-dialog .slider-icon {
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  cursor:pointer;
}

/* 垂直滑桿樣式模擬 */
.brushtool-dialog .range-wrapper {
  position: relative;
  height: 240px;
  width: 6px;
  background: #444;
  border-radius: 2px;
  display: flex;
  justify-content: center;
}

.brushtool-dialog .range-thumb {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  /*bottom: 55%;*/
  /* 模擬位置 */
  cursor: pointer;
  /*transform: translateY(50%);*/

}

.brushtool-dialog .range-tooltip {
  position: absolute;
  left: 20px;
  background: #333;
  color: #fff;
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 3px;
  white-space: nowrap;
  left: 15px;
  /*bottom: 50%;*/
  z-index: 99;
}

/* --- 底部 (44px) --- */
.brushtool-dialog .panel-footer {
  height: 44px;
  background-color: #1a1a1a;
  border-top: 2px solid #ff5722;
  /* 橘色邊框 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.brushtool-dialog .close-btn {
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
}


.brushtool-dialog .tool-btn.active svg {
  fill: #fff;
}