// AI 单元格操作按钮样式
.ai-cell-actions {
  position: fixed;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);

  .ai-cell-actions-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    color: #595959;
    transition: all 0.2s;

    &:hover {
      background: #f5f5f5;
      color: var(--color-primary-hover, #203c99);
    }

    &:active {
      background: #e6f7ff;
    }
  }
}

// AI 单元格内容弹窗样式
.ai-cell-content-popup {
  width: 480px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);

  // 头部
  .ai-cell-content-popup-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
  }

  .ai-cell-content-popup-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #262626;
    flex-shrink: 0;

    .cn-ui-icon {
      color: var(--color-primary-hover, #203c99);
    }
  }

  .ai-cell-content-popup-tabs {
    display: flex;
    gap: 8px;
    margin-left: auto;
  }

  .ai-cell-content-popup-close {
    color: #8c8c8c;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.2s;

    &:hover {
      color: #262626;
    }
  }

  // 内容区域
  .ai-cell-content-popup-body {
    padding: 16px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
  }

  .ai-cell-content-popup-textarea {
    width: 100%;

    .cn-ui-input {
      border: 1px solid #d9d9d9;
      border-radius: 6px;
      padding: 12px;
      font-size: 14px;
      line-height: 1.6;
      resize: none;

      &:focus {
        border-color: var(--color-primary-hover, #203c99);
        box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
      }
    }
  }

  .ai-cell-content-popup-preview {
    padding: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #262626;
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    min-height: 200px;
    background: #fafafa;

    .empty-text {
      color: #bfbfbf;
    }
  }
}
