/* 文字样式设置面板样式 */
.text-style-panel {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin-bottom: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.text-style-panel.horizontal-layout {
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* 横向布局内容 */
.panel-content-horizontal {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  flex-wrap: nowrap;
}

/* 无选择提示 */
.no-selection-tip {
  color: #909399;
  font-size: 14px;
  font-style: italic;
}

/* 面板内容 */
.panel-content {
  padding: 16px;
}

/* 样式组 - 横向布局 */
.style-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.group-label {
  font-size: 12px;
  color: #606266;
  font-weight: 500;
  white-space: nowrap;
  margin-right: 4px;
}

.group-controls {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* 字号输入框 */
.font-size-input {
  width: 60px;
}

/* 样式选择框 */
.style-select {
  width: 80px;
}

/* 对齐按钮组 */
.align-buttons {
  display: flex;
  gap: 2px;
}

.align-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.align-btn.active {
  background-color: #409eff;
  color: white;
  border-color: #409eff;
}

/* 颜色选择器 */
.color-picker {
  width: 32px;
  height: 28px;
  padding: 0;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
}

.color-picker:hover {
  border-color: #c0c4cc;
}

/* 加粗按钮 */
.bold-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  font-weight: bold;
  font-size: 12px;
}

.bold-btn.active {
  background-color: #409eff;
  color: white;
  border-color: #409eff;
}

/* 标签样式 */
.style-label {
  min-width: 50px;
  font-size: 13px;
  color: #606266;
  font-weight: 500;
  text-align: right;
  flex-shrink: 0;
}

/* 选择器样式 */
.style-select {
  width: 100px;
}

/* 单位标签 */
.unit-label {
  font-size: 12px;
  color: #909399;
  margin-left: 4px;
}

/* 操作按钮区域 */
.panel-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .text-style-panel {
    margin-bottom: 12px;
  }
  
  .panel-content {
    padding: 12px;
  }
  
  .style-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .style-label {
    min-width: auto;
    text-align: left;
    margin-bottom: 4px;
  }
  
  .style-select {
    width: 100%;
  }
}

/* 颜色选择器样式调整 */
.el-color-picker {
  width: 40px;
}

/* 数字输入框样式调整 */
.el-input-number {
  width: 100px;
}

/* 单选按钮组样式调整 */
.el-radio-group .el-radio-button {
  margin-right: 0;
}

/* 面板显示动画 */
.text-style-panel {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 悬停效果 */
.style-group:hover {
  background-color: #fafbfc;
  border-radius: 4px;
  padding: 8px;
  margin: 8px -8px;
  transition: all 0.2s ease;
}

/* 焦点状态 */
.style-group .el-input:focus-within,
.style-group .el-select:focus-within {
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
  border-radius: 4px;
}

/* 按钮样式优化 */
.style-group .el-button {
  min-width: 80px;
}

/* 面板在不同状态下的样式 */
.text-style-panel.compact {
  margin-bottom: 8px;
}

.text-style-panel.compact .panel-content {
  padding: 12px;
}

.text-style-panel.compact .style-group {
  margin-bottom: 12px;
}

/* 深色主题支持（可选） */
@media (prefers-color-scheme: dark) {
  .text-style-panel {
    background: #2d2d2d;
    border-color: #4a4a4a;
    color: #ffffff;
  }
  
  .panel-header {
    background: #3a3a3a;
    border-bottom-color: #4a4a4a;
  }
  
  .panel-title {
    color: #ffffff;
  }
  
  .style-label {
    color: #cccccc;
  }
  
  .style-group:hover {
    background-color: #3a3a3a;
  }
}